The FeeCollector::claimRewards can be called by anyone and will transfer the rewards to the user.
But the distribution is actually Time-Weighted. This approach incentivizes long-term participation and discourages short-term speculation.
Now let's say the user is willing to claim rewards after a long time so that he gets a good amount of rewards.
But a malicious actor can call FeeCollector::claimRewards with his address which will claim the amount and transfer it to the user
Here the actual user lost funds,
As in the claiming calculation, it calculates uint256 timeDelta = timestamp - point.timestamp; .
It calculates timeDelta between the current time and the creation time (point.timestamp).
So the more will be current time the more he gets.
(this is just an example) Even let's say he can claim the amount again after claiming this time, in this scenario, he also loses funds as the calculation starting time will be from the last claimed time. His time gets reset.
The claimRewards call _calculatePendingRewards
_calculatePendingRewards call veRAACToken.getVotingPower(user) which call _votingState.getCurrentPower(account, block.timestamp) of VotingPowerLib::getCurrentPower.
On VotingPowerLib::getCurrentPower it then calculates timeDelta and multiply it.
The user aims to call claimRewards after a longer time but anybody can call any user's address and sent a claim for them. As a result the user loss funds as he was aiming to claim rewards at a later time for a bigger amount.
Manual review
Add check that the msg.sender is the actual owner of the address 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.