The RAAC protocol can liquidate users, by utilizing the StabilityPool. However, when retrieving the user's debt, it incorrectly applies rayMul to it, artificially increasing it, which may lead to unwanted reverts or invalid calculations.
If we look at the liquidateBorrower function:
We can see that when the debt is fetched, it is scaled with the current borrowing index. However, lendingPool.getUserDebt, already returns the scaled amount.
Incorrect user debt amount used in StabilityPool balance comparison, leading to unwanted reverts
Manual review
Do not apply rayMul to the already scaled user debt 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.