A malicious user can spam the permissionless GaugeController::distributeRewards function until the gauge's emission cap is reached. This prevents GaugeController::distributeRevenue from executing, causing it to revert. Consequently, the gauge's rewardRate can no longer be updated and may remain at its lowest possible value.
The GaugeController::_calculateReward is used by distributeRewards() to determine the value to distribute to a particular gauge.
_calculateRAACEmission() returns a fixed 250000e18.
The RAACGauge emission cap is set 500000e18 upon contract creation.
If gaugeShare is 1 wei, _calculateReward() returns 125000e18.
Within four calls to distributeRewards(), the emission cap is reached.
When distributeRewards() is called, BaseGauge::notifyRewardAmount updates the rewardRate:
The notifyReward() function enforces the emission cap:
The rewardRate is calculated by dividing the amount distributed to the gauge by the period duration. In the case that the gauge has 1 wei worth of weight the amount will be minimal 125000e18.
Once the emission cap is reached the rewardRate can no longer be updated and will stay at the lowest amount possible.
Since this function will revert if the emission cap is reached the GaugeController::distributeRevenue will be DoSed.
The issue can cause a DoS to the reward distribution across the gauges and disrupts the rewarding functionality as the attacker can easily make a gauge to reach its emission cap and further transactions to update the reward rate will be reverted
Manual Research, VSCode
To prevent abuse, GaugeController::distributeReward can be restricted to trusted actors only.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.