Users can withdraw even if undercollateralized
withdrawNFT allows users to withdraw their NFTs even if they are underwater. The reason for it as we do the wrong equation when checking for if the user passes the liquidation threshold, where we multiply userDebt by 80% and lower it - userDebt.percentMul(liquidationThreshold).
Since we have lowered the user debt it will be easier for the collateral to be more than the debt.
https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/pools/LendingPool/LendingPool.sol#L288
Users can withdraw even if undercollateralized
System will be insolvent
Users can borrow and then withdraw their NFTs when undercollateralized and then sell them for profit
Manual review
move the multiplication to the other side
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.