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

> The 'xrpl.amm_events' table is a unified view of all activity in XRP Ledger AMM liquidity pools, combining deposits, withdrawals, fee-setting votes, and auction-slot bids.

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

A unified view of all activity in XRP Ledger AMM liquidity pools, combining deposits, withdrawals, fee-setting votes, and auction-slot bids in a single table for cross-event analytics. Each row represents one AMM event with the event category identified by event\_type; columns specific to a particular event kind are null for rows of other types. Covers all AMM events recorded on the XRPL mainnet since the AMM amendment was activated.

## Column Descriptions

| **Column** | **type** | **Description** |
| - | - | - |
| **pool\_id** | bigint | Surrogate key identifying the AMM liquidity pool in which this event occurred. |
| **pool\_address** | string | On-ledger XRP Ledger account address of the AMM pool (the pool's own account), provided for direct lookup on explorers. |
| **transaction\_id** | bigint | Internal surrogate key for the on-ledger transaction that triggered this event. |
| **transaction\_hash** | string | Cryptographic hash of the XRP Ledger transaction that triggered this event, usable for direct ledger lookup. |
| **account\_id** | bigint | Internal surrogate key for the account that submitted the transaction. |
| **account\_address** | string | XRP Ledger account address of the wallet that submitted the transaction. |
| **transaction\_type** | string | XRPL transaction type (e.g. AMMDeposit, AMMWithdraw, AMMBid, AMMVote) as recorded on the ledger. |
| **event\_type** | string | Business category of this AMM event: Deposit or Withdraw for liquidity changes, AMMBid for auction-slot bids, AMMVote for fee-setting votes. |
| **timestamp** | timestamp | UTC timestamp of the ledger close in which this event was confirmed. |
| **date** | date | Calendar date (UTC) of the ledger close, used for daily partitioning and time-series analysis. |
| **event\_id** | varchar | Unique identifier for liquidity events (Deposit or Withdraw); null for bids and votes. |
| **token\_a\_amount** | double | Amount of Token A deposited or withdrawn in this liquidity event; null for bids and votes. |
| **token\_b\_amount** | double | Amount of Token B deposited or withdrawn in this liquidity event; null for bids and votes. |
| **lp\_token\_amount** | double | Amount of LP tokens minted (Deposit), burned (Withdraw), or bid in an auction-slot contest (AMMBid); null for votes. |
| **token\_a\_amount\_before** | double | Pool balance of Token A immediately before this liquidity event; null for bids and votes. |
| **token\_a\_amount\_after** | double | Pool balance of Token A immediately after this liquidity event; null for bids and votes. |
| **token\_b\_amount\_before** | double | Pool balance of Token B immediately before this liquidity event; null for bids and votes. |
| **token\_b\_amount\_after** | double | Pool balance of Token B immediately after this liquidity event; null for bids and votes. |
| **lp\_token\_amount\_before** | double | Total LP token supply outstanding immediately before this event; null for votes. |
| **lp\_token\_amount\_after** | double | Total LP token supply outstanding immediately after this liquidity event; null for bids and votes. |
| **bid\_id** | bigint | Surrogate key for the auction-slot bid record; populated only for AMMBid events, null otherwise. |
| **is\_winning\_bid** | boolean | True if this bid successfully claimed the AMM auction slot; populated only for AMMBid events. |
| **slot\_duration** | integer | Duration in seconds that the bidder holds the auction slot after winning, capped at 86,400 (24 hours); populated only for AMMBid events. |
| **replaced\_by\_bid\_id** | bigint | Surrogate key of the subsequent bid that displaced this auction slot; populated only for AMMBid events. |
| **replaced\_by\_bid\_transaction\_hash** | string | Transaction hash of the bid that replaced this auction slot, enabling chain-of-custody tracing; populated only for AMMBid events. |
| **vote\_id** | bigint | Surrogate key for the fee-vote record; populated only for AMMVote events, null otherwise. |
| **vote\_trading\_fee** | integer | Trading fee requested by the voting liquidity provider, in units of 1/100,000 (e.g. 1000 = 1%); populated only for AMMVote events. |
| **final\_trading\_fee** | integer | Effective pool trading fee in units of 1/100,000 after incorporating this vote's LP-weighted influence; populated only for AMMVote events. |
| **auction\_slot** | string | JSON snapshot of the pool's auction-slot state at the time of this vote, showing the current slot holder and expiry time; populated only for AMMVote events. |

## Table Sample

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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.