The claimRewards function in the FeeCollector contract contains a critical flaw where it sets the userRewards[user] to totalDistributed instead of incrementing it by the pendingReward amount. This incorrect assignment can lead to scenarios where users experience asset losses when they attempt to claim rewards a second time, as their rewards are improperly tracked
When a user claims rewards, the function resets their userRewards to the total amount distributed rather than accumulating the newly claimed rewards. This can result in userRewards[user] reflecting a value that is greater than what the user has actually earned.
The impact of this vulnerability is significant, as it may lead to users not receiving the correct rewards they are entitled to, causing economic loss and undermining user trust in the contract.
Modify the implementation to accumulate pending rewards correctly, ensuring accurate tracking of user 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.