Incorrect rewards calculation in GaugeController::_calculateReward
In GaugeController, we will distribute gauge rewards. We will distribute 1000000 * 1018 monthly rewards to the RWA gauges. And distribute 250000 * 1018 rewards to the RAAC gauges.
When we calculate one gauge's rewards amount, we should calculate the weight ratio in the same gauge type. For example, if gauge A is one RWA gauge, and gauge A' weight is 50% of all RWA gauge weights. Then gauge A will receive 1000000 * 10**18 / 2
rewards.
The problem here is that we use the incorrect calculation (periodEmission * gaugeShare * typeShare) / (WEIGHT_PRECISION * WEIGHT_PRECISION)
. Based on the above example, assume the RWA gauge's weight is 50% of the total gauges: the calculated rewards for gauge A equal 1000000 * 10**18 * 2500 * 5000 / (10000 * 10000)
= 1000000 * 10**18 / 8
.
The reward distribution calculation is incorrect. This will cause that users will get less rewards than expected.
Manual
Use the correct formula for this reward calculation.
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.