Core Contracts

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

Users Can Vote on Inactive Gauges

Summary

The vote() function in GaugeController.sol lacks a validation check for gauge active status, allowing users to continue voting on gauges that the gauge admin has deactivated.

Vulnerability Details

In GaugeController.sol, while the vote() function performs several checks including gauge existence and weight validation, it fails to verify if the gauge is active:

function vote(address gauge, uint256 weight) external override whenNotPaused {
if (!isGauge(gauge)) revert GaugeNotFound();
if (weight > WEIGHT_PRECISION) revert InvalidWeight();
// Missing check: if (!gauges[gauge].isActive) revert GaugeNotActive();

The gauge admin can deactivate gauges using toggleGaugeStatus():

function toggleGaugeStatus(address gauge) external onlyGaugeAdmin {
if (!isGauge(gauge)) revert GaugeNotFound();
gauges[gauge].isActive = !gauges[gauge].isActive;
emit GaugeStatusUpdated(gauge, gauges[gauge].isActive);
}

Impact

  • Users can waste their voting power on inactive gauges

  • Skews the weight distribution system

  • Creates inconsistency between active gauge list and votable gauges

  • May lead to unintended reward distributions if gauge is reactivated

Tools Used

Manual review

Recommendations

Add an active status check in the vote() function:

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();
...
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 3 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 3 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.