Description:
The FeeCollector::claimRewards
function is designed to allow users to claim their accumulated rewards. It calculates the pending reward amount for the given user
and transfers it to them. However, instead of updating userRewards[user]
with the actual claimed pendingReward
, the function mistakenly assigns totalDistributed
to userRewards[user]
.
Since totalDistributed
is incremented by shares[0]
(representing the total fees distributed to veRAAC holders), this incorrect assignment leads to inaccurate tracking of individual user rewards. The function should instead update userRewards[user]
with the exact amount the user has claimed.
Impact:
This miscalculation results in an incorrect accounting of user rewards. Instead of accurately reflecting the rewards claimed by a user, userRewards[user]
will store the total distributed fees across the protocol. This could cause issues in reward tracking, leading to inconsistencies in future reward claims and potential over- or under-distribution of rewards.
Proof of Concept:
Recommended Mitigation:
Replace the incorrect assignment with the correct logic to store the actual claimed reward amount in userRewards[user]
:
This change ensures that userRewards[user]
properly reflects the amount of rewards claimed by the user, maintaining accurate reward distribution tracking.
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.