> For the complete documentation index, see [llms.txt](https://docs.stafihub.io/welcome-to-stafihub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stafihub.io/welcome-to-stafihub/chain/cli-client/ledger.md).

# Ledger

Ledger module allow users to liquidity stake/unstake rTokens and rToken relayers to send proposals.

## Way to Stake/Unstake rToken

* Stake: Take rATOM as an example, only a common transfer on Cosmos Hub is needed to get rATOM. By sending an amount of ATOM to the given pool accounts of rATOM, rToken relayers will receive the corresponding event and send an execute-bond-proposal to StafiHub which will mint rATOM for the from account.
* Unstake: [liquidity-unbond](broken://pages/fRXcpgQcqKCsxPSqaLMb) is the rpc interface for rToken holders to redeem their origin tokens.

## Available Query Commands

| Name                                                             | Description                                    |
| ---------------------------------------------------------------- | ---------------------------------------------- |
| [account-unbond](broken://pages/fRXcpgQcqKCsxPSqaLMb)            | Query AccountUnbond                            |
| [bond-record](broken://pages/fRXcpgQcqKCsxPSqaLMb)               | Query BondRecord                               |
| [bonded-pools](broken://pages/fRXcpgQcqKCsxPSqaLMb)              | Query bonded-pools                             |
| [chain-era](broken://pages/fRXcpgQcqKCsxPSqaLMb)                 | Query getChainEra                              |
| [era-exchange-rate](broken://pages/fRXcpgQcqKCsxPSqaLMb)         | Query EraExchangeRate by a given denom and era |
| [era-exchange-rates](broken://pages/fRXcpgQcqKCsxPSqaLMb)        | Query EraExchangeRatesByDenom                  |
| [era-unbond-limit](broken://pages/fRXcpgQcqKCsxPSqaLMb)          | Query getEraUnbondLimit                        |
| [exchange-rate](broken://pages/fRXcpgQcqKCsxPSqaLMb)             | Show ExchangeRate for a given denom            |
| [exchange-rate-list](broken://pages/fRXcpgQcqKCsxPSqaLMb)        | List all ExchangeRate                          |
| [pool-detail](broken://pages/fRXcpgQcqKCsxPSqaLMb)               | Query subaccounts and threshold of a pool      |
| [pool-unbond](broken://pages/fRXcpgQcqKCsxPSqaLMb)               | Query unbonds by a given pool                  |
| [protocol-fee-receiver](broken://pages/fRXcpgQcqKCsxPSqaLMb)     | Query protocol fee receiver                    |
| [relay-fee-receiver](broken://pages/fRXcpgQcqKCsxPSqaLMb)        | Query relay fee receiver                       |
| [staking-reward-commission](broken://pages/fRXcpgQcqKCsxPSqaLMb) | Query staking reward commission                |
| [total-protocol-fee](broken://pages/fRXcpgQcqKCsxPSqaLMb)        | Query total protocol fee                       |
| [unbond-commission](broken://pages/fRXcpgQcqKCsxPSqaLMb)         | Query getUnbondCommission                      |
| [unbond-relay-fee](broken://pages/fRXcpgQcqKCsxPSqaLMb)          | Query getUnbondRelayFee                        |

### stafihubd query ledger account-unbond

```
stafihubd query ledger account-unbond [denom] [unbonder] [flags]
```

### stafihubd query ledger bond-record

```
stafihubd query ledger bond-record [denom] [txhash] [flags]
```

### stafihubd query ledger bonded-pools

```
stafihubd query ledger bonded-pools [denom] [flags]
```

### stafihubd query ledger chain-era

```
stafihubd query ledger chain-era [denom] [flags]
```

### stafihubd query ledger era-exchange-rate

```
stafihubd query ledger era-exchange-rate [denom] [era] [flags]
```

### stafihubd query ledger era-exchange-rates

```
stafihubd query ledger era-exchange-rates [denom] [flags]
```

### stafihubd query ledger era-unbond-limit

```
stafihubd query ledger era-unbond-limit [denom] [flags]
```

### stafihubd query ledger exchange-rate

```
stafihubd query ledger exchange-rate [denom] [flags]
```

### stafihubd query ledger exchange-rate-list

```
stafihubd query ledger exchange-rate-list [flags]
```

### stafihubd query ledger pool-detail

```
stafihubd query ledger pool-detail [denom] [pool] [flags]
```

### stafihubd query ledger pool-unbond

```
stafihubd query ledger pool-unbond [denom] [pool] [era] [flags]
```

### stafihubd query ledger protocol-fee-receiver

```
stafihubd query ledger protocol-fee-receiver [flags]
```

### stafihubd query ledger relay-fee-receiver

```
stafihubd query ledger relay-fee-receiver [denom] [flags]
```

### stafihubd query ledger staking-reward-commission

```
stafihubd query ledger staking-reward-commission [denom] [flags]
```

### stafihubd query ledger total-protocol-fee

```
stafihubd query ledger total-protocol-fee [flags]
```

### stafihubd query ledger unbond-commission

```
stafihubd query ledger unbond-commission [denom] [flags]
```

### stafihubd query ledger unbond-relay-fee

```
stafihubd query ledger unbond-relay-fee [denom] [flags]
```

### Useful Tx Commands

| Name                                                    | Description   |
| ------------------------------------------------------- | ------------- |
| [liquidity-unbond](broken://pages/fRXcpgQcqKCsxPSqaLMb) | redeem rToken |

### stafihubd tx ledger liquidity-unbond

```
stafihubd tx ledger liquidity-unbond [pool] [value] [recipient] [flags]
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.stafihub.io/welcome-to-stafihub/chain/cli-client/ledger.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
