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

# DEX

> Every trading pool: swaps, volume, TVL and fees, across every DEX.

A decentralized exchange (DEX) lets anyone swap one token for another onchain. Swaps happen inside pools, and the pool is what the catalog counts. A pool holds a set of tokens, charges one fee, and sits on one chain. Every figure here is measured per pool, then added up to give the app running it, the protocol version and the project.

A pool holds two or more tokens, listed in the `token_ids` column of the pool registry table. A pair is any two of those tokens, so there is no separate list of pairs: a pool holding three tokens has three possible pairs, and you can read them straight off the list. Which of those pairs people traded is a separate matter of record, kept on the daily pair table rather than in the registry.

## Pages

<CardGroup cols={2}>
  <Card title="Registry" icon="table-list" href="/docs/catalog/dex/registry">
    Pool identity, the fee it charges, its tokens, and who runs it.
  </Card>

  <Card title="Trades" icon="bolt" href="/docs/catalog/dex/trades">
    Individual swaps in token amounts. **In progress.**
  </Card>

  <Card title="Metrics" icon="chart-line" href="/docs/catalog/dex/metrics">
    Daily volume, TVL, fees and flash-loan volume per pool, plus the same volume split by traded pair.
  </Card>
</CardGroup>

## What one row means

The pool is the smallest thing measured. Pool figures add up cleanly to the app's deployment on that chain, then to the protocol version, then to the project, because every level uses the same token prices. The pair table sits alongside the pool table at a finer split: a pool's pair rows add back up to its pool row.

A breakdown by single token would behave differently. Every swap involves two tokens, so counting it under each of them counts it twice, and the total no longer matches the pool. Splitting by pair avoids that, because it keeps both sides of the swap on one row.
