The LendingPool::borrow
function incorrectly calculates whether a user has enough collateral to borrow funds. The condition currently checks if the collateral value is less than the allowed borrow limit, but it should check if the user's total debt exceeds the allowed borrow limit.
The current condition:
The correct check should ensure that total debt does not exceed the borrowable limit:
Overborrowing risk: Borrowers may exceed safe collateralization levels, leading to higher liquidation risk or system-wide instability.
Manual review
Update the borrow condition to:
CopyEdit
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.