When updating reward state for an account, _updateReward()
function of the gauge is invoked.
earned()
function is responsible for calculating user's rewards.
However, getUserWeight()
returns the weight of a gauge instead of user's weight.
The code comments of the _getBaseWeight()
function state that it must be implemented by the child contract, however both RAACGauge and RWAGauge do not overwrite it making the rewards accounting incorrect.
Because gauge's weight is used instead of user's weight, the rewards accounting is broken and user can claim more rewards than he should.
Implement _getBaseWeight()
function in RAACGauge and RWAGauge so it returns user's weight.
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.