Skip to main content
Hearth is Fuego’s native XFG/HEAT exchange. One pool inventory, two uses: the constant-product AMM is the balance sheet; the depth band is that inventory quoted as makers in the per-block call auction. It is the price surface for minting HEAT and for on-chain XFG↔HEAT trades.

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:
  1. 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.
  2. Call auction first. Each block, resting user deposits plus pool depth-band makers (generatePoolOrders(), 0xF0 ids, sized from HEARTH_DEPTH_BAND_PCT of reserves, spread 30–300 bps) cross at a max-volume clearing price. User-vs-user fills move escrow/proceeds. Pool-maker fills move reserveXfg/reserveHeat. User orders win same-price ties.
  3. 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). Direct ammSwap txs also use this curve.
  4. Partial fills and proceeds. Fills consume part of a user deposit; proceeds (proceedsXfg / proceedsHeat) plus remainder are claimable via TransactionExtraLimitWithdraw (also the expiry return path).
  5. Expiry is height-based. Expired orders keep deposit + proceeds claimable and skip that block’s auction/backstop.
  6. 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)

On auction fills the taker is the rationed side; the maker side receives the rebate pool pro-rata. On pool-intermediated fills (backstop/AMM) the pool is the maker, so the maker share stays in LP reserves. The CD share accrues in a HEAT-denominated accumulator (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).

Roles

Privacy

LP and commitment-style positions use the chain’s commitment / privacy primitives. Exact share sizes are not meant to be public account balances like a CEX.