amount_in and amount_out are the two legs, and deduplicating a routerβs fills on transaction_hash turns venue volume into interface volume.
Columns
| Column | Type | Description |
|---|---|---|
block_timestamp | TIMESTAMP | Time of the block containing the swap. Partition column. |
transaction_hash | STRING | Hash of the transaction containing the swap. Several rows share a hash when a router splits one swap across pools. |
log_index | INT64 | Position of the swap event in the block. (chain_id, transaction_hash, log_index) identifies a row. |
dex_pool_id | STRING | Pool the swap executed in, keyed like dimensions.dex_pools. |
app_id | STRING | The app operating the pool, read from the pool registry. |
chain_id | STRING | Chain the swap executed on. |
project_id | STRING | Project the operating app belongs to. |
token_in_id | STRING | Token the trader handed to the pool, keyed like dimensions.tokens. |
token_out_id | STRING | Token the trader received from the pool. |
fee_rate | BIGNUMERIC | Fee charged on this swap, as a decimal fraction of its size. Fixed per pool on most venues, set per swap where the venue supports dynamic fees. Null where the venue publishes no per-swap rate the catalog decodes (Aerodrome, Velodrome). |
amount_in | BIGNUMERIC | Amount of token_in_id handed over, in whole token units, always positive. |
amount_out | BIGNUMERIC | Amount of token_out_id received, in whole token units, always positive. |
Sample queries
- One day, one pool
- Venue vs interface volume
The pool here is the Uniswap v3 USDC-WETH 0.05% pool on Ethereum; find any poolβs id in
dimensions.dex_pools.