GaugeController doesnt keep track of user's weight used to vote for gauges. Users can vote all gauges with same maxWeight.
Users can call GaugeCOntroller::vote to allocate a weight percentage of their votingPower to desired gauge.
In _updateGaugeWeight(), the old oldWeight * votingPower / WEIGHT_PRECISION is subtracted then the new weight is added to gauge's weight : newWeight * votingPower / WEIGHT_PRECISION
Users can pass max weight = WEIGHT_PRECISION = 10_000 to vote() function and vote all gauges with their entire voting power.
Let's take the following example:
alice and bob have same amount of votingPower, 99k;
alice wants to allocate 100% of her voting power to gaugeA; she calls vote(gaugeA, 10_000) and gaugeA.weight is set to 99k.
bob vote both gauges with 100% of his voting power: gaugeB.weight is set to 99k, gaugeA.weight is updated to 198k.
when rewards are distributed, gaugeA receive 1/3 of the rewards and gaugeB receives 2/3 rewards even if both users had same amount of votingPower.
Users can allocate their voting power to all gauges.
Keep track of weight amount consumed by each users. Do not allow user's total weight to surpass WEIGHT_PRECISION = 10_000.
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.