The _resetPerAddressTracking() function is intended to clear per-user tracking data when phases transition (Phase 1→2 or Phase 2→3). However, the function only resets mappings for address(0) instead of actual user addresses, causing user swap limits and cooldowns to incorrectly persist across phases.
Expected behavior: When the protocol transitions between phases, each user should receive fresh tracking: reset swap amounts and cooldown timers appropriate for the new phase.
Actual behavior: User tracking data (addressSwappedAmount, addressLastSwapBlock) accumulates indefinitely across all phases, defeating the phased anti-bot protection mechanism.
This function is called in _beforeSwap() during phase transitions:
Likelihood:
Phase transitions occur deterministically at phase1Duration and phase1Duration + phase2Duration blocks after launch - this is guaranteed to happen
Every user who swaps in Phase 1 will have their data incorrectly carried into Phase 2
The bug affects 100% of active participants
Impact:
Cumulative Limit Exhaustion: Users who use their Phase 1 limit (e.g., 1%) have that counted against their Phase 2 limit (e.g., 5%), receiving only 4% instead of the intended 5%
Cross-Phase Cooldown Penalties: Users may be incorrectly penalized in Phase 2 based on Phase 1 swap timing
Anti-Bot Mechanism Defeated: Bots using fresh addresses per phase get full limits, while legitimate early participants are penalized - inverting the intended security model
Unfair User Treatment: The protocol's core promise of "fresh limits per phase" is broken
Use epoch-based tracking (gas efficient):
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.