Bonding Curves — Deterministic Primary Markets

A bonding curve is a primary market mechanism — a smart contract that creates and sells brand-new tokens along a deterministic price schedule. Because no tokens exist before the first purchase, every buy on the bonding curve mints (creates) new tokens that did not previously exist. Every sell burns (permanently destroys) them, shrinking the supply back down. This is fundamentally different from a secondary market (like a constant-product AMM) where existing tokens change hands — nobody mints or burns anything.

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. The intellectual link to the AMM is structural: both replace a human process (IPO bookbuilding, Dutch auction) with a closed-form pricing function on-chain. But the AMM assumes tokens already exist; the bonding curve brings them into existence.

Common bonding curve shapes: linear, quadratic, and sublinear — each produces different price dynamics.

Intuition: How a Bonding Curve Works

Imagine you are the first buyer of a brand-new token. You pay $0.001 per token. The next buyer pays $0.002. The 1,000th buyer pays $1.00. Nobody negotiated these prices — they are set by a formula baked into the smart contract. The more tokens that have already been sold, the higher the price for the next one. That is the bonding curve: a pre-committed pricing schedule where supply alone determines price.

Where does the money go? Every dollar (or SOL) that buyers pay is locked inside the contract in a pool called the reserve. The reserve is not profit for anyone — it is the contract’s war chest for buying tokens back. If you want to sell, you do not need to find another buyer. The contract itself pays you from the reserve at whatever the curve says the current price is. This is why a bonding curve always has a bid: the reserve guarantees it.

When you buy a batch of tokens — say tokens 500 through 600 — you pay a different price for each incremental token because the price keeps rising. The total cost is the area under the price curve between those two supply points. That area-under-a-curve calculation is exactly what the integral in the next section computes. If you are comfortable with “area under a curve equals total cost,” you have the core idea.

Different curve shapes just control how steeply the price climbs. A linear curve rises at a steady pace. A quadratic curve accelerates — the price crawls at first and then rockets. An exponential curve is the most extreme: gentle early on, nearly vertical later. Steeper curves reward early buyers more and punish latecomers more harshly.

Prerequisites

The formal sections below use integral calculus () for computing costs as areas under curves. If you’re not comfortable with integrals, the intuition section above gives you the same understanding in plain English — the math just makes it precise.

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.

Because this is a primary market, “buying” on the bonding curve means minting new tokens into existence. 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 — destroying) tokens reverses the process: the supply shrinks from back to , and 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)

Pump.fun could have used any of the polynomial curves above. Instead, it reuses the constant-product AMM from constant-product-amm — the same formula that powers Uniswap and PumpSwap. Three reasons:

  1. Seamless graduation. A Pump.fun token starts on the bonding curve and eventually migrates to a real constant-product AMM pool (PumpSwap). Using the same math for both phases means the transition is smooth: price, reserve ratios, and trading mechanics are identical before and after. A polynomial curve would create a price discontinuity at the handoff.
  2. Battle-tested math. The constant-product formula has been running on Uniswap since 2018. Its properties — price impact, slippage, fee accumulation — are deeply understood and audited. Reusing it means fewer bugs and more predictable behavior than a bespoke curve.
  3. Two intuitive knobs. The contract only needs two parameters: virtual token reserve and virtual SOL reserve .

The contract starts with virtual reserves: it pretends the pool already holds tokens and SOL, even though no one actually deposited anything. These are just parameters the contract sets at launch. By choosing and , the contract controls the initial price () and the curve’s depth ( — a larger means lower price impact per trade).

Here is what happens when someone buys:

  1. The buyer sends SOL into the contract.
  2. The contract treats this as a swap on its virtual AMM: the SOL reserve grows from to .
  3. The constant-product formula determines how many tokens to mint: — the same execution price formula from constant-product-amm, except the tokens returned are freshly minted (primary market), not withdrawn from an existing pool (secondary market).
  4. The token supply grows by , and the virtual token reserve shrinks by the same amount.

After tokens have been minted and SOL has been paid in, the marginal price is:

This is just the standard AMM price ratio , where (virtual SOL + real SOL paid in) and (virtual tokens minus tokens already minted out). As more tokens are minted, shrinks and grows, so the price rises — exactly the bonding curve behaviour we want.

The shape is hyperbolic: price growth is steep when few tokens remain (small ) and gentle when the pool is deep. Unlike a polynomial curve, the price is naturally bounded — it approaches infinity as (you can never mint more tokens than the virtual reserve), the same “you can never drain the pool” property from the AMM.

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)

  1. A creator launches a token with no upfront cost.
  2. The contract initializes a virtual AMM with predetermined parameters.
  3. Buyers purchase tokens along the curve, paying SOL.
  4. The SOL accumulates in the bonding curve’s reserve.
  5. Early buyers get lower prices; each purchase pushes the price up.
  6. 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:

  1. The bonding curve is permanently closed (no more primary minting).
  2. The accumulated SOL and remaining token supply are deposited into a full AMM pool (originally Raydium V4, now PumpSwap).
  3. 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 $10K–$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:

FeaturePump.fun bonding curveTradFi IPO bookbuilding
Price discoveryDeterministic functionHuman negotiation
AllocationFirst-come, first-servedDiscretionary
TransparencyFully on-chainOpaque
Minimum size~0.01 SOLInstitutional minimums
Time to market~2 minutes3—6 months
AftermarketAutomatic graduationSeparate 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.

Adverse Selection on Bonding Curves

The Glosten-Milgrom framework maps directly onto bonding curve token launches. On a platform like pump.fun, a token creator knows the project’s fundamentals (or lack thereof) better than retail buyers — classic information asymmetry.

In Glosten-Milgrom terms:

  • The informed trader is the token creator or insider who knows whether the project has substance
  • The uninformed trader is the retail participant buying based on hype, social signals, or FOMO
  • The market maker is the bonding curve itself — a deterministic pricing function that does not adjust quotes based on who is trading

A rational Glosten-Milgrom market maker would quote a much wider spread for a newly launched token (high probability of informed trading). The bonding curve cannot — it offers the same price to everyone. This is why memecoin markets are brutal for retail: the information asymmetry is extreme, but the pricing mechanism does not reflect it.


Companion notebook: notebook — interactive 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:

  1. 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?
  2. The 85 SOL graduation threshold is fixed. How would you design an adaptive threshold that accounts for SOL price volatility?
  3. 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?