In BaseGauge.sol, the _updateWeights()
function will update the weights for time-weighted calculation. The function is expected to trigger the creation of a new period only if no existing period exist. However, even if a period exists, a new period is being created instead of having its weights updated.
As seen in _updateWeights()
function, both the logic in the if and else statements are identical.
Existing period will not have its weight updated correctly and instead attempt to create a new period. In the event there is an existing active period, the else statement will fail anyway, as there is a check in TimeWeightedAverage.createPeriod()
function to ensure that no active period exists, as seen in the if statement below:
Existing period will never be able to have its weight updated.
Manual
Ensure logic for scenario whereby if period exists, _updateWeights()
function should update the period weight correctly instead of attempt to create a new period.
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.