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

# Compound interest via rollover

> Roll over a mature HEAT CD to reinvest principal plus interest.

## What rollover does

When your **HEAT** CD matures:

1. **Withdraw** — receive HEAT principal + interest spendable
2. **Rollover** — open a new HEAT CD for `principal + interest`

Rollover is one atomic flow: spend the old commitment (claim interest) and create a new commitment for the combined HEAT amount.

## Example

|                | Value                |
| -------------- | -------------------- |
| Initial CD     | 1,000 HEAT           |
| Interest       | 50 HEAT              |
| After rollover | New CD of 1,050 HEAT |

## RPC pattern

```bash theme={null}
curl -X POST http://127.0.0.1:28080/rollover_deposit \
  -H 'Content-Type: application/json' \
  -d '{
    "deposit_id": "0",
    "new_term": 6
  }'
```

`new_term` is in epochs (respect min/max). Use `0` only if your wallet defines “same as previous.”

## Rules

* Deposit must be **mature**
* Asset remains **HEAT** (not converted to XFG by rollover)
* New commitment is unlinkable to the old one under normal privacy assumptions

## Mature check

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