> ## 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.

# Interest and yield

> How HEAT CD yield is funded and distributed from protocol fees.

## Source of yield

HEAT CD interest comes from **protocol revenue**, not inflation.

**There are exactly two protocol earnings streams:**

| Stream                                        | Rate                                                             | CD-relevant share                            |
| --------------------------------------------- | ---------------------------------------------------------------- | -------------------------------------------- |
| **Atomic swap fee** (SwapXFG TUI / DeXFG tab) | **1% initiation + 1% claim = 2%** per swap (`SWAP_FEE_RATE_BPS`) | **69%** → CD yield (`SWAP_FEE_CD_SHARE_PCT`) |
| **Hearth swap fee** (on-chain Hearth DEX)     | **1%** per trade (`HEARTH_FEE_BPS`)                              | Hearth routing → CD yield accumulator        |

Atomic swap remainder: **11%** Bonus Vault, **20%** Treasury.

More swap + Hearth volume → more yield. Quiet periods → lower yield. No fixed APY guarantee.

## Not protocol earnings

* **Mint premium** — none. `HEAT_MINT_PREMIUM_BPS = 0`; goes nowhere.
* **CD creation fee** — 0.1% of CD amount, donated to **@fuegoxfg** (Fuego Development Fund). Not CD yield, not treasury.

## Epoch distribution (conceptual)

```
your_interest ≈ (your_HEAT_CD / total_HEAT_CDs) × CD_fee_share_for_epoch
```

Exact formulas live in `Currency::calculateCdInterest` and blockchain fee-pool accounting. Loyalty / tier bonuses may adjust effective yield where enabled.

## Privacy

Principal and accrued interest remain under commitments. Observers see existence and maturity, not amounts.

## Estimating yield

```bash theme={null}
curl -X POST http://127.0.0.1:28080/estimate_cd_yield \
  -H 'Content-Type: application/json' \
  -d '{
    "amount": 100000000,
    "creation_height": 0,
    "current_height": 0
  }'
```

Atomic units: **1 XFG/HEAT coin = 10,000,000** (`COIN`).

## Fee pool info

```bash theme={null}
curl -X POST http://127.0.0.1:28080/get_fee_pool_info \
  -H 'Content-Type: application/json' \
  -d '{}'
```

## Claiming interest

Interest is claimed on **withdraw** or **rollover**, not as a separate “claim rewards” drip. The spend includes `claimedInterest` validated against the pool.

## Do not cite

* “0.3% LP fee funds CDs” — wrong
* “100% of swap fees to CDs” — wrong (69%)
* “80/20 only” — outdated vs 69/11/20
