Staking reward distributions are designed to favor long-term liquidity providers over short-term participants. However, the StabilityPool::calculateRaacRewards
function does not differentiate between them, allowing an attacker to repeatedly deposit and withdraw, potentially draining the pool.
Note that this vulnerability can be applied to different parts of the codebase such as the rewards distribution in the gauges or the fee controller, where no vesting is applied in the rewards distribution and therefore a user could buy and withdraw tokens mulitple times from different accounts to drain the rewards pool.
Paste the following in the stability pool tests:
Manual review.
Distribute rewards according to the staked 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.