In the increase function of the veRAACToken contract, the calculation of new voting power incorrectly adds the additional amount to the user’s current lock amount, even though the increase has already been applied by the increaseLock function. This results in an overestimation of the updated voting power.
The following code snippet highlights the issue:
Issue Explanation:
• Double Counting: The function increaseLock already updates the lock’s amount by adding the new tokens. Thus, adding amount again in the call to _votingState.calculateAndUpdatePower results in double counting the additional tokens.
• Incorrect Voting Power: This miscalculation leads to an inflated new voting power (i.e., newBias), which may distort governance calculations and reward distributions.
Increase amount is double each time user call for increase function.
• Governance Misrepresentation: Users may receive disproportionate voting power relative to their actual locked tokens, potentially impacting voting outcomes.
• Economic Discrepancies: Overestimated voting power could affect reward distributions and undermine the intended tokenomics of the system.
Manual
• Correct the Calculation: Update the voting power calculation to use the updated userLock.amount without adding the amount again. 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.