What is peg.fun?
peg.fun is a permissionless launchpad on Base for tokens that come with their own on-chain art collection built in. You upload a photo or write a prompt, and within minutes a complete tradeable token + visual collection deploys on a bonding curve that auto-graduates to Uniswap v4.
No coding. No design tools. No off-chain storage. The whole thing is on-chain, deterministic, and renounced after graduation.
Every token is an object. Every object is a token.
The core mechanic is simple: every 1.0 PEG = exactly one unique on-chain SVG object. They are inseparable. There is no separate "mint" step, when you buy PEG through the curve, your wallet receives both the ERC-20 balance and one freshly minted pixel-art object per whole token, in the same transaction.
Sell the token, the object burns. Transfer the token, the object travels with it. Hold the token, you hold the artwork.
This is the hybrid model:
- Unlike traditional on-chain collectibles, your objects are always liquid, they trade on a real AMM, not a marketplace.
- Unlike traditional ERC-20s, your balance has visual identity, every unit is unique, rendered fully on-chain from compressed rectangle data.
How a collection is created
A creator uploads a photo or types a prompt, peg.fun's AI pipeline:
- Decomposes the image into layers, body, head, accessories, etc., using SAM-2 segmentation.
- Generates pose and theme variants for each layer (e.g, small horn / large horn / golden horn × multiple poses).
- Quantizes the art into a fixed 36-color palette and packs it into rectangle data, a compact, deterministic representation that fits cheaply in contract storage.
The creator names the token, sets a symbol, optionally pre-buys a few of their own objects (anti-snipe), and clicks Deploy, peg.fun's factory deploys the token contract, the Uniswap v4 hook, the bonding curve, and the creator vault, all in a single atomic transaction.
A few blocks later the collection appears at peg.fun/t/<address>, fully live and tradeable.
What makes peg.fun different from Pump.fun and UPEG
Pump.fun launches ERC-20 tokens. Plain text balances, no visual identity, no rarity, no holder mechanics, peg.fun does what Pump.fun does for the launchpad workflow, but every unit has its own art, rarity score, and a built-in fee return for holders.
UPEG (Unipeg) pioneered the idea of a tokenized object collection running on a Uniswap v4 hook. It was a single hand-deployed genesis collection, proof that the model worked, but not a launchpad.
peg.fun takes UPEG's core insight and turns it into infrastructure: anyone can launch their own hybrid collection in under 5 minutes, with built-in AI-driven art generation, a permissionless bonding curve, and an auto-graduation pipeline to Uniswap v4. It is to UPEG what Pump.fun is to single-token launches, but with rarity, fees, and creator economics designed in from the start.
What's on-chain
Almost everything that matters:
- The art, stored as compressed rectangle data inside the renderer contract. No IPFS, no off-chain image hosting. The SVG is reconstructed from on-chain bytes on every render.
- The mint logic, the v4 hook fires the object mint inside
beforeSwap/afterSwap. There is no off-chain mint service. - The bonding curve, runs inside the hook. No external matching engine.
- The fee accumulator, every post-graduation swap pays a fee that's split per-holder, tracked on-chain via balance-weighted accumulation.
The only off-chain dependency is AI Easy Mode: the photo → layered art pipeline runs through Replicate + OpenAI. The output of that pipeline is frozen before deploy, once you click Deploy, the bytes that go on-chain never re-touch any AI provider.
peg.fun is live on Base mainnet. Base was chosen for ~1000× cheaper gas than Ethereum mainnet, strong organic token activity, and the established Uniswap v4 deployment. Multi-chain support is a v2+ roadmap item.
Where to go next
- How peg.fun works for the bonding-curve → graduation → DirectSwap mechanics.
- AI Easy Mode if you want to launch a collection.
- Why aggregators destroy objects before you buy or sell.