A bonding curve is an automated market maker (AMM) that determines token price based on supply. As more tokens are bought, the price increases along a mathematical curve. As tokens are sold back, the price decreases.Think of it like this:
First buyer gets the cheapest price
Last buyer before graduation pays the highest price
Everyone in between pays fair market price based on current supply
The curve doesn’t care who you are, everyone pays the same price at the same
supply level.
Price finds its natural level based on net buying demand. High net demand (more buys than sells) -> price rises. Equal buys and sells -> price stays stable.
Virtual native reserves are calibrated per chain to maintain consistent pricing dynamics:
ETH-Based Chains
Other Chains
All chains using ETH as native token:
Copy
Virtual Native Reserve: 1.5 ETH
Applies to: Ethereum, Base, Arbitrum, Optimism, Zircuit, Lisk, Scroll (and their testnets)
Chains with alternative native tokens:
Chain
Native Token
Virtual Reserve
Polygon
MATIC
30,000 MATIC
BNB Chain
BNB
6 BNB
Avalanche
AVAX
300 AVAX
Monad
MON
16,670 MON
Each calibrated to match ETH-equivalent pricing at launch.
Note: Throughout this documentation, we use 30 ETH in examples for easier
math visualization. On mainnet, RektHub uses 1.5 ETH for ETH-based chains,
which provides identical pricing curve dynamics.
Note: Throughout this documentation, we use 30 ETH in examples for easier
math visualization. On mainnet, RektHub uses ~1.5 ETH equivalent as the virtual
native reserve, which provides the same pricing curve dynamics with more
efficient capital allocation.
Understanding the difference between virtual and real reserves is key to understanding bonding curves.
Real Reserves
Virtual Reserves
Why Virtual Reserves Matter
Real reserves are actual tokens and native currency in the curve contract.
These are what traders receive.
Copy
// At launchrealNativeReserves = 0 ETHrealTokenReserves = 850,000,000 tokens// After first buy (0.1 ETH spent, 1% fee)realNativeReserves = 0.099 ETH // (0.1 - 1% fee)realTokenReserves = 815,722,813 tokens // Some sold
Virtual reserves are larger numbers used for price calculations. They
create smoother, more stable pricing especially at launch.
Copy
// At launchvirtualNativeReserves = 30 ETHvirtualTokenReserves = 1,073,000,000 tokens// After first buy (0.099 ETH after fee enters calculation)virtualNativeReserves = 30.099 ETHvirtualTokenReserves = 1,038,722,813 tokens
Without virtual reserves, you’d start with 0 ETH, causing catastrophic price swings:Without virtuals (broken):
RektHub uses the time-tested constant product formula from Uniswap:
Copy
x × y = k
Where:
x = virtual native reserves
y = virtual token reserves
k = constant (product of x and y)
How buying works
When you buy tokens:
Fee deducted from input first (0.99 ETH enters calculation)
Native goes in -> x increases
Tokens come out -> y decreases
k stays constant (maintains the curve)
Copy
// Before buyx = 30 ETHy = 1,073,000,000 tokensk = 30 × 1,073,000,000 = 32,190,000,000// User spends 1 ETH, 1% fee deducted firstamountAfterFee = 1 - (1 × 0.01) = 0.99 ETHnewX = 30 + 0.99 = 30.99 ETH// Calculate new y to maintain knewY = k / newX = 32,190,000,000 / 30.99 = 1,038,722,168 tokens// Tokens outtokensOut = y - newY = 34,277,832 tokens
Note: This is a simplified calculation skeleton. The full implementation includes token transfers, edge case handling, and additional checks. See the contract on GitHub for the complete logic.
How selling works
When you sell tokens:
Tokens go in -> y increases
Native comes out -> x decreases (gross amount for k calculation)
k stays constant
Fee deducted from output (user receives 99% of calculated amount)
Copy
// User sells 10,000,000 tokensnewY = 1,073,000,000 + 10,000,000 = 1,083,000,000// Calculate new x to maintain knewX = k / newY = 32,190,000,000 / 1,083,000,000 = 29.722 ETH// Native out (before fees)nativeOutBeforeFee = x - newX = 0.278 ETH// Apply 1% feenativeOut = 0.278 × 0.99 = 0.275 ETH (user receives this)
Note: This is a simplified calculation skeleton. The full implementation includes native transfers, reserve updates, fee distribution, and additional checks. See the contract on GitHub for the complete logic.
Let’s trace how price evolves as a token gains traction:
1
Launch (0 ETH traded in)
Copy
Virtual native: 30 ETHVirtual tokens: 1,073,000,000Price per token: 0.00000002796 ETHMarket cap: ~28 ETH
2
Early Stage (~9.9 ETH net traded in)
Copy
Virtual native: ~39.9 ETHVirtual tokens: ~804,750,000Price per token: 0.00000004957 ETH (~1.77x)Market cap: ~49.6 ETH
3
Growing (~99 ETH net traded in)
Copy
Virtual native: ~129 ETHVirtual tokens: ~249,534,884Price per token: 0.000000517 ETH (~18.5x)Market cap: ~517 ETH
4
Bonding (850M tokens sold)
Copy
Virtual native: ~506 ETHVirtual tokens: ~223,000,000Curve price: 0.00000227 ETH (~81x from launch)DEX Launch (after 12% fee on 506 ETH):445.28 ETH + 150M tokensDEX price: 0.00000297 ETH (~106x from curve launch)
These are examples. Actual prices depend on trading volume and demand. The
curve ensures fair pricing at every stage. The graduation multiplier depends on
accumulated liquidity and the 12% migration fee.
Your token launches with 850M tokens available on the curve. Anyone can buy or sell. Price moves up with buys, down with sells.
Buy Transaction
Sell Transaction
Copy
// User spends 1 ETH1. Calculate fee: 1 ETH × 1% = 0.01 ETH2. Net amount: 1 - 0.01 = 0.99 ETH3. Calculate tokens from curve: ~34M tokens4. Transfer tokens to buyer5. Update reserves// Reserves after (both use net amount)realNativeReserves += 0.99 ETHrealTokenReserves -= 34MvirtualNativeReserves += 0.99 ETHvirtualTokenReserves -= 34M
Copy
// User sells 10M tokens1. Calculate native out (gross): ~0.278 ETH2. Calculate fee: 0.278 × 1% = 0.00278 ETH3. Net to user: 0.278 - 0.00278 = 0.275 ETH4. Transfer 0.275 ETH to seller5. Update reserves// Reserves after (both use gross amount)realNativeReserves -= 0.278 ETHrealTokenReserves += 10MvirtualNativeReserves -= 0.278 ETHvirtualTokenReserves += 10M
Real reserves grow: Every buy adds native currency (net). Real token reserves decrease as tokens are sold.Virtual reserves adjust: Track alongside real reserves to maintain pricing formula. Both use net on buys (fee taken before swap) and gross on sells (fee taken after swap calculation).
When 850 million real tokens are sold, your token is bonded. This means:
All Supply Sold
All tradeable tokens have been purchased
Liquidity Accumulated
Mathematically determined amount of native currency
Ready for Graduation
Token can now migrate to a DEX
Trading Stops
No more buys/sells on the curve
Copy
// Bonding state (mathematically determined){ realTokenReserves: 0, // All 850M sold realNativeReserves: 114.35 ETH, // Determined by constant k reservedTokens: 150M, // Ready for DEX status: "bonded", readyForGraduation: true}
You cannot trade after bonding. The token must graduate to a DEX to become
tradeable again.
The creator triggers graduation. The remaining 150M tokens and accumulated native liquidity migrate to the chosen DEX.
1
Migration Fee Charged
12% of liquidity (e.g., 13.72 ETH from 114.35 ETH)
2
Liquidity Sent to DEX
100.63 ETH + 150M tokens create LP position
3
LP Tokens Locked/Burned
No rug pull risk
4
Trading Opens on DEX
Token now tradeable on Uniswap/PancakeSwap/etc.
The price calculation: When 150M tokens pair with the accumulated ETH (minus 12% fee), the DEX launch price is determined by this ratio. Using the 30 ETH virtual example: 100.63 ETH ÷ 150M tokens = 0.000000671 ETH per token. The accumulated liquidity at bonding is mathematically determined by the constant product formula.
Why the graduation pump?
Multiple factors create upward price pressure:
Instant liquidity depth: 88% of accumulated ETH creates strong buy support
Supply squeeze: Only 150M tokens vs 850M that were on the curve
FOMO effect: “I missed the curve, buying on DEX”
Price discovery: New trading venue, new price action
This rewards early believers who bought on the curve at low prices.