The claimRewards function in the FeeCollector contract incorrectly resets the user's reward balance to totalDistributed instead of the pendingReward. This miscalculation can lead to users claiming rewards multiple times without accurately reflecting their actual earned rewards, allowing for potential exploitation.
User calls FeeCollector::claimRewards with their address.
The function calculates pendingReward correctly.
Instead of setting userRewards[user] to pendingReward, it sets it to totalDistributed.
The user can then call claimRewards again, potentially receiving rewards they have not actually earned.
Relevant code snippet:
Correct the reward assignment: Update the line to set the user's rewards to the correct pendingReward.
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.