Users are allowed to cast votes on inactive gauges which are useless and should be checked to prevent.
In GaugeController::vote
, the function only verifies if a gauge exists via isGauge() but doesn't check if the gauge is active. However, throughout the rest of the contract, inactive gauges are excluded from key operations:
This creates an inconsistency with other functions that do check for active status:
distributeRewards() requires isActive
getTotalWeight() only counts active gauges
_distributeToGauges() only distributes to active gauges
The votes will update the gauge's weight but have no effect on reward distribution
This creates a confusing user experience where votes appear successful but have no actual impact
Users' voting power is locked into gauges that don't participate in the system
Foundry
Inside of vote
add the following check:
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.