How it works
A coin goes through five moves. Four are automatic once the first one is done.
1. Create
The creator calls create(name, symbol, pair, startCap, firstBuy, minOut). The contract checks the pair, deploys a plain ERC-20 with the full supply minted to itself, and stores the curve. startCap is the opening market cap in raw units of the pair. If firstBuy is above zero, the creator's first purchase happens in the same transaction, so nobody can buy before them.
// startCap is raw pair units. 5,000 USDG has 6 decimals: create("Moonlit Cat", "MCAT", USDG, 5_000e6, 0, 0)
2. Trade on the curve
Anyone can buy or sell against the curve. Every trade pays a 1% fee in the pair token. For coins paired with WETH there are buyETH and sellETH that take and send plain ETH. Each call has a minOut so a trade reverts if the price moved against you.
3. The curve fills
The buy that crosses the 800M line only takes what is left: the contract computes exactly how much of the payment is needed, keeps that, and sends the rest back. The curve is then closed and the coin is marked full.
4. Graduate
Right after a buy fills the curve, the contract tries to graduate it in the same transaction. If that fails, for example because a pool was poisoned in advance, anyone can call graduate(token, poolFee) later with another fee tier. Graduation opens the Uniswap V3 pool at the curve's closing price and puts 200M coins plus all the raised pair into a full-range position owned by the contract. Details.
5. After graduation
Trading continues on Uniswap. The locked position earns swap fees. Anyone can call collectFees(token): the coin side is burned, the pair side is split 50/50 between the creator and the protocol, and both can claim.
The whole path
create ──► buy / sell on the curve ──► 800M sold ──► graduate ──► Uniswap V3 pool
(pair, 1% fee each trade curve closes (same tx, 200M coins + all raised
start cap) creator 0.5 / proto 0.5 rest refunded or later) full range, locked
│
collectFees ◄───────────┘
coin side burned, pair side 50/50