Core Contracts

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

Potential Misalignment in Period Rollover Calculation

Location

governance -> gauges -> GaugeController.sol -> Line 278

Summary

The GaugeController contract’s updatePeriod function calculates the start of the next period using a "+2" multiplier instead of the expected "+1" multiplier. This miscalculation may result in longer-than-intended periods, causing delays in reward emission updates and misalignment of the time‑weighted average tracking.

Vulnerability Details

Intended Behavior:
The design suggests that periods should roll over continuously, with the next period beginning immediately after the current one ends. Typically, a "+1" multiplier is used to calculate the start of the next period.

Observed Behavior:
The function uses the following calculation:

uint256 nextPeriodStart = ((block.timestamp / duration) + 2) * duration;

This approach adds an extra period’s worth of time (i.e., "+2" instead of "+1") to the current period’s calculation.

Implications:
Such misalignment can delay reward distribution updates and skew the time‑weighted averages used in reward calculations, potentially affecting overall protocol economics.

Impact

Reward Distribution Errors:
If periods extend longer than intended, rewards may be distributed on an unintended schedule, leading to either delayed or reduced reward emissions.

User Experience:
Users may experience unexpected delays in reward updates, reducing transparency and trust in the reward mechanism.

Economic Impact:
Misaligned periods could alter the effective emission rate per period, thereby affecting tokenomics and overall reward fairness.

Tools Used

Manual Review

Recommendations

Adjust Calculation:
If the intended behavior is a continuous rollover, modify the calculation to:

uint256 nextPeriodStart = ((block.timestamp / duration) + 1) * duration;
Updates

Lead Judging Commences

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

BaseGauge::updatePeriod uses ((currentTime / periodDuration) + 2) calculation causing entire reward periods to be skipped, resulting in permanent loss of user rewards

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

BaseGauge::updatePeriod uses ((currentTime / periodDuration) + 2) calculation causing entire reward periods to be skipped, resulting in permanent loss of user rewards

Support

FAQs

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