The StabilityPool's getExchangeRate()
function is hardcoded to return 1e18 (1.0 in WAD precision):
This hardcoded rate is used in both deposit and withdrawal calculations:
The RToken contract shows that rToken balances increase over time due to interest accrual through the liquidity index. However, the hardcoded exchange rate in StabilityPool means this value accrual is not reflected in the conversion between rToken and deToken.
This vulnerability has significant economic implications:
The hardcoded 1:1 exchange rate means that late depositors to the Stability Pool receive the same amount of deTokens per rToken as early depositors, despite early depositors' rTokens having accrued more value through interest. This creates unfair value distribution and could lead to:
Earlier depositors being disincentivized to maintain their deposits as they don't benefit from their rToken's interest accrual
Late depositors receiving more value than they should by depositing rTokens after significant interest has accrued
Potential for value extraction by depositing and withdrawing at strategic times to capture interest accrual without proper price adjustment
Implement the originally intended dynamic exchange rate calculation that was commented out:
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.