What migration does

Migration is the moment a peg.fun token graduates from its bonding curve to a permanent Uniswap v4 pool. It happens automatically when the curve collects 4.16 ETH, no admin call, no countdown, no human in the loop.

What happens at migration

Migration is executed in a single atomic transaction by the PegHook contract:

  1. Pool creation. A new Uniswap v4 pool is created for the PEG / ETH pair, using the protocol's fixed fee tier and the same hook that ran the curve.
  2. Liquidity deposit. All ETH and PEG held by the bonding curve are deposited as initial liquidity into the new pool.
  3. LP burn. The LP position representing that liquidity is permanently locked inside the PegHook contract itself — not sent to any address, just never removable by any code path that exists. No one, not the creator, not peg.fun, not the holder community, can ever withdraw it. See LP burn.
  4. Curve disabled. The bonding curve permanently stops accepting trades. All subsequent swaps route through the new Uniswap v4 pool via DirectSwap.

Migration is atomic. Steps 1-4 either all succeed or all revert. There is no intermediate state where the curve is disabled but the pool is not yet active.

Why migration happens automatically

The 4.16 ETH threshold is baked into the contract at deploy time. When a buy would push the curve's ETH balance over the threshold, the hook triggers migration in the same transaction. The buyer pays the migration gas as part of their buy, they pay slightly more for that transaction in exchange for being the one who pushed the curve over the line.

There is no separate "trigger migration" call. There is no admin function to pause it. There is no time-window, the curve graduates when it graduates, and that's the moment trading shifts to v4.

Can migration be prevented or reversed?

No.

  • The contract is renounced, there is no admin key to delay or cancel migration.
  • The LP is burned, there is no LP holder to remove liquidity.
  • The bonding-curve disable flag is set in the same transaction, there is no "unwind" path.

Once migration executes, the state is final. The token can never go back to a bonding-curve phase.

What changes after migration

  • Routing. All swaps go through the Uniswap v4 pool via DirectSwap (peg.fun's native router). The bonding curve is gone.
  • Fees. A holders' share already existed pre-graduation (1.0% of every curve trade). Migration changes the split: post-graduation, trading fees pay creator, treasury, and PEG holders via the holder fee accumulator, plus a separate pool fee that goes to liquidity rather than to holders — it compounds into the locked graduation position instead. See How to claim holder fees and What LP burn means.
  • Price discovery. The constant-product AMM formula (x * y = k) determines the price, not the curve. Prices can move freely up or down.
  • Aggregator-loss risk. Still applies. Buying through 1inch / CowSwap / the Uniswap widget after graduation still destroys objects. Always use DirectSwap.

What stays the same

  • The token's contract address.
  • The total supply.
  • The object-mint and burn logic, buying PEG still mints one object per whole token, selling burns the oldest object.
  • The holder fee accumulator itself — it was already running pre-graduation and keeps running after, just at the new post-graduation split (see "Fees" above).
  • The renderer, your art is still rendered from the same on-chain bytes.

Migration only changes where trades are routed. The token contract itself is unchanged.

How to know when a token has migrated

The token detail page at peg.fun/t/<address> shows the current phase in the header: "Bonding curve" before migration, "Graduated" after. The curve-progress bar fills to 100% at the migration moment and is replaced by the holder-fee section after.

You can also verify on-chain: read the PegHook contract for the token and check the isGraduated flag.

Why 4.16 ETH

The threshold was chosen so that:

  1. Gas economics don't dominate small buys. On an L1 the gas on a sub-$10 buy would eat most of the trade; peg.fun runs on an L2 where gas is orders of magnitude cheaper, so a much lower bar still works.
  2. The post-graduation liquidity floor is meaningful. 4.16 ETH of locked LP creates a real, permanent price floor.
  3. It's a clean round number for analytics. Curves that graduate at the same threshold are easy to compare.

The threshold is the same for every token launched on peg.fun. It is not creator-configurable.