Core Contracts

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

user can continuously update their votes, shifting weight between gauges within a single block to game the reward distribution system

The vote function allows users to allocate their voting power (veRAACToken balance) to a gauge, influencing reward distribution. However, the contract does not properly enforce a voting delay, allowing users to rapidly change votes to manipulate gauge weights unfairly. While the contract defines a VOTE_DELAY constant (10 days), it fails to check whether the required delay has passed since the user's last vote before allowing a new vote. The function:

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);
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);
}

Since there is no check for lastVoteTime[msg.sender], a user can continuously update their votes, shifting weight between gauges within a single block to game the reward distribution system, allocating emissions to themselves unfairly.

Impact:

The primary impact is that a malicious user can manipulate reward emissions by frequently reallocating votes, leading to an unfair distribution of rewards and governance power, disrupting the incentive mechanism.

Mitigation:

Enforce the voting delay by adding a time check in vote before allowing a new vote:

if (block.timestamp < lastVoteTime[msg.sender] + VOTE_DELAY) revert VoteCooldownActive();
lastVoteTime[msg.sender] = block.timestamp;
Updates

Lead Judging Commences

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

GaugeController::vote never enforces VOTE_DELAY or updates lastVoteTime, allowing users to spam votes and manipulate gauge weights without waiting

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

GaugeController::vote never enforces VOTE_DELAY or updates lastVoteTime, allowing users to spam votes and manipulate gauge weights without waiting

Support

FAQs

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

Give us feedback!