A missing check on maximum NFT deposits will cause NFTs to become trapped in the protocol for users as the excessive array size will cause core functions to revert due to out-of-gas errors.
In LendingPool.sol there is no limit on the number of NFTs a user can deposit, which can lead to gas limits being exceeded in array iteration functions.
When a user deposits too many NFTs, core functions like withdrawNFT(), borrow(), and initiateLiquidation() will revert due to the unbounded array iteration in getUserCollateralValue():
This results in user's NFTs becoming permanently locked in the protocol as they cannot execute withdrawal transactions.
Implement a maximum limit on the number of NFTs a single user can deposit. Add a check in the depositNFT() function to enforce this limit.
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.