The method incorrectly multiplies scaledDebtBalance by the usageIndex twice.
Let's observe liquidateBorrower function
User debt is fetched through lendingPool.getUserDebt, which calculates it by multiplying their scaled debt balance by the usage index
Afterwards, the output is multiplied by the output of getNormalizedDebt from LendingPool.sol. However, that method also returns the usage index
In the end, scaledDebtBalance is multiplied by the index twice. This inflated value is then checked against the current contract balance and reverts if it's insufficient
Managers who finalized the liquidation will face cases where the contract would have sufficient balance to cover the liquidation, yet still revert.
Logic error, inadvertent reverts
Skip the second multiplication
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.