The GaugeController's
vote
function tracks the votingPower of the user incorrectly which will result in returning voting power > than the user has
The vote in the GaugeController
is for the core voting functionality for gauge weights, what it does is that updates the gauge's weights based on the voting power of the user However the way it tracks or fetches the voting power of the user is incorrect as is uses the balanceOf
of the user's veRAACTokens which he was minted at the time of locking his raacTokens. But the issue here is that the votingPower
decreases linearly by time and after a particular time passes, the votingPower will go down to 0 and that is tracked in the veRAACToken and the fact that here the fetching of voting power is done through the balanceOf function is wrong and that is because this balanceOf() will always return the amount of tokens that user locked or minted at the time of locking his raacTokens. This is not the votingPower as the votingPower of the user is computed with a different function in the veRAACToken i.e getVotingPower And due to the computation of voting power being done by the balanceOf function the user can also call the vote even when his voting power has deceases and gone to 0 because of the lock expiry or end of duration. That is because the balanceOf will only return 0 when the user will call the withdraw function as this function is supposed to burn the tokens that the user got minted at the time of locking. The user might decide to never call the withdraw function and doing this he will freely be able to vote even though his voting power is 0. And if balOf will be used in the vote
function this is what will be returned instead of the real votingPower that the user actually have
High impact as the user will be able to vote on gauge weights irrespective of the fact that if the voting is 0 or not .
Manual Review
Add this line to the function and remove this:
+ uint256 votingPower = veRAACToken.getVotingPower(msg.sender);
- uint256 votingPower = veRAACToken.balanceOf(msg.sender);
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.