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

# Fee pool API

> RPC for CD fee pool, epoch history, yield estimates, treasury.

## Fee routing (code truth)

| Stream               | Rate                     | Split                                      |
| -------------------- | ------------------------ | ------------------------------------------ |
| Atomic swap XFG side | 1% (`SWAP_FEE_RATE_BPS`) | 69% CD · 11% Bonus Vault · 20% Treasury    |
| Hearth trade         | 1% (`HEARTH_FEE_BPS`)    | 100% CD · 0% LP (LPs earn the swap spread) |

Atomic units: **1 coin = 10,000,000**.

***

## GET /get\_fee\_pool\_info

Current CD-oriented fee pool state.

**Request:** `{}`

**Response (shape):**

```json theme={null}
{
  "fee_pool_balance": 5000000000,
  "current_epoch_swap_fees": 125000000,
  "total_cd_locked": 100000000000,
  "current_epoch_number": 42,
  "status": "OK"
}
```

| Field                     | Description                                           |
| ------------------------- | ----------------------------------------------------- |
| `fee_pool_balance`        | CD interest pool balance (atomic)                     |
| `current_epoch_swap_fees` | Fees accrued this epoch (atomic)                      |
| `total_cd_locked`         | Aggregate HEAT CD principal accounting field (atomic) |
| `current_epoch_number`    | Epoch index                                           |

***

## GET /get\_epoch\_history

**Request:** `{ "count": 10 }` (max 100)

Returns recent epochs with swap fee totals and CD-locked snapshots.

***

## POST /estimate\_cd\_yield

**Request:**

```json theme={null}
{
  "amount": 100000000,
  "creation_height": 90000,
  "current_height": 0
}
```

`current_height: 0` = use chain tip. Amount is HEAT CD principal in atomic units.

***

## GET /get\_treasury\_info

Treasury balance (receives **20%** of atomic swap fees). Read-only operationally for most wallets.
