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

# Create a Fuego Time Deposit and Earn Interest

> Lock XFG in a protocol-level time deposit via the wallet RPC or the TUI Elderfier menu to earn interest without any third-party custodian.

Fuego's time deposit system is built directly into the protocol, not a smart contract or external service. You lock a minimum of 800 XFG for a fixed term of 16,440 blocks (approximately 3 months at the 480-second block target), and the network pays you interest when the term matures. No third party ever holds your funds. You can create a deposit through the `walletd` JSON-RPC API or through the Elderfier menu in the Terminal User Interface (TUI).

## Parameters at a glance

| Parameter              | Value                      |
| ---------------------- | -------------------------- |
| Minimum deposit amount | 800 XFG                    |
| Term length            | 16,440 blocks (\~3 months) |
| Transaction fee        | 0.008 XFG                  |
| Block target           | 480 seconds                |

<Warning>
  Deposits cannot be withdrawn early. Once you submit a `createDeposit` transaction, the locked XFG is inaccessible until the full 16,440-block term has elapsed. Do not deposit funds you may need before the term ends.
</Warning>

## Create a deposit via the wallet RPC

<Steps>
  <Step title="Start walletd and confirm sync">
    The `walletd` daemon must be running and fully synced before you create a deposit. Start it and wait for the sync indicator to reach the current chain height:

    ```bash theme={null}
    ./walletd --wallet-file deposits.wallet --daemon-host 127.0.0.1 --daemon-port 18180 --bind-port 8070
    ```
  </Step>

  <Step title="Look up your source address">
    Call `getAddresses` to retrieve the address you want to deposit from:

    ```bash theme={null}
    curl -s -X POST http://127.0.0.1:8070/json_rpc \
      -H 'Content-Type: application/json' \
      -d '{"jsonrpc":"2.0","method":"getAddresses","params":{},"id":1}'
    ```

    Note the `fire…` address you want to use as `sourceAddress` in the next step.
  </Step>

  <Step title="Submit the createDeposit request">
    Send the JSON-RPC call with your amount in atomic units (1 XFG = 10,000,000 atomic units, so 800 XFG = 8,000,000,000):

    ```json theme={null}
    {
      "jsonrpc": "2.0",
      "method": "createDeposit",
      "params": {
        "amount": 8000000000,
        "term": 16440,
        "sourceAddress": "fireXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      },
      "id": 1
    }
    ```

    A successful response returns a `transactionHash`:

    ```json theme={null}
    {
      "jsonrpc": "2.0",
      "result": {
        "transactionHash": "a1b2c3d4e5f6..."
      },
      "id": 1
    }
    ```

    Save this hash — you will need the `depositId` from `getDeposit` to withdraw later.
  </Step>

  <Step title="Monitor the deposit balance">
    Call `getBalance` to watch the deposit move from locked to unlocked as the term progresses:

    ```bash theme={null}
    curl -s -X POST http://127.0.0.1:8070/json_rpc \
      -H 'Content-Type: application/json' \
      -d '{"jsonrpc":"2.0","method":"getBalance","params":{"address":"fireXXX..."},"id":1}'
    ```

    <Note>
      The `getBalance` response includes four fields: `availableBalance`, `lockedAmount`, `lockedDepositBalance`, and `unlockedDepositBalance`. While your deposit term is active, the principal sits in `lockedDepositBalance`. Once the term completes, it moves to `unlockedDepositBalance` along with the earned interest. You must call `withdrawDeposit` to return the funds to your spendable balance.
    </Note>
  </Step>

  <Step title="Withdraw after the term ends">
    Once the term has elapsed and `unlockedDepositBalance` is non-zero, withdraw using the deposit's ID:

    ```json theme={null}
    {
      "jsonrpc": "2.0",
      "method": "withdrawDeposit",
      "params": {
        "depositId": 0
      },
      "id": 1
    }
    ```

    A successful response returns the `transactionHash` of the withdrawal, and the principal plus interest will appear in your `availableBalance`.
  </Step>
</Steps>

## Create a deposit via the TUI

If you prefer a graphical terminal interface, the Fuego TUI provides the same functionality through the **Elderfier** menu:

1. Launch the TUI: `./tui/build/fuego-tui`
2. Navigate to the **Elderfier** section using the arrow keys or `j`/`k`.
3. Select **Create Deposit** and enter your amount and confirm the 16,440-block term.
4. Confirm the transaction to broadcast it.

The TUI displays locked and unlocked deposit balances on the overview screen and will notify you when the term expires.

## Burn2Mint

Fuego also supports a separate **Burn2Mint** mechanism, available through the TUI, which allows you to burn XFG in exchange for a mint reward. Burn2Mint operates independently from the time deposit system described above. Access it through the dedicated Burn2Mint menu in the TUI.
