The _beforeSwap function and getCurrentPhase view function use inconsistent comparison operators for phase boundary checks, causing them to report different phases at exact boundary blocks.
In _beforeSwap (lines 139-145):
In getCurrentPhase (lines 197-203):
At the exact boundary block where blocksSinceLaunch == phase1Duration:
getCurrentPhase() returns Phase 2 (because 100 < 100 is false)
_beforeSwap calculates Phase 1 (because 100 <= 100 is true)
Users calling getUserRemainingLimit() or getUserCooldownEnd() at phase boundaries receive incorrect phase information:
getUserRemainingLimit() reports Phase 2 limits (e.g., 5% of liquidity)
User swaps amount within reported Phase 2 limit
_beforeSwap actually applies Phase 1 limit (e.g., 1% of liquidity)
User gets unexpected penalty fees despite following the view function's guidance
This breaks the trust model of the hook's user-facing view functions.
Likelihood: High - Occurs at every phase boundary (Phase 1→2 and Phase 2→3), predictable timing
Impact: Medium - Users suffer unexpected penalty fees when trusting view functions
Align the operators in getCurrentPhase to match _beforeSwap:
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.