The BaseGauge contract's _getBaseWeight
function incorrectly returns the gauge's weight instead of the user's account weight, causing reward calculations to be based on incorrect weights and leading to improper reward distributions.
In the BaseGauge contract:
The issue occurs because:
_getBaseWeight
ignores its account
parameter
Returns gauge contract's weight instead of account-specific weight
This incorrect weight is used in reward calculations
All users' rewards are calculated using the same base weight
Incorrect reward distribution to all users
Users receive rewards based on gauge weight rather than individual weights
Breaks the intended reward distribution mechanism
Economic impact on user rewards
Potential for unfair reward allocations
Manual code review
Use account parameter to get correct weight in _getBaseWeight
.
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.