Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: medium
Valid

Voting on a gauge uses undecayed voting power

Summary

Title

Details

Whenever a user calls vote to vote on gauge emissions, the method checks their veRAACToken balance instead of their voting power which is supposed to decay as time passes.

function vote(address gauge, uint256 weight) external override whenNotPaused {
if (!isGauge(gauge)) revert GaugeNotFound();
if (weight > WEIGHT_PRECISION) revert InvalidWeight();
uint256 votingPower = veRAACToken.balanceOf(msg.sender); // @audit-issue this does not account decay
if (votingPower == 0) revert NoVotingPower();
uint256 oldWeight = userGaugeVotes[msg.sender][gauge];
userGaugeVotes[msg.sender][gauge] = weight;
_updateGaugeWeight(gauge, oldWeight, weight, votingPower);
emit WeightUpdated(gauge, oldWeight, weight);
}

All gauge votes will always count the user's max voting power which they should have only at the beginning of the lock. Users will have excessive voting power for the entire duration of their lock and exert max power votes even in the last days of their lock which goes against the entire voting escrow model. User who just locked X tokens for 2 years will have less power in gauge voting than someone who locked for 4 years and is having a week left till their lock expires. Unfair gauge votes leads to unfair distribution of emissions.

Additionally, users with expired locks will also be able to vote on gauges since they still hold veRAAC.

Impact

Broken functionality, unfair vote and reward distribution

Mitigation

Use getCurrentPower from the VotingPowerLib instead of veRAACToken balance.

Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Validated
Assigned finding tags:

BaseGauge::_applyBoost, GaugeController::vote, BoostController::calculateBoost use balanceOf() instead of getVotingPower() for vote-escrow tokens, negating time-decay mechanism

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!