Core Contracts

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

Voting on a gauge once does not decay the vote over the periods

Summary

Users' voting power is supposed to decay over time, however if they vote for a gauge once, it will keep their original power throughout all periods. Additionally, gauge weight never goes down even when the voter withdraws their veRAAC and their power is already at 0.

Details

Upon period rollover via updatePeriod, the gauge starts a new period with its' previous weight.

function updatePeriod(address gauge) external override whenNotPaused {
Gauge storage g = gauges[gauge];
if (!g.isActive) revert GaugeNotActive();
TimeWeightedAverage.Period storage period = gaugePeriods[gauge];
uint256 duration = g.gaugeType == GaugeType.RWA ? 30 days : 7 days;
if (period.startTime == 0) {
TimeWeightedAverage.createPeriod(
period,
// Add 1 second to avoid timestamp collision
block.timestamp + 1,
duration,
0,
@> g.weight
);
return;
}
}

This is incorrect since the core design of voting escrows is the gradual decay of voting power. If a user votes once on a gauge and never re-votes, they will keep their original voting power forever. The correct implementation is to restart the gauge's weight upon each period rollover and have users vote again with their decayed power. By not enforcing gauge weight resets and a mandatory re-vote mechanism, gauge weights will be inflated forever and emissions will be split disproportionally.

Impact

Unfair reward distribution, broken core functionality

Mitigation

Upon period rollover, reset the gauge's weight to 0 so users would have to vote again with decayed power.

Updates

Lead Judging Commences

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

GaugeController doesn't decay gauge vote weights when veRAAC voting power expires, allowing users to influence reward distribution with expired voting power

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

GaugeController doesn't decay gauge vote weights when veRAAC voting power expires, allowing users to influence reward distribution with expired voting power

Support

FAQs

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

Give us feedback!