LendingPool: The health check in withdrawNFT
function should ensure that the collateral value, adjusted by the liquidation threshold, is greater than or equal to the user’s total debt. However, the current check multiplies the total debt by the liquidation threshold instead of multiplying the collateral value by it, leading to an incorrect evaluation of borrowing eligibility.
withdrawNFT
function checks for loan health:
Assume:
LiquidationThreshold=80%
collateralValue-nftValue = $1000
userTotalDebt = $1200
The chaeck 1000 < 1200*80%
is False
so It will not revert and user can withdraw NFT and his debt will be more than remaining collateral value!
The user can withdraw NFT and his debt will be more than their actual collateral value.
Lenders should pay for bad debts and lose money.
vscode
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.