The distributeRewards
function in GaugeController
can be called multiple times by anyone, allowing malicious users to trigger multiple reward distributions to a gauge within the same period.
The distributeRewards
function lacks a time-based check between reward distributions. This means anyone can call it repeatedly to distribute rewards to a gauge multiple times, even if the gauge has already received rewards for the current period.
Key issues:
No minimum time delay between reward distributions
No tracking of last reward distribution time
Function is callable by any address
Each call calculates and distributes new rewards
This vulnerability allows excessive rewards to be distributed to gauges:
Gauges receive more rewards than intended by the protocol's tokenomics
Token emissions exceed planned schedule
Economic impact on token value and protocol sustainability
Unfair advantage to gauges that get called more frequently
Manual review
Add the following test case to the test/unit/core/governance/gauges/GaugeController.test.js
file:
Add time-based checks to prevent frequent reward distributions:
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.