Bonding Curves — Deterministic Primary Markets
A bonding curve is a smart contract that mints and sells tokens along a deterministic price schedule: the price is a known function of the cumulative supply already sold. There is no order book, no auction, no bookbuilding syndicate. The curve is the market.
This is the primary-market analogue of the AMM. Where a constant-product pool provides secondary-market liquidity for an existing token pair, a bonding curve provides primary-market liquidity for a token that is being created on the fly. The intellectual link is the same: replace a human process (IPO bookbuilding, Dutch auction) with a closed-form pricing function on-chain.
The General Framework
Let denote the cumulative supply of tokens minted so far. The bonding curve defines a price function that gives the marginal cost of the next infinitesimal token.
The total cost to mint from supply to is:
This integral is the reserve the contract holds after those tokens are minted. The curve is fully collateralized by construction: the reserve always equals the cost integral.
Selling (burning) tokens reverses the process — the seller receives back from the reserve (possibly minus a fee). This guarantees a bid at every supply level, unlike a traditional market where the bid can vanish.
Common Curve Shapes
Linear:
Price starts at and grows linearly. Early buyers get a lower price. The cost integral is a quadratic — buying tokens from zero costs .
Quadratic:
Steeper price acceleration. Strongly rewards early participants. The cubic cost function means late buyers pay dramatically more.
Exponential:
The fastest-growing schedule. Practically, this makes very large purchases impossible, bounding the total supply that will ever be economically minted.
Virtual AMM (Pump.fun’s approach)
Instead of defining explicitly, Pump.fun uses a virtual constant-product AMM. The contract initializes virtual reserves with and then processes buys and sells using the standard constant-product formula from constant-product-amm.
The “virtual” qualifier means the initial reserves are not real deposited tokens — they are parameters set by the contract creator. The effect is a bonding curve whose marginal price function is:
where is the SOL (or ETH) paid in so far. This produces a price trajectory that follows the hyperbolic shape of the constant-product invariant — concave in supply, with diminishing price growth as supply increases. It is smoother than a polynomial curve and naturally bounded.
Pump.fun: Anatomy of a Token Launch
Pump.fun (launched January 2024 on Solana) operationalizes the virtual AMM bonding curve for meme token issuance. The lifecycle:
Phase 1: Bonding Curve (Primary Market)
- A creator launches a token with no upfront cost.
- The contract initializes a virtual AMM with predetermined parameters.
- Buyers purchase tokens along the curve, paying SOL.
- The SOL accumulates in the bonding curve’s reserve.
- Early buyers get lower prices; each purchase pushes the price up.
- Sellers can sell back at the current curve price (minus fees).
Phase 2: Graduation
When the bonding curve’s reserve reaches a threshold — approximately 85 SOL — the token “graduates.” At graduation:
- The bonding curve is permanently closed (no more primary minting).
- The accumulated SOL and remaining token supply are deposited into a full AMM pool (originally Raydium V4, now PumpSwap).
- The token transitions from primary market (bonding curve) to secondary market (constant-product AMM).
The 85 SOL threshold is a design choice that sets the “IPO size.” At typical SOL prices, this means a token graduates with roughly 15K of liquidity, implying a fully-diluted market cap in the low hundreds of thousands.
Phase 3: Secondary Market
Post-graduation, the token trades in a standard constant-product pool. All the machinery from constant-product-amm, impermanent-loss, and lp-profitability applies.
Cost Structure
At the bonding curve stage, the pricing is deterministic — every buyer knows exactly what they will pay for a given quantity, and the contract enforces it. Compare this with a TradFi IPO:
| Feature | Pump.fun bonding curve | TradFi IPO bookbuilding |
|---|---|---|
| Price discovery | Deterministic function | Human negotiation |
| Allocation | First-come, first-served | Discretionary |
| Transparency | Fully on-chain | Opaque |
| Minimum size | ~0.01 SOL | Institutional minimums |
| Time to market | ~2 minutes | 3—6 months |
| Aftermarket | Automatic graduation | Separate listing process |
Connection to Yield Curve Fitting
There is an unexpected parallel between bonding curves and the yield curve work in fixed income. Both are smooth, deterministic pricing functions that map a single variable (supply or maturity) to a price (token cost or yield). The Nelson-Siegel or Svensson parametric families for yield curves play the same structural role as the polynomial or virtual-AMM parametrizations for bonding curves: a small number of parameters that determine the entire pricing surface.
The cost integral is analogous to the discount function in fixed income — both integrate a marginal rate to get a cumulative price. The mathematical machinery transfers directly.
Manipulation and Risks
Bonding curves are not without pathology:
- Front-running: On a public blockchain, a pending buy transaction is visible in the mempool. A bot can insert a buy before it and a sell after, capturing the price difference. This is a specific form of MEV.
- Creator extraction: The creator can buy early at low prices, promote the token, and sell after others have pushed the price up. The bonding curve does not prevent this — it only makes the pricing transparent.
- Graduation sniping: Bots monitor bonding curves approaching the 85 SOL threshold and buy large positions in the AMM pool immediately after graduation, before other participants react.
Companion notebook: notebooks/defi/05-bonding-curves.py — Altair
plots of linear, quadratic, and virtual-AMM bonding curves; cost integrals;
simulation of a Pump.fun token lifecycle from launch through graduation.
Questions to sit with:
- The virtual AMM bonding curve is concave in supply (diminishing marginal price growth). A quadratic bonding curve is convex (accelerating growth). What are the economic implications of concavity vs. convexity for early vs. late buyers?
- The 85 SOL graduation threshold is fixed. How would you design an adaptive threshold that accounts for SOL price volatility?
- A bonding curve guarantees a bid at every price level. An order book does not. What is the cost of this guarantee — where does the risk go?