first of all the number of nfts a user can obtain is unspecified in raacnft. if a user owns a large number of nfts, then when the withdrawNFT()
function is called, two for-loops are executed, potentially consuming more gas than the block limit allows. in this case, the transaction will fail and not be added to the blockchain.
inside the withdrawNFT()
function, the getUserCollateralValue()
function is called, which iterates a for-loop equal to the number of nfts the user owns and in the later part of withdrawNFT()
the same operation is performed. in this case, if the loops consume more gas than the block limit allows, the transaction may be reverted.
if the loops consume more gas than the block limit allows, the transaction may be reverted
code review
LightChaser L-36 and M-02 covers it.
LightChaser L-36 and M-02 covers it.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.