Minted NFTs may always stay in pending state due to response failure by arrng contract #1875
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
duplicate-1307
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/NextGenCore.sol#L227
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/RandomizerRNG.sol#L40
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/RandomizerRNG.sol#L48
Vulnerability details
Impact
Hash of minted token will not be set to random value if
fulfillRandomWords
function ofNextGenRandomizerRNG
contract is not called by random numbers provider arrng contract due to low amount of eth sent byNextGenRandomizerRNG
contract. This means, random numbers will not be receied and hash of minted will stay0x0000...00
causing it to stay in pending state forever as there is not method inNextGenCore
contract to change hash of pending tokens.Proof of Concept
Request for random numbers to arrng contract is submitted by
NextGenRandomizerRNG
contract. If all goes well, arrng contract will send the random numbers by callingfulfillRandomWords
function ofNextGenRandomizerRNG
contract. Documentation of arrng contract statesSince, gas of ETH transaction keeps on changing, arrng contract may not be able to send back the random numbers for submitted requests. Thus causing the tokens to stay in pending state forever.
Tools Used
Manual Review
Recommended Mitigation Steps
Add a method in
NextGenCore
contract to change hash of pending tokens.Assessed type
Oracle
The text was updated successfully, but these errors were encountered: