The liquidateBorrower function is responsible for liquidating a borrower by repaying their debt in the LendingPool. However, the BorrowerLiquidated event emits the scaled debt (scaledUserDebt) instead of the actual debt (userDebt). This discrepancy can lead to misleading or incorrect reporting of liquidation amounts.
The BorrowerLiquidated event currently emits scaledUserDebt, which is not the actual amount owed by the borrower.
The function retrieves userDebt from lendingPool.getUserDebt(userAddress), then scales it using WadRayMath.rayMul(userDebt, lendingPool.getNormalizedDebt()), which adjusts the value using an index-based scaling factor.
The emitted value in BorrowerLiquidated(userAddress, scaledUserDebt) does not represent the real debt that was liquidated.
Users tracking liquidation amounts may overestimate debt repayment figures.
Manual Review
Modify the event emission to use userDebt instead of scaledUserDebt.
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.