What is bonding curve?
A formula that sets a token's price automatically as a function of its supply, rising as more tokens are bought.
Bonding curve diagram example
A bonding curve is a rule that links the price of a token to the number of tokens in existence. As people buy, supply rises and so does the price; as they sell, supply falls and the price drops. It matters because it gives a market with continuous pricing and always-available buying and selling, without needing a counterparty.
How it works
A contract holds a reserve of money. When someone buys, they pay the current price and new tokens are created. When someone sells, the tokens are destroyed and money is paid out from the reserve. The price is a function of supply, for example price = k × supply for a linear curve, or price = k × supply² for a steeper one.
The shape of the curve is the main design choice. A steep curve rewards early buyers strongly but can be hard on late ones. A flat curve is more stable. There is a risk of sudden sell-offs because early holders can exit at a profit, and a reserve that must cover everyone's sales.
Example
Say a linear curve has price = 0.01 × supply. At a supply of 100, the price is 1. To buy the next 10 tokens, the cost is about the average price times 10: the price runs from 1.00 to 1.10, so the average is 1.05 and the cost is 10.50. Supply is now 110 and the price is 1.10. Selling those 10 back returns the same 10.50 from the reserve, ignoring fees. These are illustrative numbers.
How to model it in Machinations
Use a Pool for token supply and a Pool for the reserve. A Register computes the price from the supply with a formula, linked by a state connection. A Converter turns paid money into tokens at that price. Make the slope a Lever. Play a series of buys and sells and chart price and reserve, then try a steeper curve to see how much more the early buyers gain.
See bonding curve in a system you can Play
Build the rules in a Machinations diagram, change a value and Play it to watch how the system responds.