The _boostState.totalVotingPower is set to a stale total supply value, which does not account for the new tokens being minted for the current lock.
In the lock() and increase() functions, the _updateBoostState() function is invoked before the new veRAAC tokens are minted.
This means that when _updateBoostState() accesses totalSupply(), it retrieves the total supply of veRAAC tokens before the new tokens from the current locking operation are added to the total supply.
As a result, the value of _boostState.totalVotingPower is based on an outdated total supply, which does not reflect the new tokens that are about to be minted.
The contract state is left in an inconsistent state that do not accurately reflect the real status of things.
For example:
getBoostState() is used to retrieve the boost state as follows:
The returned totalVotingPower is based on an outdated total supply, which is stale. This is is misleading and depending on the usecase, may result in erroneous outcome.
Manual Review
The _updateBoostState() function should be called after the minting of new tokens in both the lock() and increase() functions.
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.