The calculateRaacRewards function is used in both withdraw and getPendingRewards to determine a user's RAAC token rewards. However, it fails to account for deposit timing, allowing users to manipulate withdrawals to maximize rewards unfairly.
calculateRaacRewardswithdraw(uint256 deCRVUSDAmount): Calls calculateRaacRewards(msg.sender) before transferring RAAC rewards to the user. A user can deposit shortly before withdrawal to increase their reward share.
getPendingRewards(address user): Relies on calculateRaacRewards(user) to show pending rewards, which can be misleading due to the lack of deposit duration tracking.
Exploitable Reward Calculation: Users can deposit large amounts right before calling withdraw to claim disproportionately high RAAC rewards, then withdraw immediately.
No Reward Vesting or Duration Tracking: Rewards are allocated solely based on the snapshot of deposits at the time of calculation, rather than over a fair duration.
Unfair to Long-Term Depositors: Users who maintain deposits for a longer time may receive fewer rewards compared to those who game the system by depositing just before withdrawal.
Manual Review
Implement Time-Weighted Rewards: Modify calculateRaacRewards to account for how long a deposit has been in the pool, rather than just the deposit size at the time of calculation.
Introduce a Vesting Period: Ensure rewards accrue gradually over time, preventing instant reward claims from short-term deposits.
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.