We make the incorrect health check in withdrawNFT().
In LendingPool, borrowers can choose to withdraw one NFT from his collateral NFTs. No matter which NFT is withdrawn, we need to make sure that we have enough collateral value to cover the debt.
The problem is that we make the incorrect health check. Let's assume the liquidationThreshold is the default value: 8000. Then we should make sure that left collateral value * 80% >= userDebt. But current implementation is that this transaction can work well if the left collateral value >= 80% * userDebt.
The same issue happens in borrow() function. Users can use 800 collateral value to borrow 1000 Debt. This will steal funds from the Lending pool.
Malicious borrowers can steal funds from the LendingPool.
Manual
Correct the health check in borrow()/withdrawNFT(), collateralValue * 80% >= userDebt
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.