DEX Instance Table
Description
Deployments of DEX protocols per network (e.g., Uniswap, Curve). Central registry for factory/router/NFPM addresses and cross-chain protocol analysis.
Schema
| Field | Type | Description |
|---|---|---|
| id | STRING | Deterministic ID (truncated MD5 of network_id, slug). |
| network_id | STRING | FK → network.id. |
| slug | STRING | Canonical DEX identifier (e.g., uniswap-v3, curve). |
| name | STRING | Human-readable name (e.g., Uniswap V3). |
| factory_address | STRING | Factory contract creating pools. |
| subgraph_id | STRING | The Graph subgraph ID for this DEX instance. |
| nfpm_address | STRING | Non-Fungible Position Manager (V3-style DEXes). |
| ingested_at | TIMESTAMP | Insert time (UTC). |
Example Queries
Find Uniswap V3 instances and their factories
SELECT n.name AS network, d.name AS dex, d.factory_address, d.nfpm_address
FROM `defi_prepared.dex_instance` d
JOIN `defi_prepared.network` n ON d.network_id = n.id
WHERE d.slug = 'uniswap-v3'
ORDER BY network;