Rewards are not based on time, but on balance, meaning a user can just join the stability pool, claim a lot of rewards and leave
When we calculate rewards we don't take time or prev. generated rewards into account, but instead we use the user balance and totalSupply to calculate them.
https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/pools/StabilityPool/StabilityPool.sol#L251-L259
This means that a user can deposit a huge amount and then withdraw, claiming most of the rewards. This can be repeated multiple times in a row.
Example:
No one has withdrawn in 1 day (so no rewards were claimed)
MEV bot sees the opportunity
it deposits a lot of rTokens to get itself some deTokens
Withdraws to claim rewards for his percentage of the pool
Repeats until the amount of rewards are not worth the effort
Rewards can be MEVed
Users can exploit the reward mechanism
Manual review
Redo the math and make sure to take into account the time at which users joined the pool.
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.