Skip to main content
Hearth is Fuego’s native XFG/HEAT exchange: a constant-product AMM with a limit-order overlay. It is the price surface for minting HEAT and for on-chain XFG↔HEAT swaps.

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:
  1. 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.
  2. 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.
  3. Partial fills and proceeds. Fills consume part of the deposit; the proceeds (proceedsXfg / proceedsHeat) are claimable later with the remaining deposit via a TransactionExtraLimitWithdraw (also the auto-return path for expired orders).
  4. Expiry is height-based (expiration blocks). Expired orders keep their deposit + proceeds claimable.
  5. Taker pays the 1% fee by receiving the fee-adjusted output; the fee value leaves LP reserves into the HEAT-denominated CD accumulator.
  6. 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)

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 30% stays in LP reserves. The 70% 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.