Reward calculations for ve holders calculates the decayed voting power of the claimer against the total undecayed voting power of all holders, including expired ones.
_calculatePendingRewards in FeeLocker distributes accrued rewards based on the % of one user's voting power against the total voting power.
getVotingPower checks the current power of the user by taking into consideration the decay via VotingPowerLib.getCurrentPower
On the other side, getTotalVotingPower only checks the totalSupply of veRAACToken
This creates 2 issues:
Rewards can never be fully distributed since all users would have some decay. Assume that totalSupply = 100 and the sum of all decayed user balances is 80. Every user claims their rewards, yet only 80% of them will be distributed.
Users with expired locks have nothing to claim since getVotingPower(user) will return 0, however their veRAAC is in circulation and contributes to the division by totalVotingPower, thus dilluting reward distribution.
Unfair reward calculation, unexpected/weird behaviour
Complete revamp of the function is needed.
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.