The getCurrentPhase() view function and _beforeSwap() internal function use different comparison operators for phase boundary checks:
In _beforeSwap() (actual swap logic):
In getCurrentPhase() (view function):
At exactly blocksSinceLaunch == phase1Duration:
_beforeSwap(): phase1Duration <= phase1Duration → TRUE → Phase 1
getCurrentPhase(): phase1Duration < phase1Duration → FALSE → Phase 2
Impact: MEDIUM - Users and frontends querying getCurrentPhase() see Phase 2, but swaps execute with Phase 1 rules. getUserRemainingLimit() and getUserCooldownEnd() also return incorrect values at boundary blocks.
Likelihood: HIGH - This occurs deterministically at every phase transition boundary block.
Align comparison operators - change view function to use <=:
Describe the normal behavior in one or more sentences
Explain the specific issue or problem in one or more sentences
Likelihood:
Reason 1 // Describe WHEN this will occur (avoid using "if" statements)
Reason 2
Impact:
Impact 1
Impact 2
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.
The contest is complete and the rewards are being distributed.