A malicious user can steal a large portion of accumulated RAAC rewards in the StabilityPool contract through a quick deposit and withdrawal, unfairly taking rewards from long-term depositors.
In the StabilityPool contract, rewards are calculated based on the current token balance:
Initial State:
StabilityPool has accumulated 1000 RAAC over a month
Alice has 100 tokens deposited for the whole month
Total deposits = 100 tokens
Attack steps:
Bob deposits 2000 tokens
Bob immediately calls withdraw
Bob receives ~950 RAAC (1000 * 2000 / 2100)
Only ~50 RAAC left in the pool, which can be sniped by someone else
High: Significant portion of protocol rewards can be captured by attackers rather than legitimate users. This disincentivizes long-term deposits.
Minting of RAAC accumulates linearly, rewards can be sniped instantly. To prevent reward sniping, consider implementing a time-based reward accrual system where users earn their share of newly minted rewards continuously based on deposit duration, rather than having instant access to the entire pool of accumulated rewards.
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.