The reward distribution mechanism in the distributeRevenue() function DoS condition. This occurs when one gauge reaches its emission limit, causing the entire distribution process to fail and preventing other eligible gauges from receiving their rewards.
The notifyRewardAmount() function in the BaseGauge contract includes a check that reverts the transaction if the total amount of rewards being distributed exceeds the gauge's emission limit:
On the other hand, the _distributeRevenue() function loops through all gauges of the specified type and calls notifyRewardAmount() for each gauge with its calculated share of the total rewards.
However, this method does not check for the gauge's limit before notifying contract of reward amount.
If any gauge has already reached its emission limit, the call to notifyRewardAmount() will revert, causing the entire transaction to fail. This means that even if other gauges are eligible to receive rewards, they will not get them due to the failure of the transaction.
Manual Review
Modify the _distributeToGauges() function to include a check before calling notifyRewardAmount(). Specifically, verify whether the gauge can accept the additional rewards without exceeding its emission limit:
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.