The liquidateBorrower function in StabilityPool incorrectly scales the user's debt twice by multiplying an already-scaled debt amount by the normalized debt index.
https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/pools/StabilityPool/StabilityPool.sol#L449
The getUserDebt() function in LendingPool already returns a debt amount that's scaled by the usage index:
https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/pools/LendingPool/LendingPool.sol#L579-L582
By multiplying this again with getNormalizedDebt(), the debt amount becomes incorrectly inflated by being scaled twice with the usage index.
High. The double scaling leads to:
Much higher debt amounts being calculated than actually owed
Liquidations requiring more crvUSD than necessary
Potential failed liquidations due to insufficient balance checks against inflated amounts
Remove the additional scaling and use the debt amount directly:
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.