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

# Fees and timeouts

> swapXFG 1% fee split 69/11/20, timelocks, refunds.

## Protocol swap fee (1% + 1% = 2% per swap)

Every completed atomic swap charges the protocol fee **twice**: **1% on initiation** and **1% on claim** (`SWAP_FEE_RATE_BPS = 100` each side) — a total of **2%** per cross-chain swap. Initiated from the SwapXFG TUI or the DeXFG tab in the Fuego-Wallet GUI.

| Destination   | Share   |
| ------------- | ------- |
| CD yield pool | **69%** |
| Bonus Vault   | **11%** |
| Treasury      | **20%** |

Example: swap **100 XFG** → **2 XFG** protocol fee (1 + 1) → **1.38** CD / **0.22** Bonus / **0.40** Treasury (plus normal miner/tx fees).

Not paid to the counterparty. Not the Hearth 1% fee (that is a separate protocol stream).

> **Protocol earnings are exactly two streams:** Hearth swap fees (1% per trade) and atomic swap fees (2% per swap). Mint premium is 0 bps (goes nowhere), and the 0.1% CD creation fee is a donation to @fuegoxfg — not protocol revenue.

## Counterparty fees

ETH gas, BTC/BCH miner fees, etc. are separate.

## Stuck-swap monitoring

| Phase                 | Typical warning threshold |
| --------------------- | ------------------------- |
| Key / setup stall     | \~10 minutes              |
| Funded but incomplete | \~30 minutes              |

Warnings do not auto-refund.

## Refund

After timelock expiry:

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

Refund before expiry fails. Check status with `getswapstatus` / `listswaps`.

## Persistence

Swap state is written after transitions. Restart the daemon and run `listswaps` before acting.
