Bonding Curves: Bootstrapping Markets Without Initial Liquidity

A primer on how bonding curves enable instant market creation without upfront liquidity

12/18/2025

Since launching the social trading platform Rift, one aspect that often raises questions is the mechanics of how users create and trade tokens: how does trading work? Who am I buying from, and who am I selling to? Here's a short article aiming to provide answers.

In traditional markets, launching a new token usually requires providing liquidity upfront, for example, by creating a liquidity pool on Uniswap. This is poor user experience for most users, as it requires capital and some understanding of how market-making works. Bonding curves solve this problem: they allow anyone to launch a token and start trading immediately, without needing any initial liquidity. The curve itself acts as a self-contained market, automatically pricing trades based on supply.

WARNING: This article contains some math. The algebra is relatively simple, so I will focus on the key steps and intuition rather than full derivations. The goal is to help you understand how bonding curves work and, if you want, how to implement them yourself.

A bonding curve is a mathematical relation between the price of a token P(S)P(S) and its supply SS. There are multiple variants, but here we focus on the linear bonding curve as it is used in Rift:

P(S)=kS+bP(S) = k S + b

Where kk is the rate at which the price increases with supply and b0b \geq 0 is the initial price. The system supports both buy and sell operations. Buying increases the supply, minting new tokens and thus increases the price, and selling decreases the supply, burning existing tokens and thus decreases the price. In Rift, the counterpart asset is ETH: buying tokens requires ETH, and selling tokens returns ETH from the reserves. The ETH accumulated from buy orders is stored within the smart contract and used to pay sellers. All accounting is performed within the contract, ensuring transparency and immutability.

Buying

Let's consider a token with supply S1S_1 and a price P1=kS1+bP_1 = k S_1 + b. Buying tokens increases the supply to S2S_2, and the price becomes P2=kS2+bP_2 = k S_2 + b. We define ΔP=P2P1\Delta P = P_2 - P_1 and ΔS=S2S1\Delta S = S_2 - S_1.

Bonding curve buy

Because the price changes continuously with supply, the total ETH required to buy ΔS\Delta S tokens is the sum of all incremental prices along the supply curve. Mathematically, this is the integral of P(S)P(S) from S1S_1 to S2S_2, i.e. the area under the price curve ΔE=S1S2P(S)dS\Delta E= \int_{S_1}^{S_2} P(S) dS. For the linear bonding curve, this evaluates to:

ΔE=ΔSP1+kΔS22\Delta E= \Delta S P_1 + \frac{k \Delta S^2}{2}

Intuitively, the first term ΔSP1\Delta S P_1 is the cost if the price stayed constant, and the second term kΔS22\frac{k \Delta S^2}{2} captures the extra cost due to the price increasing along the curve. Notice that as supply grows, the ETH required grows quadratically with the number of tokens purchased, rewarding early buyers.

Sometimes, instead of specifying how many tokens we want to buy, we might know how much ETH we want to spend (ΔE\Delta E) and need to calculate how many tokens that will get us. In this case, we can simply use the equation we have and solve for ΔS\Delta S:

ΔS=P12+2kΔEP1k\Delta S = \frac{\sqrt{P_1^2 + 2 k \Delta E} - P_1}{k}

Now we have expressions for converting ETH to tokens and the other way around during a buy operation. This is exactly what is needed to support exact in and exact out trades. Let's look at how selling works.

Selling

Selling tokens is conceptually the reverse of buying. Suppose we have a token with supply S1S_1 and price P1=kS1+bP_1 = k S_1 + b. Selling tokens decreases the supply to S2S_2 and the price becomes P2=kS2+bP_2 = k S_2 + b. We define ΔP=P1P2\Delta P = P_1 - P_2 and ΔS=S1S2\Delta S = S_1 - S_2.

Bonding curve sell

As with buying, the total ETH received from selling ΔS\Delta S tokens is the sum of all incremental prices along the supply curve. Mathematically, this is the integral of P(S)P(S) from S2S_2 to S1S_1, i.e. ΔE=S2S1P(S)dS\Delta E = \int_{S_2}^{S_1} P(S) dS. So for the linear bonding curve, we get:

