The increase() function calculates new voting power using userLock.amount + amount, which effectively counts the additional amount twice. This leads to incorrect minting of veRAAC tokens, as users receive more tokens than they should based on their actual lock.
increase() is implemented as follows:
Here, the _lockState.increaseLock() already updates the user's lock amount by adding the additionalAmount:
However, calculation of the new voting power uses userLock.amount + amount as the input to _votingState.calculateAndUpdatePower().
This means that userLock.amount + amount effectively counts the additional amount twice.
As a result of this redundancy, the calculation for newBias (which is used to determine how many veRAAC tokens to mint) will be based on an inflated amount. As such, user will receive more veRAAC tokens than they should, leading to an incorrect distribution of voting power.
Manual Review
The calculation for newBias should use the updated lock amount directly from the state after the increase has been applied.
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.