Core Contracts

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

On `BaseGauge::setBoostParameters` there is possibility that `_minBoost` becomes greater than `_maxBoost`

Summary

On BaseGauge::setBoostParameters
there is the possibility that _minBoost becomes greater than _maxBoost

Vulnerability Details

BaseGauge::setBoostParameters

/**
* @notice Updates boost calculation parameters
* @param _maxBoost Maximum boost multiplier
* @param _minBoost Minimum boost multiplier
* @param _boostWindow Time window for boost
* @dev Only callable by controller
*/
function setBoostParameters(
uint256 _maxBoost,
uint256 _minBoost,
uint256 _boostWindow
) external onlyController {
boostState.maxBoost = _maxBoost;
boostState.minBoost = _minBoost;
boostState.boostWindow = _boostWindow;
}

Impact

There should be a check that _minBoost do not become greater than _maxBoost

Tools Used

Manual

Recommendations

/**
* @notice Updates boost calculation parameters
* @param _maxBoost Maximum boost multiplier
* @param _minBoost Minimum boost multiplier
* @param _boostWindow Time window for boost
* @dev Only callable by controller
*/
function setBoostParameters(
uint256 _maxBoost,
uint256 _minBoost,
uint256 _boostWindow
) external onlyController {
+ if (_minBoost > _maxBoost) revert ErrorMessage("error message");
boostState.maxBoost = _maxBoost;
boostState.minBoost = _minBoost;
boostState.boostWindow = _boostWindow;
}
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

Support

FAQs

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