governance -> gauges -> GaugeController.sol -> Line 190
function vote(address gauge, uint256 weight) external override whenNotPaused {
The GaugeController contract defines constants for vote delay (e.g., VOTE_DELAY
set to 10 days and MIN_VOTE_DELAY
set to 1 day), which suggest that the system is intended to enforce a minimum delay between successive votes by the same user. Although a previous audit flagged that these constants are declared but never used, the previous auditor failed to point out the implecations of this flaw.
Without vote delay enforcement, users can repeatedly cast votes in rapid succession, potentially manipulating gauge weights and disrupting fair reward distribution.
Intended Behavior:
The presence of VOTE_DELAY
(10 days) and MIN_VOTE_DELAY
(1 day) in the code and documentation indicates that the system was designed to restrict users from voting too frequently. This is crucial for maintaining stability in gauge weight allocations and ensuring that voting power is exercised judiciously.
Observed Behavior:
The vote
function does not reference or enforce any delay between votes. Although the unused constants have been noted by another auditor, the lack of an enforced vote delay means that users can cast votes consecutively without waiting.
Design Flaw and Implications:
This oversight allows users to change their votes repeatedly in a short timeframe, which can be exploited to manipulate gauge weights. Such manipulation may result in an unintended skew in reward emissions and revenue distribution, undermining the protocol’s fairness and economic stability.
Economic Impact:
Unrestricted voting frequency can allow users (or automated actors) to significantly influence gauge weights, leading to distorted reward distributions.
User Trust:
The absence of the intended vote delay may cause participants to lose confidence in the fairness and predictability of the voting mechanism.
Exploitation Risk:
Attackers could exploit rapid vote changes to repeatedly adjust gauge weights, thereby gaining an unfair advantage in the reward system.
To demonstrate the vulnerability, we deploy a dummy gauge contract (DummyGauge) so that GaugeController receives a valid gauge address
Enforce Vote Delay:
Modify the vote
function to enforce the intended delay. For example:
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.