How Bonding Curves Price Tokens (Complete Guide, 2026)

8 min read

Bonding curves are the single most important piece of math in every pump.fun-style token launchpad, including THRYX. They determine what your token costs, how price responds to buys and sells, and when it graduates to a real DEX. Most posts hand-wave this — "price goes up when people buy" — but the real answer is a two-line equation that you can run in your head. This guide walks through that equation, shows a worked numeric example with actual THRYX constants, and explains why the math guarantees the starting price and the graduation price are both deterministic.

What a Bonding Curve Actually Is

A bonding curve is a math formula that replaces a traditional order book. Instead of matching buyers and sellers, the curve is an automated market maker (AMM) that always quotes a price based on how many tokens have been sold. The more tokens sold, the higher the price. The fewer tokens sold, the lower the price. Nobody needs to be on the other side of your trade — the curve is.

THRYX uses a constant product bonding curve, the same style Uniswap V2 made famous. Two reserves are tracked, and their product always stays equal to a constant k. Every buy or sell rebalances the reserves while keeping k invariant.

The Core Formula

// The constant product invariant
virtualThryx * virtualTokens = k

// When a user buys with dX THRYX:
tokensOut = virtualTokens - (k / (virtualThryx + dX))
newVirtualThryx = virtualThryx + dX
newVirtualTokens = virtualTokens - tokensOut
// Invariant still holds: newVirtualThryx * newVirtualTokens == k

// Spot price after the trade (THRYX per token):
spotPrice = newVirtualThryx / newVirtualTokens

That is it. Five lines of math price every token on THRYX. There is no oracle, no order book, no market maker — just those five lines running inside the Diamond contract on Base.

Real AMMs require someone to deposit real tokens on both sides before trading can start. That is a chicken-and-egg problem for brand new tokens: who deposits first, and what price do they use? Virtual reserves solve it. The curve pretends reserves exist from day one. No deposits are needed. Real reserves only build up as users actually buy. When the real THRYX accumulated on the curve hits the graduation threshold, the virtual bookkeeping is discarded and the real balance seeds a Uniswap pool.

THRYX Initial Parameters

Every token launched on THRYX today starts with the exact same virtual reserves:

Starting spot price is virtualThryx / virtualTokens = 1,000,000,000 / 1,072,000,000 = ~0.9328 THRYX per token. THRYX itself trades around 9.2 billion THRYX per ETH, so the initial price in ETH terms is roughly 0.9328 / 9,207,525,713 ≈ 1.01 × 10^-10 ETH per token. Fractions of a cent on fractions of a cent. That is intentional — a very low starting price means early trades have almost no price impact and create room for the curve to rise.

Worked Example: 0.001 ETH Buy on a Fresh Token

Say a user spends 0.001 ETH on a brand new token. Using the ~9.2B THRYX/ETH rate, that converts to about 9,207,525 THRYX hitting the bonding curve (after fees). Plug into the formula:

// Starting state
virtualThryx    = 1,000,000,000
virtualTokens   = 1,072,000,000
k               = 1.072e18

// Buy of 9,207,525 THRYX
newVirtualThryx  = 1,000,000,000 + 9,207,525 = 1,009,207,525
newVirtualTokens = 1.072e18 / 1,009,207,525   = 1,062,220,573
tokensOut        = 1,072,000,000 - 1,062,220,573 = 9,779,427 tokens

// New spot price (THRYX per token)
spotPriceAfter = 1,009,207,525 / 1,062,220,573 = 0.9501 THRYX/token

The user paid 9,207,525 THRYX and received 9,779,427 tokens — ~6.2% more tokens than the THRYX they spent, because the starting price was under 1 THRYX per token. Spot price rose from 0.9328 to 0.9501 — a 1.85% price impact on a 0.001 ETH buy. That is the curve working exactly as designed: small trades nudge the price slightly, large trades move it a lot.

Price at Every Trade Size

Here is how much THRYX you spend and what happens to the curve for a range of trade sizes on a fresh token:

