The boost state's total voting power is incorrectly stored due to updating it before minting/burning which means rewards boost calculations will always work with outdated and incorrect values.
When users lock RAAC tokens for veRAAC tokens or increase their existing lock, an update to the global boost state is invoked. The _updateBoostState() function does as the name suggests and updates some important values:
Namely the votingPower, totalVotingPower and totalWeight. Now if we go and take a look at lock(), we can see that the function is called before the minting of new veRAAC tokens is done:
Which means that the boost state's totalVotingPower will always be updated with the wrong amount of outdated totalSupply(). This also happens in increase():
The global boost state is an important parameter in relation to "Provides boost calculations for rewards". Due to this issue in lock() and increase(), the total voting power will always be outdated and incorrect which will render all rewards calculations based on the booststate incorrect.
Manual Review
Update the boost state at the end of the function flow after adjusting lock, checkpoint, votingstate and any minting/burning of tokens.
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.