The veRAACToken::getTotalVotingPower function returns the ERC20's totalSupply() which represents initial minted amounts without accounting for voting power decay over time. This creates a discrepancy between individual decayed voting powers (getVotingPower) and the undecayed total supply used in reward calculations.
The FeeCollector contract uses this inflated total to calculate reward shares, causing all users to receive smaller reward shares than deserved as their decayed voting powers are divided by an artificially high total as their own voting powers decay while the total remains constant.
The Governance contract uses this inflated total to calculate the quorum needed to decide on the proposal state, which would affect the outcome.
User locks 1000 RAAC for 1 year (365 days)
Initial voting power = 1000 * (365/1460) = 250 veRAAC
TotalSupply = 250 veRAAC
After 6 months:
Individual voting power decays to 125 veRAAC
TotalSupply remains 250 veRAAC
FeeCollector calculates rewards using 125/250 = 50% share instead of 125/125 = 100% valid share
Add this test to test/unit/core/tokens/veRAACToken.test.js:
High Severity
Causes systematic reward distribution errors where early users receive smaller rewards than deserved as total supply inflates
Results of quorum to decide on the state of the governance proposal would be inaccurate, leading to undesired outcomes
Track decayed total supply
For example:
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.