The claimRewards function in the FeeCollector contract incorrectly updates the userRewards[user] mapping by setting it to totalDistributed instead of properly accounting for the rewards already claimed by the user. This leads to an incorrect calculation of pending rewards and potential loss of user rewards.
The claimRewards function is responsible for distributing accumulated rewards to users based on their voting power. However, it incorrectly sets userRewards[user] = totalDistributed instead of adding the pendingReward amount to userRewards[user]. This results in an inaccurate update of user rewards, potentially preventing users from receiving their full reward in the future.
Modify the claimRewards function as follows:
Users receive fewer rewards than they are entitled to in the future.
Some rewards may become unclaimable due to incorrect tracking of claimed amounts.
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.