userRewards[user] is not updated correctly in function claimRewards(), which will make the user get less rewards.
In function FeeCollector.sol#claimRewards(), pendingReward is culculated and transferred to the user. However, userRewards[user] is then updated to 'totalDistributed'. Infact, there may be quite a lot of users, totalDistributed is the Distributed amount of all users, not the Distributed value of the current user.
Please refer to the following steps for POC:
1, There are 3 users, A, B, and C, voting power for A is 20%, voting power for B is 30%, voting power for C is 50%,
2, totalDistributed now is 100, userA claimRewards, will get 20, then update userRewards[A] to 100.
3, later, totalDistributed is 200, userA claimRewards, in function _calculatePendingRewards(), share = 200 * 20% = 40, 40 then is compared to userRewards[A], which is 100, since 40 < 100, _calculatePendingRewards() will return 0, userA will not get any rewards.
users will get less rewards then expected.
manually review
In function claimRewards(), update userRewards[user] to userRewards[user] + pendingReward.
userRewards[user] = userRewards[user] + 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.