Function claimRewards()
in FeeCollector
assigns WHOLE value of totalDistributed
to userRewards
mapping, this leads to incorrect comparison _calculatePendingRewards
, which results in User losing rewards in the future distribution of fees.
Users can claim their accumulated rewards via claimRewards()
in FeeCollector contract.
However, the computation of pendingReward is incorrect i.e.
pendingReward()
Observe the computation of share
, it is calculated based on voting power of the user.
Next, it is compared against the mapping userRewards
which is incorrect.
Reason being, this userRewards mapping is later updated to totalDistributed
.
Meaning, for a completely new user, this would work as intended.
However, when he makes a second claim or for an old User, this would always lead to a revert.
This happens because the share(of user) would never EXCEED the old value of state variable userReward
whose value got updated to totalDistributed
in previous fee distribution.
So, although users are eligible and SHOULD be paid the pendingReward, but due to issue in the logic, they will be unable to claim any subsequent rewards after the first one.
Users will lose future rewards.
Manual
Consider using this instead:
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.