The withdrawNFT()
function allows users to withdraw their NFTs from the protocol only if their remaining collateral (NFTs) is sufficient to cover their outstanding debt. However, the function only considers NFTs as collateral and does not include the user’s token deposits in the lending pool.
This means a user who has deposited crvUSD tokens as collateral could be incorrectly blocked from withdrawing their NFT, even if they still have enough collateral in the pool.
The function only considers NFT collateral by using getUserCollateralValue(msg.sender)
, which excludes any crvUSD deposits that could also be used as collateral.
If a user has deposited crvUSD tokens into the lending pool but has no additional NFTs, the function may incorrectly block NFT withdrawals even if the user remains overcollateralized.
User deposits should also be considered when evaluating whether an NFT withdrawal leaves a user undercollateralized.
The function does not include crvUSD deposits, leading to incorrect withdrawal rejections.
Manual Review
Include User Deposits in Collateral Calculation
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.