The FeeCollector contract’s claimRewards function is designed to calculate and transfer accumulated rewards to users based on their voting power. However, it allows any address to trigger a reward claim on behalf of any user without strict access control. While this does not directly misdirect funds, the open nature of the function can lead to unintended or premature claims that disrupt the expected reward accumulation process for users.
In the current implementation, the claimRewards function is defined as follows:
A key observation is that this function accepts an arbitrary user address and sends rewards to that address. There is no requirement that msg.sender equals user. In practice, this means that any actor can trigger a reward claim on behalf of any user.
The vulnerability lies in the lack of access control on the claim trigger, allowing third parties to force the reward claiming process for users without their explicit initiation.
While the funds are always transferred to the intended recipient and cannot be stolen directly, the open claim functionality undermines the expected user experience. Users might be surprised by the timing of their reward resets if third parties trigger claims on their behalf.
Manual code review
Modify the claimRewards function to ensure that only the user for whom the rewards are being claimed can trigger the claim. For example, require that msg.sender == user.
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.