Skip to main content

What Are Bonding Curves?

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.

Why Bonding Curves?

Fair Launch

No pre-sales, no insider allocations. The curve doesn’t care who you are, everyone pays the same price at the same supply level.
// At launch
creatorBalance = 0;
teamBalance = 0;
insiderBalance = 0;

// Everyone buys from the curve

Automatic Liquidity

The curve itself is the market maker. No need to seed liquidity pools or wait for market makers. Trading starts instantly.

Immediate Trading

Buy and sell from day one

Always Liquid

Curve always provides liquidity

No Rug Risk

Liquidity locked in the curve

Fair Pricing

Math determines price, not humans

Price Discovery

Price finds its natural level based on demand. High demand -> price rises. Low demand -> price stabilizes or falls.

No Rug Risk

Liquidity is locked in the curve until graduation. Creators can’t pull funds. The only way out is through trading or graduation.

RektHub’s Bonding Curve Design

The Numbers

When you launch a token on RektHub:
1

Total Supply: 1 Billion Tokens

Fixed supply, no inflation, no additional minting
2

Tradeable Supply: 850 Million

Available on the bonding curve for trading
3

Reserved Supply: 150 Million

Held for DEX graduation (creates liquidity pump)
4

Virtual Token Reserves: 1.073 Billion

Used for pricing calculations (smooth early prices)
5

Virtual Native Reserves: Varies by Chain

Calibrated for similar starting prices across all chains
// Total supply
TOTAL_SUPPLY = 1,000,000,000 * 10^18

// Real reserves (actual tokens)
REAL_TOKEN_RESERVES = 850,000,000 * 10^18  // Tradeable
RESERVED_FOR_DEX = 150,000,000 * 10^18     // Graduation

// Virtual reserves (pricing)
VIRTUAL_TOKEN_RESERVES = 1,073,000,000 * 10^18
VIRTUAL_NATIVE_RESERVES = varies  // ~30 ETH equivalent

Virtual vs Real Reserves

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.
// At launch
realNativeReserves = 0 ETH
realTokenReserves = 850,000,000 tokens

// After first buy (0.1 ETH spent)
realNativeReserves = 0.099 ETH  // (0.1 - 1% fee)
realTokenReserves = 846,521,342 tokens  // Some sold

The Constant Product Formula

RektHub uses the time-tested constant product formula from Uniswap:
x × y = k
Where:
  • x = virtual native reserves
  • y = virtual token reserves
  • k = constant (product of x and y)
When you buy tokens:
  1. Native goes in → x increases
  2. Tokens come out → y decreases
  3. k stays constant (maintains the curve)
// Before buy
x = 30 ETH
y = 1,073,000,000 tokens
k = 30 × 1,073,000,000 = 32,190,000,000

// User spends 1 ETH (after fees: 0.99 ETH)
newX = 30 + 0.99 = 30.99 ETH

// Calculate new y to maintain k
newY = k / newX = 32,190,000,000 / 30.99 = 1,038,722,168 tokens

// Tokens out
tokensOut = y - newY = 34,277,832 tokens
When you sell tokens:
  1. Tokens go in → y increases
  2. Native comes out → x decreases
  3. k stays constant
// User sells 10,000,000 tokens
newY = 1,073,000,000 + 10,000,000 = 1,083,000,000

// Calculate new x
newX = k / newY = 32,190,000,000 / 1,083,000,000 = 29.722 ETH

// Native out (before fees)
nativeOut = x - newX = 0.278 ETH

Price Discovery Example

Let’s trace how price evolves as a token gains traction:
1

Launch (0 ETH traded in)

Virtual native: 30 ETH
Virtual tokens: 1,073,000,000
Price per token: 0.00000002796 ETH
Market cap: ~28 ETH
2

Early Stage (10 ETH traded in)

Virtual native: 40 ETH
Virtual tokens: ~804,750,000
Price per token: 0.00000004970 ETH (1.78x)
Market cap: ~49.7 ETH
3

Growing (100 ETH traded in)

Virtual native: 130 ETH
Virtual tokens: ~247,615,385
Price per token: 0.000000525 ETH (18.8x)
Market cap: ~525 ETH
4

Bonding (850M tokens sold)

Virtual native: ~530 ETH
Virtual tokens: ~223,000,000
Price per token: 0.00000238 ETH (85x from launch)
Market cap: ~2,380 ETH
Price discovery over time

Price progression visualization

These are examples. Actual prices depend on trading volume and demand. The curve ensures fair pricing at every stage.

The Trading Lifecycle

Phase 1: Active Trading

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
// User spends 1 ETH
1. Calculate fee: 1 ETH × 1% = 0.01 ETH
2. Net amount: 1 - 0.01 = 0.99 ETH
3. Calculate tokens from curve: ~34M tokens
4. Transfer tokens to buyer
5. Update reserves

// Reserves after
realNativeReserves += 0.99 ETH
realTokenReserves -= 34M
virtualNativeReserves += 0.99 ETH
virtualTokenReserves -= 34M
Real reserves grow: Every buy adds native currency. Real token reserves decrease as tokens are sold. Virtual reserves adjust: Track alongside real reserves to maintain pricing formula.

