Normal Behavior: The initialLiquidity value should be set once during pool initialization and remain immutable, as it determines the maximum swap amount throughout the token launch protection period.
Issue: If initialLiquidity is 0 at initialization (common when pool is created but not yet funded), the _beforeSwap function re-reads it from the pool on the first swap:
The initialLiquidity can be set at an attacker-controlled moment:
Attacker-Controlled maxSwapAmount: Since maxSwapAmount = initialLiquidity * phaseLimitBps / 10000, an attacker can manipulate the base liquidity value
Sandwich Attack Vector: Attacker can add minimal liquidity → trigger first swap → remove liquidity, locking in a low maxSwapAmount that griefs all users
Permanent Effect: Once set, initialLiquidity is never updated, so manipulation is permanent for the pool's lifetime
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.