Core Contracts

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

The `setInitialWeight` and `updatePeriod` functions are never called by the `GaugeController` contract

Summary

The BaseGauge contract manages periods using the setInitialWeight and updatePeriod functions, which can be called only by the controller. However, these functions are never called by the GaugeController contract.

Vulnerability Details

Regular updates occur through updatePeriod which uses:

uint256 avgWeight = periodState.votingPeriod.calculateAverage(periodEnd);

Since:

  • the initial value is 0

  • updatePeriod uses the average of previous period

  • there is no other way to set a non-zero value

  • setInitialWeight is never called by the controller

This means:

  • the system starts at 0

  • calculates average of 0

  • creates new period with that 0 average

  • continues in a zero-value cycle

Impact

The TimeWeightedAverage periods in BaseGauge are not working as intended, leading to a broken cycle.

Recommendations

Ensure that the updatePeriod and setInitialWeight functions are called as intended.

Updates

Lead Judging Commences

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

`setWeeklyEmission`, `setBoostParameters`, `setEmission` and `setInitialWeight` cannot be called due to controller access control - not implemented in controller

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

`setWeeklyEmission`, `setBoostParameters`, `setEmission` and `setInitialWeight` cannot be called due to controller access control - not implemented in controller

Appeal created

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

`setWeeklyEmission`, `setBoostParameters`, `setEmission` and `setInitialWeight` cannot be called due to controller access control - not implemented in controller

GaugeController::updatePeriod doesn't call the gauge's updatePeriod function, preventing periodState.distributed from resetting and eventually causing distributeRewards to permanently fail

Support

FAQs

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

Give us feedback!