# šBonding Curve

In the following sections, we introduce our V1 Bonding curve. However, we may update the bonding curve before launching on the mainnet.

### What is a Bonding Curve

Before listing on DEX, each token launched on flap is bonded to a bonding curve. When you buy tokens from the bonding curve, you send your ETH (or other quote token, usually the native token of that chain) to the bonding curve as a reserve, and the bonding curve mints tokens to your address. Or if you sell your tokens to the bonding curve, the bonding curve would burn your selling tokens and send the ETH back to you.

A bonding curve defines the relationship between the trading token's supply and the reserve (i.e. Quote tokens like ETH or BNB). The change of the reserve respect to the supply is the price. Our bonding curve is based on a constant product equation. You may have heard about this equation, which Uniswap popularized.

You may even wonder what is the difference between a bonding curve token launching platform like flap and Unsiwap? The answer is the liquidity. The liquidity does not change on the bonding curve. However, anyone can add liquidity to the Uniswap pools.

### Flap's Bonding Curve-Alpha

The token created on our platform has the max supply of $10^9$ , with 18 decimals. For each token, the remaining (not minted) supply of the token and the reserves(ETH or the native token of the target chain) follow the following constant product equation:

$r$ is a constant parameter dependent on the target chain. In the following sections, we use $r = 15$ (the parameter for BSC) as an example to explain how it works. Substituting 15 into the above equation, we get the following simpler one:

$x$ is the remaining supply of the token, initially, it is $10^9$

$y$ is the reserve of ETH , it is 0 in the beginning, which means all the liquidity are provided with the token then.

To better understand the bonding curve, we use $s$ to denote the token's current (minted) supply. And the relationship between $s$ and $x$ is straightforward:

We can get the following relationship between $s$ and $y$ :

Here is the graph of the above equation:

The x-axis is the current supply $s$

The y-axis is the reserve (ETH) collected

As you can see, the current supply will approach $10^9$ , but never reach it.

And the price of the token is the derivative of the reserve (y) with respect to the current supply (s):

And the price curve is as follows:

Last updated