LendingPool: The health check in borrow
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.
in borrow
function it checks for loan health:
Assume:
LiquidationThreshold=80%
collateralValue = $1000
userTotalDebt = $1200
The chaeck 1000 < 1200*80%
is False
so It will not revert and user can borrow more than his collateral value
The user can borrow more than their actual collateral value and never repays the loan
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.