The StabilityPool contract contains a critical vulnerability where user debt is incorrectly scaled multiple times during liquidations, resulting in inflated debt calculations and excessive collateral seizure.
The vulnerability exists in StabilityPool.sol:
The debt is scaled twice because:
LendingPool.getUserDebt() already returns scaled debt:
Then : incorrectly scales this already-scaled value again using :
Borrowers lose more collateral than they should during liquidations while the Liquidators receive excess collateral based on inflated debt calculations.
Manuel review.
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.