updatePeriod will skip periods
updatePeriod will skip periods as his newly created one will start 2 weeks later.
https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/governance/gauges/BaseGauge.sol#L452
That is due to the +2 instead of +1. The different can be easily seen when compared to its constructor:
Example:
Periods start from Monday and last up to Sunday
updatePeriod is called on a Thursday and the new period is set to start Monday, not the next week, but the one after that, 10 days later...
Next week will be empty with no period
updatePeriod will skip one period
Internal accounting will be messed up
The function does not work if connected with the GaugeController (due to a another bug described in another report), however if connected to admin address or another controller it will still be faulty.
Manual review
Change the math to
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.