Core Contracts

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

Emission limits not enforced in `setMonthlyEmission()` and `setWeeklyEmission()` could lead to inflation

Summary

Missing sanity checks in RWAGauge.setMonthlyEmission() and RAACGauge.setWeeklyEmission()

Vulnerability Details

The setMonthlyEmission() function in RWAGauge.sol and the setWeeklyEmission() function in RAACGauge.sol do not enforce the maximum emission limits specified in the contracts. This could lead to setting emissions higher than intended, potentially causing token inflation or other unintended economic impacts.

In RWAGauge.sol, the setMonthlyEmission() function should ensure that the _monthlyEmission parameter is less than or equal to MAX_MONTHLY_EMISSION (2.5 million tokens). Similarly, in RAACGauge.sol, the setWeeklyEmission() function should ensure that the _weeklyEmission parameter is less than or equal to MAX_WEEKLY_EMISSION (500,000 tokens).

Impact

Inflation, token dilution: Without these checks, the emission values can be set to exceed the intended limits, which could lead to excessive token distribution and potential economic instability within the protocol.

Tools Used

Manual Review

Recommendations

Add conditional checks in both setMonthlyEmission() and setWeeklyEmission() to ensure that the emission values do not exceed their respective maximum limits. For example:

function setMonthlyEmission(uint256 monthlyEmission) external onlyController {
+ require(monthlyEmission <= MAX_MONTHLY_EMISSION, "Emission exceeds maximum limit");
periodState.emission = monthlyEmission;
emit EmissionUpdated(monthlyEmission);
}
function setWeeklyEmission(uint256 weeklyEmission) external onlyController {
+ require(weeklyEmission <= MAX_WEEKLY_EMISSION, "Emission exceeds maximum limit");
periodState.emission = weeklyEmission;
emit EmissionUpdated(weeklyEmission);
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Appeal created

0xcryptanu Submitter
7 months ago
inallhonesty Lead Judge
7 months ago
inallhonesty Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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

Give us feedback!