> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usexfg.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Dual-asset architecture

> XFG and HEAT roles, mint path, CDs, Hearth, and fee routing.

Fuego’s financial layer is built on two native assets and shared fee plumbing.

## Assets

| Asset | What it is | How you get it |
| - | - | - |
| **XFG** | Base-layer CryptoNote privacy coin | Mine, receive, atomic swap in |
| **HEAT** | Flatcoin / colored commitment outputs | **Mint** by burning XFG (`mintHeatV10`) priced by Hearth TWAP |

Legacy names that are **not** the current model:

* **Embers\_Heat** / fixed 10M:1 conversion — deprecated; do not use `convertXfgToHeat()` for minting
* **COLD** deposits — removed
* **XFG term deposits as CDs** — removed; CDs lock **HEAT**

## Two-step deposit model

```
1) Mint HEAT     burn XFG → HEAT   (term == HEAT_TERM / mintHeatV10)
2) Open a CD     lock HEAT → yield (term is a real block/epoch length, ≠ HEAT_TERM)
```

Step 2 is the only “deposit” that earns APY. You cannot deposit a deposit, and you cannot skip minting and lock XFG as a CD.

Details: [DEPOSIT\_ARCHITECTURE.md](https://github.com/usexfg/fuego-suite/blob/master/DEPOSIT_ARCHITECTURE.md) (repo) and [How CDs work](https://docs.usexfg.org/features/commitment-deposits/how-cds-work.md).

## Hearth

**Hearth** is the on-chain **XFG/HEAT** market. One pool inventory, two uses: constant-product AMM (`reserveXfg × reserveHeat`) for LP shares, direct swaps, and the post-auction backstop; the same reserves quoted as depth-band makers in the per-block call auction (`generatePoolOrders()`, `HEARTH_DEPTH_BAND_PCT`). User limits are tx-extra deposits. It:

* Discovers **P\_clear** in the auction (mint TWAP); pool spot is bootstrap/fallback and the swap/backstop curve
* Charges **`HEARTH_FEE_BPS = 100` (1%)** per trade → **30% CD yield / 70% maker rebate** at v11, flipping to **70% CD / 30% maker** at v12 (LPs receive the maker share on pool fills)

## swapXFG

**swapXFG** (SwapDaemon) is peer-to-peer **cross-chain** atomic swap infrastructure (adaptor signatures / chain clients). Completed XFG-side swaps charge **1%**, split **80% CD yield / 20% Bonus Vault** from v11 (pre-v11 blocks settled 69/11/20 and replay that split).

## Fee map (code)

| Constant | Value | Meaning |
| - | - | - |
| `SWAP_FEE_RATE_BPS` | 100 | 1% on XFG atomic-swap side |
| `SWAP_FEE_CD_SHARE_PCT_V11` | 80 | → CD yield pool |
| `SWAP_FEE_BONUS_VAULT_PCT_V11` | 20 | → Bonus Vault |
| `SWAP_FEE_TREASURY_SHARE_PCT_V11` | 0 | Treasury leg retired at v11 |
| `SWAP_FEE_*_PRE_V11` | 69 / 11 / 20 | The split pre-v11 blocks settled; reorg replay only |
| `HEARTH_FEE_BPS` | 100 | 1% Hearth trade fee |
| `HEARTH_CD_SHARE_PCT_V11` / `_V12` | 30 / 70 | CD share of the Hearth fee; the maker rebate is the remainder |
| `HEAT_MINT_PREMIUM_BPS` | 100 | 1% of each mint's burn → withheld XFG to the AuntPoL XFG leg, the HEAT it buys to the HEAT leg |
| `EPOCH_DURATION_BLOCKS` | 900 | Mainnet epoch (\~5 days at \~480s blocks) |
| `CD_MIN_EPOCHS` / `CD_MAX_EPOCHS` | 6 / 72 | \~1 month … \~1 year HEAT CD terms |

## Mental model

```
          ┌─────────────┐
   mine / │     XFG     │── burn ──► HEAT mint (TWAP)
   swap   └──────┬──────┘              │
                 │                     ▼
                 │              ┌─────────────┐
                 └──── Hearth ──┤    HEAT     │── lock ──► CD yield
                        ▲       └─────────────┘
                        │
              swap fees + Hearth fees
                        │
                        ▼
         CD pool / Bonus Vault / LP / dev fund
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.