What Hearth is not
- Not a centralized order book hosted by a company
- Not the same as swapXFG (cross-chain atomic swaps)
- Not DIGM
Orderbook model (v11+)
The original gossiped in-band CLOB (unbacked orders) is retired. The live model uses one pool inventory two ways — not AMM or depth band:- User limits are transactions. A limit order is a
TransactionExtraLimitDeposit(SELL_XFG deposits XFG, BUY_XFG deposits HEAT into pending buckets). No gossip mempool of unbacked quotes. - Call auction first. Each block, resting user deposits plus pool depth-band makers (
generatePoolOrders(), 0xF0 ids, sized fromHEARTH_DEPTH_BAND_PCTof reserves, spread 30–300 bps) cross at a max-volume clearing price. User-vs-user fills move escrow/proceeds. Pool-maker fills movereserveXfg/reserveHeat. User orders win same-price ties. - AMM backstop second. Unfilled user deposits whose limit is crossed by live spot (
ammGetSpotPrice= HEAT/XFG × COIN) fill on the constant-product curve, volume-capped (HEARTH_BACKSTOP_MAX_BPS). DirectammSwaptxs also use this curve. - Partial fills and proceeds. Fills consume part of a user deposit; proceeds (
proceedsXfg/proceedsHeat) plus remainder are claimable viaTransactionExtraLimitWithdraw(also the expiry return path). - Expiry is height-based. Expired orders keep deposit + proceeds claimable and skip that block’s auction/backstop.
- Taker pays the 1% fee. On auction fills the rationed side is the taker and makers get the 30% rebate. On backstop/AMM fills the pool is the maker, so 30% stays with LPs.
P_clear is the auction clearing price (header metric), seeded from the pool ratio in the 144-block bootstrap. The depth-band spread’s volatility feed is the pool spot price.
Fee (live code)
cdHearthFeeAccumulator) and is minted into the CD yield vault (CD_APY_POOL) at each epoch boundary; the consumed XFG side is burned 50/50 (Eternal Flame / SWF).

