MECHANICS / CURVE
The bonding curve
Constant product against a phantom quote reserve. There is no counter-capital at launch: the phantom reserve is what gives the first buyer a price, and it never exists as money.
quoteReserve = phantomQuote + realQuotetokensOut = (in × (10000 − fee) × tokenReserve) / (quoteReserve × 10000 + in × (10000 − fee))
-
The reserved allocation. At initialization the curve reserves
supply × phantomQuote / (phantomQuote + graduationThreshold)tokens and refuses to sell through them. That balance is exactly the pool's future allocation, and it is the same point as the quote threshold, so whichever one triggers graduation the pool is seeded with the same amounts at the same price on every launch. Terms whose reserve rounds to zero or to the whole supply are rejected at launch. -
Graduation trigger.
readyToGraduate()is expressed on the token side —sellableTokens() == 0— because a large buy can sail past a quote floor but cannot cross a token stop. -
Partial fills, not reverts. A buy that would cross the allocation is filled up to it,
charged only for what it received, and refunded the rest (
CurveBuyRefunded). Reverting would let anyone grief the last buy of a launch by slipping a small one in ahead. For a clamped fill,minTokensOutis enforced as a bound on price rather than quantity; with no clamping it reduces exactly totokensOut ≥ minTokensOut. - Fees are always quote-denominated. On a buy they come off the input; on a sell they come off the output. The curve never holds a memecoin-denominated fee.
- Fee-on-transfer quote assets. For an ERC-20 launch the curve credits the observed balance delta, not the requested amount, so an asset that under-delivers cannot make the curve promise reserves it never received.
-
Selling closes with the window. Once the sellable allocation is exhausted,
sellis closed too — otherwise a sell landing in that window would put tokens back on the curve and the pool would be seeded deeper and cheaper than the reserved allocation fixes it at. Nobody is stranded:graduateis permissionless, so anyone blocked can settle the launch themselves in the same transaction and trade the pool instead.