The StabilityPool contract tracks user deposits using fixed amounts but fails to account for the yield-bearing nature of RTokens, which naturally increase in value over time. This mismatch between the recorded deposit amount and the actual growing RToken value leads to permanent locking of yield earned by users' deposits in the StabilityPool, effectively causing loss of funds for depositors.
The vulnerability occurs in the interaction between the StabilityPool's deposits/withdrawals tracking mechanism and RToken's functionality
when user deposits RToken to the stabilityPool The StabilityPool it records deposits using a fixed amount:
RToken is designed as a yield-bearing token that grows in value over time through its liquidity index:
During withdrawals, the StabilityPool enforces a limit based on the original deposit amount, not accounting for yield growth:
The core issue is that while RTokens naturally increase in value through yield accrual (similar to Aave's aTokens), the StabilityPool's accounting system uses fixed amounts that don't grow with the yield. This creates a situation where:
User deposits 100 RTokens
Over time, those 100 RTokens grow to 120 RTokens due to yield
User can only withdraw 100 RTokens because that's what's recorded in userDeposits
The extra 20 RTokens from yield are permanently locked in the contract
This is not a matter of user error or misunderstanding - it's a fundamental flaw in how the StabilityPool tracks and manages yield-bearing tokens.
Users permanently lose access to yield earned on their RToken deposits in the StabilityPool
The locked yield accumulates in the stabilityPool with no mechanism for withdrawal
This creates a value leak from users to the protocol, making the StabilityPool economically inefficient and discouraging users from providing stability
The impact grows over time as more yield gets locked in the contract
Foundry
Manual Review
The StabilityPool should track user scaledBalance of RToken instead of absolute amounts at the deposit time :
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.