In LibGauge::calcGaugePoints
, IGaugePointFacet::defaultGaugePointFunction
is supposed to be used as the gauge point function to calculate the gauge points when no gauge point function is provided. However, IGaugePointFacet::defaultGaugePointFunction
is never used.
In the function, the selector of IGaugePointFacet::defaultGaugePointFunction
is assigned to the variable selector
if the selector of ss.gaugePointImplementation
is 0. However, it is never used afterward.
When the function is called without providing the selector of ss.gaugePointImplementation
, it will always return the ss.gaugePoints
instead of calculating with IGaugePointFacet::defaultGaugePointFunction
as planned. This will cause the gauge point to be calculated incorrectly, and the owner of the whitelisted Lp token would receive the wrong amount of Grown stalk if IGaugePointFacet::defaultGaugePointFunction
is expected to be used to calculate the gauge point for the new Season.
Manual Review
It can be improved by replacing the ss.gaugePointImplementation.selector
in the parameter of the staticcall
function with the selector
variable.
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.