Core Contracts

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

Hardcoded Emission Values Lead to Incorrect Reward Calculations

Summary

The GaugeController contract uses hardcoded values for calculating emissions in the _calculateRWAEmission and _calculateRAACEmission functions. This deviates from the intended behavior described in the documentation, which states that emissions should be implemented based on the protocol's tokenomics. As a result, the rewards distributed to stakers are misaligned with the expected values.

Affected Code: GaugeController::_calculateRWAEmission & _calculateRAACEmission

Vulnerability Details

The BaseGauge contract constructors for RWA and RAAC gauges set distinct MAX_EMISSION values:

  • RWA Gauge: MAX_MONTHLY_EMISSION = 2,500,000e18

  • RAAC Gauge: MAX_WEEKLY_EMISSION = 500,000e18

which is set to the period.emission values in each of them.

However, the GaugeController uses hardcoded values:

function _calculateRWAEmission() internal view returns (uint256) {
return 1_000_000e18; // Hardcoded
}
function _calculateRAACEmission() internal view returns (uint256) {
return 250_000e18; // Hardcoded
}

This implementation leads to incorrect reward calculations, as these hardcoded values do not reflect the intended emissions configured during gauge initialization. The documentation specifies that these calculations should be based on tokenomics, yet the implementation does not adhere to this requirement.

Root Cause

The root cause of this vulnerability is the use of fixed emission figures instead of dynamically deriving emissions from the respective gauge instances.

Comparison of Expected vs. Actual Emissions

Gauge Configured Emission Hardcoded Emission Deviation
RWA 2,500,000e18 1,000,000e18 -60%
RAAC 500,000e18 250,000e18 -50%

Impact

The hardcoded emissions cause rewards to be significantly lower than expected, resulting in:

  • Reduced staker incentives as distributed reward to gauges will be lower.

  • Misalignment with documented tokenomics.

This issue is critical, as it can distort market behavior and weaken the protocol's intended reward distribution mechanism.

Tools Used

  • Code Review

Recommendations

To resolve this issue, emissions should be calculated dynamically based on the gauge's configured maximum emission. For example:

function _calculateRWAEmission() internal view returns (uint256) {
return gauges[address(this)].typeWeight * MAX_MONTHLY_EMISSION / MAX_TYPE_WEIGHT;
}
function _calculateRAACEmission() internal view returns (uint256) {
return gauges[address(this)].typeWeight * MAX_WEEKLY_EMISSION / MAX_TYPE_WEIGHT;
}

Alternatively, the emissions can be retrieved directly from the BaseGauge contract, ensuring alignment with the protocol's tokenomics.

Updates

Lead Judging Commences

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

GaugeController uses hardcoded placeholder emission values in _calculateRWAEmission() and _calculateRAACEmission() instead of actual tokenomics-based rates

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

GaugeController uses hardcoded placeholder emission values in _calculateRWAEmission() and _calculateRAACEmission() instead of actual tokenomics-based rates

Support

FAQs

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