A miscalculation in reward tracking will cause a loss of rewards for legitimate users as the protocol incorrectly sets user rewards to total distributed amount instead of claimed amount.
In FeeCollector.sol the reward tracking mechanism incorrectly updates userRewards[user] to totalDistributed instead of adding the claimed amount, causing users to lose their rightful rewards in subsequent distributions.
The _calculatePendingRewards() function calculates rewards as follows:
The claim function incorrectly updates the user's reward tracking:
Users will lose portions of their rightful rewards in subsequent distributions. For example:
Initial distribution: totalDistributed = 1e18
User with 10% voting power claims 0.1e18 rewards but userRewards[user] is set to 1e18
Additional distribution increases totalDistributed to 2e18
User's new claim will return 0 since userRewards[user] (1e18) is larger than their share (0.2e18)
Update the reward tracking to add claimed amount instead of setting to total distributed:
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.