The BaseGauge::setInitialWeight can only be called by the controller address (GaugeController). This function is meant to set initial weight for the gauge. However, while the GaugeController has the necessary CONTROLLER_ROLE permissions, it lacks any implementation to actually call this function.
The `BaseGauge::setInitialWeight function
has the onlyController modifier defined as:
In BaseGauge's constructor, the controller address is granted the CONTROLLER_ROLE:
Looking at the GaugeController contract, there isn't any direct function to call setInitialWeight. Additionally, this function is not included in the IGauge interface that GaugeController uses to interact with gauges.
No mechanism exists to set initial weight for the gauge, despite the contract being designed with this intention. The setInitialWeight function becomes effectively unusable because the authorized controller has no way to call it.
Manual review
Add setInitialWeight to the IGauge interface and implement the corresponding function in GaugeController.
IGauge.sol
BaseGauge.sol
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.