The _getBaseWeight
function in the BaseGauge contract accepts an account parameter but doesn't use it when calculating the base weight. Instead, it returns the gauge weight without accounting for the specific user, which could lead to incorrect reward calculations and distribution.
In the BaseGauge
contract, the _getBaseWeight function has the following implementation:
This function receives an account parameter but ignores it entirely, returning only the global gauge weight. This presents a serious issue as the function is designed to provide user-specific weight information but fails to do so.
The function is virtual and intended to be overridden by child contracts, but the contracts RAACGauge
and RWAGauge
.
This function is used in getUserWeight
which is used in the earned
function, this means all users may receive the same base weight regardless of their individual contributions or balances.
this breaks the financial accounting of the Gauge system as high-contributing users might receive the same rewards as low-contributing users, undermining the economic incentives of the protocol.
Manual review
Modify the _getBaseWeight
function to incorporate user-specific 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.