Core Contracts

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

The `GaugeController::vote` function fails to verify if a gauge is currently active or not

Summary

The GaugeController::vote function fails to verify if a gauge is currently active before accepting votes, allowing users to allocate voting weight to paused or deactivated gauges. This violates the protocol's intended governance controls and could lead to distorted reward distributions.

Vulnerability Details

The function checks gauge existence via isGauge() (which only verifies lastUpdateTime != 0) Fails to check the isActive status flag that indicates operational status

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

we have a struct that show Whether gauge is currently active or not but if auser want to vote to a gauge there is no check if this guage is active or not.

struct Gauge {
uint256 weight;
uint256 typeWeight;
uint256 lastUpdateTime;
GaugeType gaugeType;
@>> bool isActive;
uint256 lastRewardTime;
}

Impact

  • Attackers can inflate weights of deactivated gauges

  • If reactivated later, these gauges immediately receive disproportionate rewards

  • Voting power becomes diluted across inactive/active gauges

  • Rewards calculations via getTotalWeight() become inaccurate during gauge state transitions

  • Emergency shutdowns lose effectiveness as gauge weights remain mutable

Tools Used

Manual review

Recommendations

function vote(address gauge, uint256 weight) external override whenNotPaused {
if (!isGauge(gauge)) revert GaugeNotFound();
+ if(!gauges[gauge].isActive) revert GaugeNotActive();
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);
}
Updates

Lead Judging Commences

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

GaugeController::vote allows users to waste voting power on inactive gauges that don't receive rewards

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

GaugeController::vote allows users to waste voting power on inactive gauges that don't receive rewards

Support

FAQs

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