Core Contracts

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

Revenue is not sent to gauges when rewards are distributed.

Summary

When GaugeController distributes revenue to gauges it does not send and tokens to these contracts.

Vulnerability Details

To distribute the rewards to gauges the distributeRevenue function is used. During this function call there isn't implemented any transfer of the tokens.

/**
* @notice Distributes revenue between veToken holders and gauges
* @dev Only callable by emergency admin
* @param gaugeType Type of gauge for distribution
* @param amount Amount to distribute
*/
function distributeRevenue(
GaugeType gaugeType,
uint256 amount
) external onlyRole(EMERGENCY_ADMIN) whenNotPaused {
if (amount == 0) revert InvalidAmount();
uint256 veRAACShare = amount * 80 / 100; // 80% to veRAAC holders
uint256 performanceShare = amount * 20 / 100; // 20% performance fee
revenueShares[gaugeType] += veRAACShare;
_distributeToGauges(gaugeType, veRAACShare);
emit RevenueDistributed(gaugeType, amount, veRAACShare, performanceShare);
}

It is expected that this function should send rewards to the gauges. The comments above the function state that, it distributes revenue between veToken holders and gauges.

notifyRewardAmount function in BaseGauge expects direct tranfer of tokens but it is not done using distributeRevenue or any other function called during this function call.

function notifyRewardAmount(uint256 amount) external override onlyController updateReward(address(0)) {
if (amount > periodState.emission) revert RewardCapExceeded();
rewardRate = notifyReward(periodState, amount, periodState.emission, getPeriodDuration());
periodState.distributed += amount;
uint256 balance = rewardToken.balanceOf(address(this));
if (rewardRate * getPeriodDuration() > balance) {
revert InsufficientRewardBalance();
}
lastUpdateTime = block.timestamp;
emit RewardNotified(amount);
}

Impact

Rewards are not sent to Gauges which prevents rewards distribution. Users will not receive the rewards which leads to loss of funds.

Tools Used

Manual Review, Hardhat

Recommendations

Send tokens to Gauge during distributeRevenue function call.

Updates

Lead Judging Commences

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

GaugeController notifies gauges of rewards without transferring tokens in both distributeRewards and _distributeToGauges functions, breaking reward distribution

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

GaugeController notifies gauges of rewards without transferring tokens in both distributeRewards and _distributeToGauges functions, breaking reward distribution

Support

FAQs

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