ΔE=ΔSP1kΔS22\Delta E= \Delta S P_1 - \frac{k \Delta S^2}{2}

The second term kΔS22\frac{k \Delta S^2}{2} adjusts for the fact that each token sold lowers the price along the curve. As a result, the average ETH received per token decreases for larger sales.

Just as with buying, we might know the total ETH we want to receive (ΔE\Delta E) and need to determine how many tokens must be sold. Solving the integral for ΔS\Delta S gives:

ΔS=P1P122kΔEk\Delta S = \frac{P_1 - \sqrt{P_1^2 - 2 k \Delta E}}{k}

Note: this requires P122kΔEP_1^2 \geq 2k \Delta E for the square root to be real, which in practice means that the bonding curve needs to have enough ETH reserves to fulfil the order.

This provides a full two-way mapping for selling: converting tokens to ETH and determining the required number of tokens to obtain a specific ETH amount. Together with the buying formulas, this fully describes how the linear bonding curve facilitates token trades.

Migration to liquidity pool

While bonding curves excel as issuance mechanisms, their limitations become apparent as markets mature. Bonding curves are capital inefficient at scale: all ETH reserves sit under the curve and contribute only marginally to price discovery.

Although bonding curves accumulate capital over time, this capital does not increase market depth. On a linear curve P(S)=kS+bP(S)=kS + b, buying ΔS\Delta S tokens always moves the price by kΔSk \Delta S, regardless of how much ETH has previously been deposited. While the absolute cost of trades increases with supply, the price sensitivity per unit traded remains unchanged. Accumulated reserves reflect past issuance rather than available liquidity at the current price.

In contrast, liquidity pools allow capital to compete and concentrate near the current price, dramatically improving capital efficiency. As total value locked increases, slippage decreases proportionally, enabling markets to scale organically. For these reasons, bonding curves are best used as a bootstrapping mechanism, with mature tokens transitioning to market-driven liquidity pools.

Thus, on Rift, when the total ETH reserves RER_E for a token has reached a predefined threshold, the token can be migrated to a Uniswap V4 liquidity pool. The migration is permissionless and can be triggered by anyone.

All ETH accumulated in the bonding curve is deposited as liquidity. Since Uniswap V4 pools require two-sided liquidity, new tokens are minted and allocated as RTR_T. Ownership of both the ETH and newly minted tokens is forfeited; these tokens do not enter the circulating supply and exist solely to facilitate trading.

The exact amount to mint and allocate RTR_T is calculated such that the price after the migration on the liquidity pool matches the price on the bonding curve before migration. Since the LP position is not managed, liquidity is distributed uniformly, and we can use the constant product formula to calculate the price after the migration:

PU=RERTP_U = \frac{R_E}{R_T}

At the time of migration, the bonding curve price is PB=kSB+bP_B = k S_B + b. The ETH reserves is exactly the area under the whole bonding curve:

RE=0SBP(S)dS=kSB22+bSBR_E = \int_{0}^{S_B} P(S) dS = k \frac{S_B^2}{2} + b S_B

Matching the price and solving for RTR_T we get:

RT=SB(kSB2+b)kSB+bR_T = \frac{S_B (k \frac{S_B}{2} + b)}{k S_B + b}

Note that when b=0b = 0 as in the case of the current version of Rift, this simplifies to RT=SB2R_T = \frac{S_B}{2}, meaning that we mint 50% of the total supply for liquidity allocation to ensure price continuity. After migration, trading continues on the Uniswap V4 pool with the same fee structure, enabled by the custom pool hooks.

Key takeaways

Bonding curves provide a simple, permissionless way to bootstrap token markets, automatically adjusting prices as supply changes. On Rift, buying or selling a token doesn't require a counterparty — trades interact directly with a smart contract that calculates the price from the bonding curve. While this mechanism works well for initial issuance, larger markets benefit from traditional liquidity pools, which offer better capital efficiency and lower slippage.

If you want to see how this is implemented in Rift, check out the TokenFactory.sol contract here.