TokenLaunchHook seems to be built assuming that it will not handle multiple pools at the same time, however Uniswapv4 pools are permissionless and can be pointed to hook contracts.
An attcker could spin up a pool with fake tokens and point it to TokenLaunchHook.
When the attacker initializes the pool it will trigger TokenLaunchPool::_afterInitialize and reset global variables like initialLiquidity, launchStartBlock and lastPhaseUpdateBlock.
Medium: It might be very easy for an attacker to perform this attack, but it's not going to be very profitable
High: TokenLaunchHook will be stuck in phase 1 as long as the attacker keeps initializing new pools pointing to TokenLaunchHook.
initialLiquidity will be set by the attacking pool and stay like that.
Add the following test to understand the attack flow:
Track these global variables in mapping data structures, so that you can use the pool key to discriminate between pools:
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.