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 (v12+)
The original in-band CLOB matcher (gossiped, unbacked orders matched once per block at a VWAP clearing price) is retired. The live model:- Orders are transactions. A limit order is created by a
TransactionExtraLimitDeposit(SELL_XFG deposits XFG, BUY_XFG deposits HEAT into the pending buckets). Nothing exists in a gossip mempool — every resting order is backed by committed funds. - Execution at block time, against the pool, at the live spot price. Each block the protocol fills resting orders whose limit is crossed by the current pool spot price (
ammGetSpotPrice= HEAT/XFG × COIN):- SELL_XFG fills if
target ≤ spot; the pool buys the XFG and credits HEAT proceeds. - BUY_XFG fills if
target ≥ spot; the pool sells XFG and debits the HEAT budget.
- SELL_XFG fills if
- Partial fills and proceeds. Fills consume part of the deposit; the proceeds (
proceedsXfg/proceedsHeat) are claimable later with the remaining deposit via aTransactionExtraLimitWithdraw(also the auto-return path for expired orders). - Expiry is height-based (
expirationblocks). Expired orders keep their deposit + proceeds claimable. - Taker pays the 1% fee by receiving the fee-adjusted output; the fee value leaves LP reserves into the HEAT-denominated CD accumulator.
- No unbacked orders, no gossip, no user-vs-user matching. The pool is the sole counterparty — this removes the wash-trade / unbacked-order manipulation classes entirely.
P_clear remains the header metric (clearing-price statistic), seeded from the pool ratio in bootstrap; at v12 the volatility feed used for the adaptive spread is the pool spot price itself.
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).