Launch sequence
A launch is one transaction. It mints the coin, creates the pool, adds the liquidity, locks it, and optionally buys — with no step in between that anyone else can trade in. This page is the call; Launching a coin is the same thing from the site.
Entry points
Two factories, with different shapes. V3 takes the pool parameters as loose arguments; V4 collects them into a struct and adds the two quote-asset variants.
| Factory | Function | What it does |
|---|---|---|
| V3 | launch | Launch only. Anything above the fee is refunded. |
| V3 | launchAndBuy | Launch, then buy with everything above the fee. |
| V4 | launch | Launch against the chain’s native coin. |
| V4 | launchAndBuy | Same, plus an atomic first buy. |
| V4 | launchWithQuote | Launch against a registered ERC-20 instead. |
| V4 | launchAndBuyWithQuote | Same, plus a buy paid in that ERC-20. |
// V3 — DirectLaunchFactoryfunction launch( string calldata name, string calldata symbol, bytes32 salt, uint160 sqrtPriceX96, int24 tickLower, int24 tickUpper, address creator) external payable returns (address token, address pool, uint256 positionId);function launchAndBuy(/* …the same, plus */ uint256 minTokensOut, address creator) external payable returns (address token, address pool, uint256 positionId);// V4 — DirectLaunchFactoryV4 (and DirectLaunchFactoryB20, which extends it)struct LaunchParams { string name; string symbol; bytes32 salt; uint160 sqrtPriceX96; int24 tickLower; int24 tickUpper; uint128 liquidity; address creator;}function launch(LaunchParams calldata p) external payable returns (address token, bytes32 poolId, uint256 positionId);function launchAndBuy(LaunchParams calldata p, uint128 minTokensOut) external payable returns (address token, bytes32 poolId, uint256 positionId, uint256 bought);function launchWithQuote(LaunchParams calldata p, address quote) external payable returns (address token, bytes32 poolId, uint256 positionId);function launchAndBuyWithQuote( LaunchParams calldata p, address quote, uint256 quoteAmountIn, uint128 minTokensOut) external payable returns (address token, bytes32 poolId, uint256 positionId, uint256 bought);What msg.value has to be
- It must cover
creationFee, read live on Fees. Below it the call reverts withInsufficientFee. - On
launchthe excess is refunded to the caller in the same transaction. OnlaunchAndBuythe excess is the dev buy. creatorset to the zero address defaults tomsg.sender. It is who the coin is credited to and who the dev-bought tokens go to — not necessarily the wallet paying.launchAndBuyWithQuoteis the exception: an ERC-20 has nomsg.valueequivalent, so the caller must approve the factory forquoteAmountInfirst. That is why it is a separate function rather than an argument.
Why the first buy cannot be sniped
Not because of a guard, but because of ordering: the pool does not exist until this transaction, so there is no block in which anyone else could have traded first. The buy is part of the same call that created the market.
On V3 that buy goes through a router. On V4 there is no router a contract can call directly — a swap has to happen inside poolManager.unlock — so the factory implements unlockCallback and performs the swap itself. Worth knowing if you are reading the trace and wondering where the router went.
Events, and the topic that splits in two
Both factories emit TokenLaunched with the same name and the same number of arguments. The second one is address pool on V3 and bytes32 poolId on V4, because a V4 pool has no address — so the two signatures hash to different topic0 values.
| Event | topic0 |
|---|---|
V3 TokenLaunched | 0x851d681a32f0efba577c4a1bd412f74b575764a6b91e499a05a48a23f3821d66 |
V4 TokenLaunched | 0x26ed5c4640064b76476a16cfaadb61e36b77df6c5cfa7aa47718c05e6946fb8e |
FeesCollected (both) | 0xde5d657c00d557886c53e267ff792a157187bc1c5947bd02cb62159550edb08e |
V4 DevBought | 0x08eef824a639810a10dded3f269c86e65f8d085fac126edc56d873507412456b |
Filtering on one topic0 misses an entire venue
FeesCollected is the opposite case: identical signature, one topic0, and the field named creatorWeth on V3 is creatorNative on V4. Same slot, same meaning, different name in the ABI.What the coin enforces after launch
These are read from every factory at page load rather than written here — each is an owner setting that one transaction can change, and a number typed into a document is wrong from the moment it moves.
| Parameter | Arc | Robinhood | Base | Stable |
|---|
Read live from each network's launch factory when this page loaded. Every value here is an owner setting; none is hardcoded in this page.
Base is the same call on a different kind of token
DirectLaunchFactoryB20 extends the V4 factory, so the functions above are unchanged. What differs is the coin: on Base it is a native B20 minted by the chain’s factory precompile rather than an ERC-20 this repository deploys. It is created with no admin at all, its supply cap is pinned by the chain, and its address derives from the salt alone — so predictToken(salt) there takes the salt and nothing else.
One consequence for anyone choosing a pair: every B20 is created at or above 0xB200…0000, and a pool needs the coin to sort above the other side.
