Skip to main content

The Multi-Segment Bonding Curve

DBC uses a piecewise concentrated-liquidity curve with up to 16 segments. Each segment is defined by a (sqrt_price, liquidity) pair, creating a price path from the initial price to the migration price. The curve is stored as an array of LiquidityDistributionConfig points in the PoolConfig account:
pub struct LiquidityDistributionConfig {
    pub sqrt_price: u128,  // upper bound √price of this segment
    pub liquidity: u128,   // virtual liquidity in this segment
}
Up to MAX_CURVE_POINT_CONFIG = 16 points.

How the Curve Works

The curve defines how many quote tokens are needed to move the price through each segment:
Δquote = liquidity × (√P_upper - √P_lower)
A segment with high liquidity requires more quote tokens to traverse (flatter price movement). A segment with low liquidity is traversed quickly (steep price movement).

Example: Two-Segment Curve

Segment 1: sqrt_price = X₁, liquidity = L₁  (steep launch phase)
Segment 2: sqrt_price = X₂, liquidity = L₂  (flat mature phase)

           ↑ price
     X₂ --|----_________ (L₂: flat, needs many tokens to move price)
     X₁ --|-____         (L₁: steep, few tokens move price a lot)
          |
          initial_sqrt_price

Key Curve Parameters

sqrt_start_price

The initial price when the pool opens. Token price starts here and moves up as buyers purchase.

sqrt_price per segment

Each segment’s sqrt_price is the upper price bound of that segment. When the current price reaches it, trading moves to the next segment.

migration_sqrt_price

The price at which the pool migrates. Derived from migration_quote_threshold and the total curve:
When: quote_reserve >= migration_quote_threshold → migrate

swap_base_amount

Total base tokens available for sale through the curve:
swap_base_amount = Σ Δbase_per_segment
This is pre-calculated from the curve definition and stored in config.

Token Supply Models

Base tokens are minted on demand as buyers purchase. The total supply grows with each buy.
  • fixed_token_supply_flag = 0
  • Requires the token_update_authority to be set so the program can mint
  • Post-migration: minting authority is revoked
Best for: Most meme coin / community launches.

Visualizing Curve Shapes

Different curve shapes serve different launch strategies:
A steep early segment rewards early buyers with a lower average price, then the curve flattens as the supply enters wider distribution. Most DBC launches use this shape.
Segment 1: high liquidity → price barely moves per token sold
Segment 2: low liquidity  → price rises quickly at the end
Wait — actually it’s the opposite: low liquidity = steep price, high liquidity = flat price.Correct shape for “cheap early, expensive later”:
  • Segment 1: low liquidity (steep — small buys push price up a lot)
  • Last segment: high liquidity (flat — many tokens needed to move price)
All segments at roughly equal liquidity creates a near-linear price path. Price discovery is gradual and predictable.
Very low liquidity throughout → price spikes rapidly. Not recommended for broad distribution.

Calculating Curve Parameters

The TypeScript SDK provides helpers for building curve configurations:
import {
  buildCurve,
  buildCurveAndCreateConfig,
  CurveType,
} from "@meteora-ag/dynamic-bonding-curve-sdk";

// Build a standard launch curve
const curveConfig = buildCurve({
  totalTokenSupply: 1_000_000_000, // 1B tokens
  initialMarketCap: 30_000,        // $30K initial market cap in USD
  migrationMarketCap: 500_000,     // $500K migration market cap in USD
  migrationOption: MigrationOption.DammV2,
  tokenBaseDecimal: 6,
  tokenQuoteDecimal: 9,
  lockedVesting: { ... },
  feeSchedulerMode: FeeSchedulerMode.Linear,
});

Constraints

ConstraintValue
Max curve segments16
sqrt_price orderingMust be strictly ascending
Minimum liquidity per segment> 0
token_decimal1–9