The bonding curve
A vending machine holding the whole supply, whose price is a function of how much it has sold.
Before graduation there is no pool and no other holder to trade against. The curve holds every token and is the only counterparty. Buying draws supply out of it and the price rises; selling puts supply back and the price falls.
The invariant
(x + h) · (y + r) = kx— tokens the curve still holds.y— pairing asset it has raised so far. Starts at zero.handr— virtual reserves that never move. They set the opening price and how steeply it climbs.k— fixed at launch as(supply + h) · r.
The spot price is (y + r) / (x + h), so a launch opens at r / (supply + h) and climbs from there. r is the tuning knob: it decides what the launch is worth at the start and how much it raises before graduating. It is set per pairing asset, because the same nominal number means something different in ETH than in a stock token.
A quote here is the trade
The figure the trade panel shows is produced by the same arithmetic the contract runs, on the same state, so on the curve there is no such thing as a quote that turns out to be approximate. You still send a minimum-received figure with the trade — the state can move between your reading it and your transaction being included, if somebody else trades first — but nothing about the pricing itself is estimated.
That stops being true after graduation. See Trading.
The graduation boundary
A buy that would take the curve past 80% sold does not overshoot and does not revert. It fills exactly up to the boundary, and the pairing asset it could not spend is returned in the same transaction.
A partial fill here is not slippage protection. It is the only refund the curve ever pays, and it exists because a buy has to be able to be the last one. Slippage is handled the way every exchange handles it: a minimum received, or the whole trade reverts.
Rounding
Rounding is uniformly in the protocol’s favour: outputs round down, the reserve the curve keeps rounds up. A trader can never draw out more than the invariant allows, and repeated round-trips leak dust into the curve rather than out of it. The amounts are sub-atomic, and the direction is what matters — the alternative is a curve that can be farmed by trading against itself.
