The liquidateBorrower function attempts to liquidate a borrower's position. It retrieves the userDebt
from lendingPool.getUserDebtand scales it by multiplying it by the normalized debt. However, the value returned by getUserDebt
has already been scaled so scaling it again in liquidateBorrower leads to double scaling
The double scaling occurs because:
getUserDebt()
already returns a scaled value by multiplying scaledDebtBalance
with usageIndex
liquidateBorrower()
then scales this already-scaled value again by multiplying it with getNormalizedDebt()
This results in the actual liquidation amount being larger than intended:
Instead of the correct:
Users being liquidated for incorrect amounts
Manual
Remove the second scaling operation in liquidateBorrower
:
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.