> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dune.com/llms.txt
> Use this file to discover all available pages before exploring further.

# xrpl.amm_pools

> The 'xrpl.amm_pools' table contains all Automated Market Maker (AMM) liquidity pools on the XRP Ledger, one row per pool.

export const TableSample = ({tableName, tableSchema}) => <>
    <div className="hidden dark:block">
      <iframe src={`https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=${tableSchema}&table_name_t6f0df=${tableName}&darkMode=true`} style={{
  width: '100%',
  height: '500px',
  border: 'none',
  marginTop: '10px'
}} />
    </div>
    <div className="dark:hidden">
      <iframe src={`https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=${tableSchema}&table_name_t6f0df=${tableName}`} style={{
  width: '100%',
  height: '500px',
  border: 'none',
  marginTop: '10px'
}} />
    </div>
  </>;

## Table Description

Contains all Automated Market Maker (AMM) liquidity pools on the XRP Ledger, one row per pool. Each pool pairs two assets and issues LP tokens to liquidity providers in return for their deposit. Use this table to analyze pool composition, trading fees, liquidity depth, and pool lifecycle events.

## Column Descriptions

| **Column**                       | **type**  | **Description**                                                                                                                                                                             |
| -------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **pool\_id**                     | bigint    | Unique surrogate primary key for the AMM pool record                                                                                                                                        |
| **amm\_account\_id**             | bigint    | The on-ledger account that represents this AMM pool (→ accounts)                                                                                                                            |
| **amm\_account\_address**        | string    | XRPL address of the AMM pool's on-ledger account                                                                                                                                            |
| **token\_a\_id**                 | bigint    | Surrogate key for the first asset in the pool (→ tokens)                                                                                                                                    |
| **token\_a\_currency**           | string    | Currency code of the first pool asset (e.g. XRP, USD, or a hex-encoded custom code)                                                                                                         |
| **token\_a\_issuer\_address**    | string    | XRPL address of the account that issued the first pool asset; null if the asset is XRP                                                                                                      |
| **token\_a\_pool\_balance**      | double    | Current reserve of the first asset held in the pool; shifts with each swap                                                                                                                  |
| **token\_b\_id**                 | bigint    | Surrogate key for the second asset in the pool (→ tokens)                                                                                                                                   |
| **token\_b\_currency**           | string    | Currency code of the second pool asset (e.g. XRP, USD, or a hex-encoded custom code)                                                                                                        |
| **token\_b\_issuer\_address**    | string    | XRPL address of the account that issued the second pool asset; null if the asset is XRP                                                                                                     |
| **token\_b\_pool\_balance**      | double    | Current reserve of the second asset held in the pool; shifts with each swap                                                                                                                 |
| **lp\_token\_id**                | bigint    | Surrogate key for the LP token issued to liquidity providers in exchange for their deposit (→ tokens)                                                                                       |
| **lp\_token\_currency**          | string    | Currency code of the LP token representing a proportional share of this pool                                                                                                                |
| **lp\_token\_balance**           | varchar   | Total outstanding LP token supply across all liquidity providers, stored as a string to preserve XRPL IOU precision; cast to a numeric type for arithmetic. Decreases as providers withdraw |
| **trading\_fee**                 | double    | Percentage fee charged on each swap through this pool; collected and shared among liquidity providers                                                                                       |
| **created\_ledger\_index**       | bigint    | Ledger index at which this AMM pool was created                                                                                                                                             |
| **created\_timestamp**           | timestamp | Timestamp when this AMM pool was created                                                                                                                                                    |
| **last\_updated\_ledger\_index** | bigint    | Ledger index of the most recent swap, deposit, or withdrawal that changed this pool's state                                                                                                 |
| **last\_updated\_timestamp**     | timestamp | Timestamp of the most recent change to this pool's state                                                                                                                                    |
| **current\_xrp\_balance**        | double    | Current XRP balance of the AMM pool account, if one of the paired assets is XRP                                                                                                             |
| **is\_deleted**                  | boolean   | Whether this pool has been dissolved and is no longer active on the ledger                                                                                                                  |
| **deleted\_timestamp**           | timestamp | Timestamp when this pool was dissolved; null if still active                                                                                                                                |

## Table Sample

<TableSample tableSchema="xrpl" tableName="amm_pools" />
