The LendingPool.withdrawNFT(uint) uses for loop over storage array to validate the current nft being withdrawing. The problem arises when a user has a very large collection such that looping over it consumes all the gas in the block. As a result whole transaction will get reverted and user won't be able to ever withdraw any of his NFT.
use a mapping structure along with arrays such that mappings track whether a certain tokenId is owned by user, by doing that lot of gas will be saved and DOS will be prevented
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.