gnosis.defi Table: dim_dex_liquidity_pools Type: View
What
This dimensional table contains comprehensive metadata for all DEX liquidity pools across supported protocols. It provides essential information about pool composition, token pairs, and configuration needed for analyzing liquidity provision and pool performance.Key Use Cases
- Finding all pools containing specific tokens
- Tracking new pool deployments
- Analyzing pool configurations and fee structures
- Identifying trading pairs across different protocols
- Monitoring factory contract deployments
Important Relationships
- Join with ez_dex_swaps: Use
pool_addressto get swap activity - Join with dim_contracts: Use token addresses for additional metadata
- Self-join: Find all pools with common tokens
Commonly-used Fields
pool_address: Unique identifier for the liquidity poolplatform: DEX protocol (uniswap_v3, curve, etc.)pool_name: Human-readable pool identifiertokens: JSON with token0 and token1 addressessymbols: JSON with token0 and token1 symbolscreation_time: When pool was deployed
Sample queries
Columns
| Column Name | Data Type | Description |
|---|---|---|
| CREATION_BLOCK | NUMBER | The block number when the liquidity pool was first created. |
{"token0": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "token1": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"}
| | SYMBOLS | OBJECT | JSON object containing token symbols for the pool pair.
Example: {"token0": "WETH", "token1": "USDC"} | | DECIMALS | OBJECT | JSON object containing
decimal places for each token in the pool.
Example: {"token0": 18, "token1": 6} | | DIM_DEX_LIQUIDITY_POOLS_ID | TEXT | Primary key - unique
identifier for each row ensuring data integrity.
Format: Usually VARCHAR containing composite key generated using MD5 hash of the relevant
columns. Example: MD5(block_number, tx_hash, trace_index)
Usage:
- Deduplication in incremental loads
- Join operations for data quality checks
- Troubleshooting specific records
- Data freshness monitoring
- Incremental processing markers
- Debugging data pipeline issues
- SLA tracking