Incorrect gauge reward calculation in BaseGauge
In BaseGauge, we will update users' rewards via _updateReward. When the admin distributes some reward into this gauge, we will calculate the reward rate. These rewards will be distributed to stakers in this gauge. So we need to calculate the reward per token. If you stake more, then you should get more rewards.
In earned() function, we will calculate the user's reward via users' weight * reward per token. We use the _getBaseWeight function to get this users' basic weight. The problem here is that basic weight's calculation is incorrect, we should use the staker's staking amount, but here we use the gauge's weight. So any staker's basic weight will be the same. The stakers who stake only 1 wei may get more rewards than those normal stakers.
The users' basic weight's calculation is incorrect.
Manual
Use the staker's staking amount to calculate the staker's basic 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.