Skip to main content
Until it graduates, a v2 token trades directly against its own curve, not through a router. Resolve the curve from getLaunchedToken.

Buying and selling

  • Value sent to an ERC-20 launch reverts with UnexpectedNativeValue; the wrong value on an ETH launch reverts with NativeValueMismatch.
  • A buy larger than what is left fills what remains and refunds the rest in the same transaction (CurveBuyRefunded). Read tokensOut from the return value or the CurveBuy event.
  • minTokensOut bounds the price, not the quantity. A partial fill at your rate or better succeeds. Size it from the rate you quoted.

Quoting

The curve has no quote function. Pricing is constant product with fees outside the curve step, so you can reproduce it exactly from four reads. This is the curve’s own integer arithmetic, in its own order.
  • Price against getReserves(). It includes the virtual opening reserve and excludes fees waiting to be swept. realQuoteReserve() is what the curve holds, and the wrong input for a quote.
  • The snipe tax applies to buys only and is keyed on the recipient, so ask about the wallet you are buying for. See snipe protection.
  • Quoting a sell as a mirrored buy overstates the proceeds.

When the curve closes

Buys close when sellableTokens() reaches zero. Sells close at the same moment: once readyToGraduate() is true, sell reverts with CurveGraduated, even though the pool may not exist yet. Gate on readyToGraduate(), not graduated.

Graduation

Graduation takes two transactions’ worth of work, and only the first can happen inside a buy.
1

Sweep

The buy that finishes the curve calls the factory’s graduate(token). The curve hands over its reserves, the launch moves to phase 1 (Swept) and the factory emits LaunchSwept.
2

Create the pool

createGraduatedPool(token) on the factory seeds the Uniswap v4 pool, locks the position and moves the launch to phase 2. It is a separate call, open to anyone, and safe to retry. On a launch not in phase 1 it reverts with WrongGraduationPhase.
Bundling contracts often run both steps in one transaction. Otherwise Pons runs a keeper that creates the pool, usually within a few dozen blocks. If the sweep inside the finishing buy fails, usually for gas, the curve emits AutoGraduationFailed and the launch stays in phase 0 with readyToGraduate() true. Anyone can then call graduate(token) followed by createGraduatedPool(token). graduate on a curve that is not finished reverts with NotReadyToGraduate. After phase 2, route trades to the Uniswap v4 pool.