Core Contracts

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

setEmission() inside BaseGauge.sol can never be called since GaugeController makes no call to it

Description

setEmission() has the onlyController modifier and as can be seen in the constructor, _controller is meant to point to the cotroller contract i.e. GaugeController.sol:

/**
* @notice Initializes the gauge contract
* @param _rewardToken Address of reward token
* @param _stakingToken Address of staking token
@--> * @param _controller Address of controller contract
* @param _maxEmission Maximum emission amount
* @param _periodDuration Duration of the period
*/
constructor(
address _rewardToken,
address _stakingToken,
address _controller,
uint256 _maxEmission,
uint256 _periodDuration
) {
rewardToken = IERC20(_rewardToken);
stakingToken = IERC20(_stakingToken);
controller = _controller;
// Initialize roles
_grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
@--> _grantRole(CONTROLLER_ROLE, _controller);
// ... Rest of the code

However GaugeController.sol has no function which can call setEmission().

Impact

The emission cap can't be updated in BaseGauge.sol.

Updates

Lead Judging Commences

inallhonesty Lead Judge 10 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 10 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

Support

FAQs

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

Give us feedback!