Bonding curve

Price is a function of the pool, not of a counterparty.

Pricing

Each pool holds a ZEC reserve and a token reserve. Trades preserve the product of the two reserves, so buying pushes the price up along the curve and selling pushes it back down.

text
price = zecReserve / tokenReserve

buy:  tokensOut = tokenReserve - (k / (zecReserve + zecIn * 0.99))
sell: zecOut    = zecReserve   - (k / (tokenReserve + tokensIn))  , minus 1%

where k = zecReserve * tokenReserve

Why there is no order book

Because the pool always quotes a price, there is no need for a resting bid or ask. A trade either executes against the curve at the current reserve ratio or it does not execute at all. This also means there are no limit prices and no partial fills.

Worked example

ActionZEC in / outEffect on price
LaunchCurve seeded with the full 1B supply
Buy 1 ZEC1 ZEC inPrice rises, tokens leave the pool
Buy 5 ZEC5 ZEC inPrice rises further along the curve
Sell tokensZEC credit outPrice falls back toward the reserve ratio
Large orders move the price against you. Because settlement is instant and the quote is taken at execution, a big buy pays a materially higher average price than the spot quote.

Fee

A flat 1% fee applies to both sides of every trade. It is taken from the input amount before the curve math is applied.