Phase 2: Bonding Achieved

When 850 million real tokens are sold, your token is bonded. This means:

All Supply Sold

All tradeable tokens have been purchased

Substantial Liquidity

Curve has accumulated significant native currency

Ready for Graduation

Token can now migrate to a DEX

Trading Stops

No more buys/sells on the curve
// Example bonding state
{
  realTokenReserves: 0,              // All 850M sold
  realNativeReserves: 500 ETH,       // Accumulated liquidity
  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.

Phase 3: Graduation to DEX

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., 60 ETH from 500 ETH)
2

Liquidity Sent to DEX

440 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 bump: When 150M tokens hit the DEX against 440 ETH, there’s immediate buying pressure. Early curve buyers often see 5-10x gains.
Multiple factors create upward price pressure:
  1. New supply unlocked: 150M tokens suddenly available
  2. Deep liquidity: 440 ETH creates confidence
  3. FOMO effect: “I missed the curve, buying on DEX”
  4. No sell pressure: Curve sellers are done, only DEX buyers remain
  5. Price discovery: New trading venue, new price action
This rewards early believers who bought on the curve at low prices.

Technical Deep Dive

Constants

// Token economics
uint256 public constant TOTAL_SUPPLY = 1_000_000_000 * 10**18;
uint256 public constant REAL_TOKEN_RESERVES = 850_000_000 * 10**18;
uint256 public constant VIRTUAL_TOKEN_RESERVES = 1_073_000_000 * 10**18;

// Fee structure
uint256 private constant PROTOCOL_FEE_BPS = 100;  // 1%
uint256 private constant CREATOR_SHARE_BPS = 3000;  // 30% of fee
uint256 private constant BASIS_POINTS = 10000;

Buy Calculation

function buy(uint256 nativeIn) returns (uint256 tokensOut) {
    // 1. Calculate fee
    uint256 fee = nativeIn * PROTOCOL_FEE_BPS / BASIS_POINTS;
    uint256 creatorFee = fee * CREATOR_SHARE_BPS / BASIS_POINTS;
    uint256 platformFee = fee - creatorFee;

    // 2. Net amount for trading
    uint256 netAmount = nativeIn - fee;

    // 3. Calculate tokens out (constant product)
    uint256 calculatedTokens = (netAmount * virtualTokenReserves) /
                                (virtualNativeReserves + netAmount);

    // 4. Take minimum (handles last buyer edge case)
    tokensOut = calculatedTokens < realTokenReserves
                ? calculatedTokens
                : realTokenReserves;

    // 5. Update reserves
    virtualNativeReserves += netAmount;
    realNativeReserves += netAmount;
    virtualTokenReserves -= tokensOut;
    realTokenReserves -= tokensOut;

    // 6. Accumulate creator fee
    accumulatedCreatorFees += creatorFee;

    // 7. Send platform fee to factory
    factory.transfer(platformFee);
}

Sell Calculation

function sell(uint256 tokensIn) returns (uint256 nativeOut) {
    // 1. Calculate gross native out (constant product)
    uint256 grossNative = (tokensIn * virtualNativeReserves) /
                          (virtualTokenReserves + tokensIn);

    // 2. Check reserves
    require(grossNative <= realNativeReserves, "Insufficient reserves");

    // 3. Calculate fee
    uint256 fee = grossNative * PROTOCOL_FEE_BPS / BASIS_POINTS;
    uint256 creatorFee = fee * CREATOR_SHARE_BPS / BASIS_POINTS;
    uint256 platformFee = fee - creatorFee;

    // 4. Net to user
    nativeOut = grossNative - fee;

    // 5. Update reserves (use GROSS for reserves)
    virtualTokenReserves += tokensIn;
    realTokenReserves += tokensIn;
    virtualNativeReserves -= grossNative;
    realNativeReserves -= grossNative;

    // 6. Accumulate creator fee
    accumulatedCreatorFees += creatorFee;

    // 7. Send platform fee to factory
    factory.transfer(platformFee);
}

Slippage Protection

Every trade includes a minOut parameter:
// Buy with slippage protection
require(tokensOut >= minTokensOut, "Slippage exceeded");

// Sell with slippage protection
require(nativeOut >= minNativeOut, "Slippage exceeded");
Always use slippage protection. Prices move between quote and execution—protect your users.

Why This Model Works

  • No upfront capital needed (no liquidity to seed)
  • Earn from every trade (30% of fees)
  • Control graduation timing and destination
  • Massive migration reward (60% of 12% fee)
  • Fair price at low supply
  • Accumulate before bonding
  • Benefit from graduation price bump
  • Trade with confidence (liquidity locked)
  • Everyone trades on equal terms
  • Price reflects genuine demand
  • No rug risk from liquidity pulls
  • Clear path to DEX graduation
  • Sustainable fee model funds development
  • No platform token needed
  • Scales to any chain with bonding curve support
  • Proven mechanics, no experiments

Next Steps