The liquidateBorrower function incorrectly calculates the scaledUserDebt by applying rayMul to userDebt, even though userDebt is already normalized when retrieved from the LendingPool. This results in double normalization, causing the debt amount to be artificially inflated, leading to excessive liquidations.
userDebt is already normalized when retrieved from LendingPool.
Applying rayMul again with getNormalizedDebt() scales it a second time, inflating the debt amount.
The function then uses scaledUserDebt to approve transfers and emit liquidation events.
This leads to excessive liquidation requirements, making liquidations more expensive than they should be.
Users may lose more assets than necessary due to the overestimated debt amount.
Liquidators might receive excessive rewards
Manual Review
Use userDebt directly instead of scaledUserDebt.
Remove rayMul(userDebt, normalizedDebt), preventing double scaling.
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.