> ## 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`) | 80% CD · 20% Bonus Vault (v11+; pre-v11 replay is 69/11/20) |
| Hearth trade | 1% (`HEARTH_FEE_BPS`) | 30% CD · 70% maker rebate at v11 (70/30 at v12; LPs when the pool is maker) |

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

***

## GET /get\_fee\_pool\_info

Current CD-oriented fee pool state.

**Request:** `{}`

**Response (shape):**

```json theme={"dark"}
{
  "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={"dark"}
{
  "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.


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