GaugeController::setTypeWeight allows sum of gauge weights percentages be more than 100% leading to reward distribution inconsistencies
GaugeController::setTypeWeight checks that weight for a GaugeType is not greather than 100% (MAX_TYPE_WEIGHT = 10000):
However, it allows sum of gauge weights percentages be more than 100% leading to reward distribution inconsistencies
The following PoC shows the issue described below.
RWA type is set to 100% and RAAC type is set to 99%
GaugeController allows setting sum of weights more than 100%
Save the following code in test/unit/core/governance/gauges/GaugeController.test.js under "Weight Management" section:
Start node and Execute test:
Setting sum of gauge weights percentages be more than 100% leads to reward distribution inconsistencies
Manual Review
Implement a conditional to check that sum of weights percentages is not greather than 100%
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.