Skip to main content
A decentralized exchange, or DEX, lets users swap one token for another against a pool: a contract holding a reserve of two tokens that anyone can trade with. Base pools appear in three tables.
  • dimensions.dex_pools: one row per pool. fee_tier records a poolโ€™s configurable fee level, so it is null on pools whose design fixes the fee.
  • metrics_dex_pools: one table per measure, one row per pool per day.
  • metrics_dex_pool_pairs: one row per pool and traded token pair per day, in trading_volume_daily.
Trading volume and fees are flows, so they add up: a week of daily rows sums to the week, and a set of pools sums to the group. Value locked, in metrics_dex_pools.tvl_daily, is a level: the latest row is the answer, and summing it across days gives a meaningless number. Every pool gets a TVL row every day it exists; volume and fee rows land only on the days a pool saw trading. Every column is documented at DEX.

Sample queries

The daily pool tables are among the largest in the catalog. Bound timestamp and filter chain_id in every query; without them the query reads the whole table.
Rank Base pools by trading volume on one day. Reading the day from the volume table and joining the pool list afterwards keeps the join small.