We update the userRewards[user]
incorrectly. This will lead that veRAAC holders will lose some rewards.
In FeeCollector, the collected fees will be distributed periodically. One part of collected fees will be distributed to the veRAAC holders. And the veRAAC holders can claim some rewards according to their veRAAC token amount they hold via claimRewards().
The problem happens in claimRewards
. In claimRewards, we will calculate the related rewards for the user and set the claimed amount into userRewards[user]
.When the user tries to claim rewards for a second time, we will deduct the userRewards[user]
to get the available rewards for this user.
The problem is that we should set claimed rewards to userRewards[user]
, not totalDistributed
. This will cause that users may fail to claim some expected rewrads.
For example:
The distributor role distributes 1000 RAAC token to all veRAAC holders.
Alice holds 10% veRAAC, so Alice can claim 100 RAAC. Now userRewards[Alice]
is set to 1000.
The distributor role distributes another 1000 RAAC token to all veRAAC holders in the second round.
Alice should claim another 100 RAAC token. However, alice's claim will be reverted because the calculation share - userRewards[user]
will be reverted.
veRAAC holders will fail to claim some expected rewards.
Manual
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.