ETH SpentTHRYX InTokens ReceivedSpot Price AfterPrice Impact
0.0001~920,753~981,8230.9337 THRYX/tok+0.10%
0.001~9,207,525~9,779,4270.9501 THRYX/tok+1.85%
0.01~92,075,257~93,713,8101.1163 THRYX/tok+19.7%
0.025~230,188,143~218,166,4321.4414 THRYX/tok+54.5%
0.027 (graduation)~250,000,000~228,571,4281.4820 THRYX/tok+58.9%

By the time the curve hits its graduation threshold of 250M THRYX collected, the spot price has risen from 0.9328 to 1.482 — a ~59% increase from the starting price. Everyone who bought earlier is now up on the curve.

Price Impact Formula

If you want a quick estimate of price impact without running the full trade math, use this approximation for small buys:

// Approximation for buys much smaller than virtualThryx
priceImpact ≈ dX / virtualThryx

// Example: a 1,000,000 THRYX buy on a 1B virtual reserve token
priceImpact ≈ 1,000,000 / 1,000,000,000 = 0.1%

Once dX gets close to 10% of virtualThryx, this approximation breaks down and you need the full formula. THRYX caps autotrader trades at 0.1% of pool depth specifically to keep impact below 0.2% on every automated buy.

Why Per-Token Depth Matters

Not every token on THRYX has the same 1B virtualThryx. Tokens launched before an admin parameter change had virtualThryxInit = 100,000,000 — ten times less depth. On those tokens, the same 1M THRYX buy causes 10× the price impact (1% vs 0.1%). The server derives per-token depth from spotPrice × (VIRTUAL_TOKENS_INIT - tokensSold) rather than using the global constant, so price impact calculations stay accurate across both old and new tokens.

Graduation: The End of the Curve

When the real (not virtual) THRYX collected on the curve reaches 250,000,000, the graduate() function fires. Here is what happens mechanically:

  1. All unsold tokens on the curve are burned permanently (supply reduction).
  2. The real THRYX balance (250M+) and the remaining real tokens are paired into a Uniswap V4 pool.
  3. The V4 pool opens at exactly the curve's final spot price — no discontinuity, no gap, no front-running opportunity.
  4. Post-graduation swaps happen on Uniswap V4 with real liquidity, and LPs (including the creator) earn fees on every trade.

Because the V4 pool opens at the same price the curve closed at, anyone holding tokens at graduation does not experience a price jump or drop. The only discontinuity is that supply shrinks (unsold burn), which is structurally bullish.

Round-Trip Cost: The 1% Rule

If you buy a token at the current spot price and immediately sell it back, you do not get your THRYX back — you lose ~1% to fees (0.5% buy fee + 0.5% sell fee). On THRYX, that round-trip cost matters because it sets the minimum profitable move for any strategy: you need at least a 1% price move in your favor just to break even. The AutoTrader enforces this by rejecting any pre-buy simulation that shows a round-trip cost over 3% (usually a sign of a broken or honeypot token).

Sell Math (Mirror Image)

Sells work identically in reverse: dY tokens in returns (virtualThryx × dY) / (virtualTokens + dY) THRYX out, and the price drops. The constant product invariant holds in both directions, so sells and buys are perfectly symmetric. This is why the curve has no "slippage surprise" — the same math that prices your buy prices your sell.

Why This Design?

Constant-product bonding curves are the dominant design for launchpads because they have three useful properties: (1) instant liquidity — you never wait for a market maker, (2) deterministic pricing — everyone pays the same price for the same trade size, and (3) no oracle dependency — the curve is the price. The tradeoff is price impact on larger trades, which THRYX mitigates by (a) starting with very deep virtual reserves (1B) and (b) capping autotrader trade sizes to 0.1% of depth.

Practical Takeaways

The curve is transparent. The math is on-chain and verifiable. Every trade you make has a price you could have predicted in advance. That is the whole point.

Launch a token and see the curve in action

Related Posts

Create Your Token