Core Contracts

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

emission can only be decreased, it can never be increased

BaseGauge::setEmission function is intended to set the emission cap for the period and can only be called by the controller address.

Hovewer, in its current form, emission cannot be increased, it can only be decreased. Not even the controller can change that.

/**
* @notice Sets emission cap for the period
* @param emission New emission amount
*/
function setEmission(uint256 emission) external onlyController {
if (emission > periodState.emission) revert RewardCapExceeded();
periodState.emission = emission;
emit EmissionUpdated(emission);
}

If the controller tries to pass a higher emission value than the previous emission value, the function reverts. So, emission can only be decreased in cascade, and never can it be increased if it was decreased in a point. This is quite counter-intuitive.

Now, this might be a design choice, but I highly doubt it, for if that was the case, the function would be called something like decreaseEmissionCap or similar.

Recommendation

Either change the function name if this was intended, or change the code so that the controller can set the emission as required.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 month ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
inallhonesty Lead Judge about 1 month ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Appeal created

inallhonesty Lead Judge 28 days ago
Submission Judgement Published
Validated
Assigned finding tags:

BaseGuage::setEmission can be configured only to lower values limiting the

Support

FAQs

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