The TokenLaunchHook is designed to enforce fees and limits during the initial phases of a token launch (Phase 1 and 2) and revert to standard pool behavior in Phase 3. Normally, in Phase 3, the hook should allow the swap to proceed using the pool's configured dynamic fee without interference.
However, in Phase 3, the _beforeSwap function returns the LPFeeLibrary.OVERRIDE_FEE_FLAG combined with a 0 delta. This flag instructs the PoolManager to override the stored pool fee with the returned fee value. Since no fee value is provided (it defaults to 0 in the return tuple), the pool fee is effectively set to 0% for all swaps in Phase 3.
Likelihood:
High, this logic is unconditional for all swaps once Phase 3 is reached.
Impact:
The protocol loses all trading fee revenue in Phase 3, which is intended to be the long-term stable state of the pool.
Use 0 instead of LPFeeLibrary.OVERRIDE_FEE_FLAG to indicate that no override should occur.
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.