The _calculateReward function calculates the rewards for a guage based on the weight ratio of that particular guage.
Basically reward is proportional to guage.weight/total weight of all guages. But this differs from the reward calculation made by the _distributeToGauges fuction. In this admin function the denominator is taken from only the same types of guages. either RWA or RAAC , not all the guages.
The calculateRewar function calls the getTotalWeight function which calculates the total weight of all the guages. Not just of the total weight of that particular guage type. But when the admin calls the distributeRevenue function, it calculates the weight of only that type of guage. Further in the calculateReward function, the fraction is multiplied by the calculateRWAEmission or the _calculateRAACEmission, both of which are different and are for the different type of guages. This discrepancy causes incorrect rewards to be transferred.
Lower than expected rewards will be transferred to the guages.
manual review
calcualte only the weights of that paritcular guage type in the getTotalWeight() function
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.