Launch mechanism
What happens in the single transaction that creates a coin.
A launch is one call to launch() on the factory. It costs the launch fee plus
gas, and optionally whatever ETH you send to buy your own coin in the same
transaction.
In order
- The token is deployed with CREATE2, using a salt derived from the sender, the previous block hash and a counter. The full supply is minted to the factory.
- A pool is created against WETH at Uniswap's 1% fee tier, and initialised at a price outside the range the liquidity will occupy.
- The whole supply is added as liquidity in a single-sided position: only tokens, no ETH. Buyers supply the ETH side as they trade.
- The position NFT stays with the factory. Nothing transfers it out because nothing can.
- The dev buy runs, if ETH was sent, as an ordinary swap through the router from the creator's own address.
Why the salt matters
A pool address is derivable in advance. Without a salt, someone could create the pool first at a price of their choosing, and the launch would land into a pool already skewed against the creator. The factory predicts its own pool address, checks it is untouched, and steps to a different salt if it is not. It tries a bounded number of times and then reverts rather than launching into a poisoned pool.
That bound matters: an earlier version used plain CREATE, and a revert does not advance a nonce, so a single poisoned address could brick the factory permanently.
Single-sided liquidity
The position covers a fixed tick range that the initial price sits below. In practice this means the coin starts at the bottom of its range and rises through it as ETH enters. The width of that band and the amount of ETH needed to cross it are the same number seen from two directions: raise = sqrt(startMcap × endMcap).