How It Works
peg.fun is a two-phase protocol. Tokens are born on a bonding curve. When the curve fills, liquidity migrates atomically to Uniswap v4, the contract renounces, and holders start earning trade fees forever.
Phase 1 · The bonding curve
When a collection launches, every buy and sell goes through peg.fun's bonding curve, which lives inside a Uniswap v4 hook. The price increases as more PEG is bought, so early buyers get a lower price and later buyers pay more.
All ETH paid into the curve stays in the contract. There is no external market maker, no order book, and no AMM pool yet. The curve is the only price source until graduation.
NoteThe graduation threshold is 4.16 ETH locked in the curve. Until then, the curve and the hook are the only place this token exists.
Every buy on the curve does three things in one transaction:
- ETH is sent to the PegHook contract.
- The hook routes the swap through Uniswap v4's PoolManager.
- PEG tokens are minted directly to the buyer's wallet, and one on-chain object is minted per whole 1.0 PEG received. Fractional PEG becomes dust.
Phase 2 · Graduation
When a buy would push the curve past 4.16 ETH, the hook triggers migration atomically in the same transaction. The buyer pays the migration gas as part of their buy. No separate trigger, no admin call, no countdown.
At graduation:
- A new Uniswap v4 pool is created for PEG/ETH with the protocol's fixed fee tier and the same hook.
- All ETH and remaining PEG in the curve are deposited as initial liquidity into that pool.
- The LP position representing that liquidity is sent to
0x…dead, burned forever. See LP burn. - The bonding curve permanently disables. All future swaps route through the Uniswap v4 pool.
Graduation is one-shot and irreversible. There is no admin key that can cancel it, delay it, or reverse it.
Phase 3 · Post-graduation swaps via DirectSwap
After graduation, peg.fun routes every swap through DirectSwap, its own router. DirectSwap is required because aggregator routes (1inch, CowSwap, ParaSwap, the official Uniswap widget) break the object-mint guard inside the token contract.
WarningAlways use peg.fun's native swap UI. Buying through aggregators gives you the ERC-20 balance but zero objects. The mint binding is enforced at the contract level, so no off-chain fix can mint objects retroactively. See Why aggregators destroy objects.
Holder fee distribution
Every swap after graduation pays a small fee. There are no liquidity providers to pay (the LP is burned), so the fee flows back to PEG holders via a balance-weighted accumulator inside the hook.
Holders claim accumulated fees by clicking "Claim ETH" on the token detail page. The longer you hold and the more PEG you hold, the more you accumulate. See How to claim holder fees for the mechanics.
The object-mint invariant
1.0 PEG = 1 object at all times. This is enforced at the contract level:
- Buying a whole token through DirectSwap mints one fresh object to your wallet.
- Selling a whole token through DirectSwap burns the oldest object you hold.
- Transferring PEG to another wallet transfers the matching objects atomically. There is no "orphan" ERC-20 balance.
- Fractional PEG that didn't complete a whole object becomes dust , which has ETH value but does not mint an object until you accumulate enough to cross the next integer boundary.
Renounced posture
After graduation the token contract is renounced: no admin key, no upgrade path, no pause function, no fee-rate change. peg.fun itself cannot intervene post-graduation. That is the deliberate trade-off for the "permanent, rug-safe" liquidity narrative.
See Risks for the long-form trade-offs and Security for the disclosure channel.