Bonding curve
Every launch starts on its own bonding curve: a contract that sells the token at a price that rises as people buy and falls as they sell. The curve is the token's only market until it sells out and graduates. This page explains how it sets the price and what a trade on it costs.
Supply and target
Every launch has the same supply, whatever its pair token:
| Amount | |
|---|---|
| Total supply | 1,000,000,000 tokens, all held by the curve at launch |
| Sale allocation | 780,000,000 tokens (78%), sold by the curve |
| Liquidity allocation | 220,000,000 tokens (22%), never sold; they go into the pool at graduation |
| Graduation target | What the curve raises by selling out: 7.8 ETH for a launch priced in ETH |
A launch priced in another pair token has its own target, worked out when it is created. See Pair tokens. The target and every other term are fixed for the launch at creation.
How the price moves
The price starts low and rises with every buy; every sell lowers it again. The curve is built so that:
- selling all 780,000,000 tokens raises exactly the graduation target;
- the last price on the curve is the price at which the pool opens at graduation, so the price does not jump.
For a launch priced in ETH, the first token costs about 0.0000000028 ETH and the last about 0.000000035 ETH, 12.57 times more. The whole supply is then worth about 35 ETH at the closing price.
To get this shape, the curve prices as if it held some extra pair token and extra tokens on top of what it really holds. These are pricing figures only: they are never paid out, and the extra tokens are never created.
Each curve also keeps a three-minute price average, updated by the first trade of each block from the price before that trade. Your own buys and sells do not use it. Market orders do, so that a price pushed up or down in one block cannot fill them. See How orders fill.
Buying and selling
You always pay or receive the launch's pair token. Every trade carries a minimum to receive, set by your slippage, and a deadline; if either fails, the trade fails instead of filling at a worse price.
- Buying. The fees come out of what you pay; the rest buys tokens. If your buy is bigger than what is left on the curve, you get the remaining tokens and the rest of your payment back in the same transaction. That buy completes the sale and graduates the token.
- Selling. The fees come out of what you receive. Sells are never limited.
- Buy limits. By default one buy can take at most 2% of the supply, and a buy cannot leave the receiving wallet with more than 2%. A buy over either limit fails. See Buy limits.
- Anti-snipe tax. Off by default. When a launch was created with it on, buys in its first few blocks pay a higher fee. See Anti-snipe tax.
For example, GAMA's own curve on the current release is this contract; its trades and its graduation are in its history on Gamascan.
Fees on the curve
A launch's fees are fixed when it is created. Every fee is a share of the pair-token side of the trade:
- Standard mode: a 1% trading fee, 30% to GAMA and 70% to the creator, plus the creator tax if the creator set one (0% to 9%).
- Reward mode: a 1% platform fee to GAMA, plus the holder fee chosen at launch (1% to 4%), shared by holders from the very first trade.
A buy of 0.1 test ETH on a standard launch with a 2% creator tax pays 0.001 test ETH of trading fee (0.0003 to GAMA, 0.0007 to the creator) and 0.002 of creator tax; the other 0.097 buys tokens. The fees are credited to their owners in the same transaction. See Fees.
What the curve holds
The curve keeps the pair token buyers paid in, net of fees, as the backing for its price. That backing is exactly what graduation puts into the pool. Fees never stay in the curve: they go to the fee escrow at once. Rounding in every trade goes against the trader by at most the smallest unit, and those leftovers, like anything sent to the curve by mistake, never enter the price or the pool.
Nobody can withdraw a curve's backing, including the protocol owner. After graduation the curve closes for good and the token trades only in its pool.
