_calculatePendingRewards compares totalsSupply to decayed bias, lowering rewards significantly
To calculate the rewards _calculatePendingRewards uses users voting power and the total voting power
https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/collectors/FeeCollector.sol#L479
However the issue is that these 2 are 2 very different variables:
getTotalVotingPower is the total bias without decay, as token are minted based on the initial bias (which doesn't factor the linear decay):
https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/tokens/veRAACToken.sol#L212
But getVotingPower accounts for the decay
https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/tokens/veRAACToken.sol#L426
https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/libraries/governance/VotingPowerLib.sol#L193
This means that the 2 are gonna be wrongly compared, which would lead to stuck rewards as the total combined biases factoring decay (getVotingPower for all users) will always be less then the total voting power not factoring decay (getTotalVotingPower).
Example
There are 10k tokens, divided by 2 users where both have minted for 2 years and it's currently year 1
Both have balance of 5k tokens, and the totalSupply is 10k
However they both have voting power of 2.5k as 50% of the lock has already decayed
Only 50% of the rewards will be claimable as
Less rewards will be distributed
Funds will be bricked
Manual review
Use a different approach for reward distribution.
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.