The GaugeController
contract includes a state variable, MIN_VOTE_WEIGHT
(set to 100, representing a 1% minimum vote), but the vote
function does not enforce this minimum weight when users cast their votes. This oversight allows vote weights below the intended threshold, leading to potential manipulation and unintended voting behavior in the gauge weight distribution.
Affected Function:
Issue:
The vote
function fails to ensure that the vote weight is at least MIN_VOTE_WEIGHT
(100). This allows users to submit votes with weights below the intended minimum, which could distort the gauge weight calculations and lead to inaccurate distributions of rewards.
Inaccurate Gauge Weight Calculation:
Allowing votes with insufficient weight can result in a distorted gauge weight distribution, affecting the fairness and accuracy of the system.
Potential for Manipulation:
Without this check, malicious users could cast multiple votes with minimal weights, diminishing the influence of legitimate votes and manipulating the gauge weight distribution.
Manual Code Review
Enforce Minimum Vote Weight:
Add a validation in the vote
function to ensure that the provided weight meets or exceeds the minimum threshold. For instance:
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.