This schema contains comprehensive datasets for tracking Uniswap fundamental data across multiple metrics categories, including trading activity, fees, revenue distribution, liquidity, treasury, and market data.

Available Tables

Uniswap data is available in several tables:

  • ez_metrics: Main aggregated metrics for the entire Uniswap protocol
  • ez_metrics_by_chain: Metrics broken down by blockchain (Ethereum, Arbitrum, Optimism, etc.)
  • ez_metrics_by_pool: Metrics broken down by individual liquidity pools
  • ez_metrics_by_token: Metrics broken down by token

Table Schema

Trading and Activity Metrics

Table NameColumn NameDescription
ez_metricsspot_volumeThe total trading volume on Uniswap v2 and v3
ez_metricsspot_dauThe number of daily active traders on Uniswap v2 and v3
ez_metricsspot_txnsThe number of daily trades on Uniswap v2 and v3
ez_metricstvlThe total value locked across all Uniswap liquidity pools
ez_metricsdauLegacy naming for spot_dau
ez_metricstxnsLegacy naming for spot_txns

Fee and Revenue Metrics

Table NameColumn NameDescription
ez_metricsecosystem_revenueThe total USD value generated through trading fees across Uniswap v2 and v3
ez_metricsspot_feesThe trading fees generated from swaps (same as ecosystem_revenue)
ez_metricsservice_cash_flowThe share of protocol revenue accrued to liquidity providers
ez_metricstrading_feesLegacy naming for ecosystem_revenue
ez_metricsfeesLegacy naming for ecosystem_revenue
ez_metricsprimary_supply_side_revenueLegacy naming for service_cash_flow
ez_metricstotal_supply_side_revenueLegacy naming for service_cash_flow

Token Incentives and Expenses

Table NameColumn NameDescription
ez_metricstoken_incentivesThe USD value of UNI tokens distributed as incentives
ez_metricstotal_expensesThe sum of token incentives and operating expenses
ez_metricsprotocol_earningsThe difference between protocol revenue and total expenses

Treasury Metrics

Table NameColumn NameDescription
ez_metricstreasuryThe USD value in the Uniswap protocol treasury
ez_metricsown_token_treasuryThe USD value of UNI tokens in the protocol treasury
ez_metricsnet_treasuryThe USD value in the treasury excluding the protocol’s own tokens
ez_metricstreausry_valueLegacy naming for treasury
ez_metricstreasury_native_valueLegacy naming for treasury shown in native token amounts
ez_metricsnet_treasury_valueLegacy naming for net_treasury

Market and Token Metrics

Table NameColumn NameDescription
ez_metricspriceThe price of UNI token in USD
ez_metricsmarket_capThe market cap of UNI token in USD
ez_metricsfdmcThe fully diluted market cap of UNI token in USD
ez_metricstoken_volumeThe trading volume of UNI token in USD
ez_metricstoken_turnover_circulatingThe turnover of UNI based on circulating supply
ez_metricstoken_turnover_fdvThe turnover of UNI based on fully diluted valuation
ez_metricstoken_holder_countThe number of unique UNI token holders

Metrics by Chain

The ez_metrics_by_chain table provides a breakdown of Uniswap’s performance across the various blockchains where the protocol is deployed. Based on the SQL file, here are the actual columns in this table:

Table NameColumn NameDescription
ez_metrics_by_chaindateThe date of the recorded metrics
ez_metrics_by_chainappAlways “uniswap” for consistency with other datasets
ez_metrics_by_chaincategoryAlways “DeFi” for categorization purposes
ez_metrics_by_chainchainThe specific blockchain (Ethereum, Arbitrum, Optimism, Avalanche, Polygon, Base, BSC, Blast)
ez_metrics_by_chaintrading_feesThe total USD value of fees generated on this chain
ez_metrics_by_chainfeesSame as trading_fees (legacy naming)
ez_metrics_by_chainprimary_supply_side_revenueThe fees accrued to liquidity providers on this chain
ez_metrics_by_chaintotal_supply_side_revenueSame as primary_supply_side_revenue
ez_metrics_by_chainsecondary_supply_side_revenueAlways 0 for Uniswap
ez_metrics_by_chainprotocol_revenueAlways 0 for Uniswap (all fees go to LPs)
ez_metrics_by_chainoperating_expensesAlways 0 in this table
ez_metrics_by_chaintoken_incentivesThe USD value of token incentives on this chain
ez_metrics_by_chainprotocol_earningsThe negative of token_incentives
ez_metrics_by_chaintvlThe total value locked in Uniswap on this specific chain
ez_metrics_by_chaintreasury_valueThe USD value in Uniswap’s treasury for this chain
ez_metrics_by_chaintreasury_native_valueThe amount of native chain tokens in treasury
ez_metrics_by_chainnet_treasury_valueThe treasury value excluding UNI tokens
ez_metrics_by_chainnet_depositsSame as TVL for this chain
ez_metrics_by_chaintrading_volumeThe total USD value of all swaps on this chain
ez_metrics_by_chainunique_tradersThe number of unique addresses that made swaps
ez_metrics_by_chaingas_cost_usdThe USD value of gas fees paid by users to the underlying blockchain
ez_metrics_by_chainspot_dauThe number of daily active traders (same as unique_traders)
ez_metrics_by_chainspot_volumeThe trading volume (same as trading_volume)
ez_metrics_by_chainecosystem_revenueThe total fees generated (same as trading_fees)
ez_metrics_by_chainservice_cash_flowFees that go to liquidity providers
ez_metrics_by_chaintreasurySame as treasury_value
ez_metrics_by_chainown_token_treasuryThe USD value of UNI tokens in the treasury
ez_metrics_by_chainnet_treasurySame as net_treasury_value
ez_metrics_by_chaingas_costSame as gas_cost_usd
ez_metrics_by_chaingas_cost_nativeThe amount of native tokens spent on gas fees

It’s important to note that gas costs represent the fees paid by users to the underlying blockchain networks (like Ethereum, Arbitrum, etc.) for transaction execution, not fees paid to Uniswap itself. These gas costs vary significantly across chains and can impact user behavior.

This table is valuable for comparing Uniswap’s adoption, trading volume, and TVL across different blockchains, and for understanding how different ecosystem factors (like gas costs) affect the protocol’s performance on each chain.

Metrics by Pool

The ez_metrics_by_pool table provides detailed metrics for each individual liquidity pool in the Uniswap ecosystem. This table is particularly valuable for analyzing the performance of specific token pairs across different Uniswap versions and blockchains.

In Uniswap, a pool represents a trading pair where users can swap one token for another. The pool contains liquidity for both tokens, allowing for these exchanges to occur. Users typically swap token_0 to obtain token_1, or vice versa.

Table NameColumn NameDescription
ez_metrics_by_poolpoolThe unique address of the liquidity pool
ez_metrics_by_poolversionThe Uniswap version (v2 or v3) - v3 introduced concentrated liquidity and multiple fee tiers
ez_metrics_by_poolchainThe blockchain network where the pool exists (Ethereum, Arbitrum, etc.)
ez_metrics_by_pooltoken_0The contract address of the first token in the pair
ez_metrics_by_pooltoken_1The contract address of the second token in the pair
ez_metrics_by_pooltoken_0_symbolThe symbol of the first token (e.g., “WETH”, “USDC”)
ez_metrics_by_pooltoken_1_symbolThe symbol of the second token (e.g., “USDC”, “WBTC”)
ez_metrics_by_pooltrading_volumeTotal USD value of all swaps in this specific pool
ez_metrics_by_pooltrading_feesThe total USD value of fees generated by this pool
ez_metrics_by_poolunique_tradersThe number of unique addresses that made swaps in this pool
ez_metrics_by_poolgas_cost_usdThe total USD value of gas spent on transactions in this pool
ez_metrics_by_poolgas_cost_nativeThe amount of native tokens (ETH, MATIC, etc.) spent on gas
ez_metrics_by_poolspot_dauThe number of daily active traders in this pool (same as unique_traders)
ez_metrics_by_poolspot_volumeThe trading volume in this pool (same as trading_volume)
ez_metrics_by_pooltvlThe total value locked in this specific liquidity pool
ez_metrics_by_poolecosystem_revenueThe total fees generated by this pool (same as trading_fees)
ez_metrics_by_poolservice_cash_flowThe portion of fees that goes to liquidity providers for this pool

Uniswap v3 introduced the concept of concentrated liquidity, which allows liquidity providers to specify price ranges for their capital. This makes individual pool performance analysis even more important, as capital efficiency and fee generation can vary significantly between pools, even for the same token pair but with different fee tiers.

Metrics by Token

The ez_metrics_by_token table provides detailed metrics for each token traded on Uniswap across different blockchains. This allows for analyzing how individual tokens perform within the Uniswap ecosystem, including their contribution to fees, treasury holdings, and trading volumes.

Table NameColumn NameDescription
ez_metrics_by_tokendateThe date of the recorded metrics
ez_metrics_by_tokentokenThe token symbol (e.g., “WETH”, “USDC”, “UNI”)
ez_metrics_by_tokenchainThe blockchain network where the token is traded
ez_metrics_by_tokentrading_feesThe total USD value of fees generated from trades involving this token
ez_metrics_by_tokenfees_nativeThe amount of fees generated in native token units
ez_metrics_by_tokentreasury_valueThe USD value of this token held in Uniswap’s treasury
ez_metrics_by_tokentreasury_native_valueThe amount of this token held in the treasury in native units
ez_metrics_by_tokennet_treasury_valueThe USD value of this token in treasury (excluding UNI tokens)
ez_metrics_by_tokentvlThe total value locked in Uniswap pools containing this token
ez_metrics_by_tokenspot_feesThe trading fees in USD (same as trading_fees)
ez_metrics_by_tokenecosystem_revenueThe total fees generated from this token in USD
ez_metrics_by_tokenspot_fees_nativeThe trading fees in the token’s native units
ez_metrics_by_tokenecosystem_revenue_nativeThe total fees in the token’s native units
ez_metrics_by_tokentoken_incentives_nativeThe amount of token incentives distributed in native units
ez_metrics_by_tokentoken_incentivesThe USD value of token incentives distributed
ez_metrics_by_tokentreasuryThe USD value in treasury (same as treasury_value)
ez_metrics_by_tokennet_treasuryThe USD value in treasury excluding UNI (same as net_treasury_value)
ez_metrics_by_tokenown_token_treasuryThe USD value of UNI tokens in the treasury (only for UNI token)

This table is particularly useful for:

  • Tracking which tokens generate the most fees on Uniswap
  • Monitoring treasury composition over time
  • Analyzing which tokens have the most liquidity (TVL) on the platform
  • Comparing token performance across different blockchains

Sample Queries

Basic Protocol Activity Query

-- Pull fundamental activity data for the Uniswap protocol
SELECT
    date,
    spot_volume,
    spot_dau,
    spot_txns,
    tvl,
    price
FROM
    art_share.uniswap.ez_metrics
WHERE
    date >= DATEADD(month, -3, CURRENT_DATE())
ORDER BY
    date ASC

Revenue and Cash Flow Analysis

-- Analyze Uniswap revenue and cash flow
SELECT
    date,
    ecosystem_revenue,
    service_cash_flow,
    token_incentives,
    total_expenses
FROM
    art_share.uniswap.ez_metrics
WHERE
    date >= DATEADD(month, -3, CURRENT_DATE())
ORDER BY
    date ASC

Treasury Analysis

-- Track Uniswap treasury composition
SELECT
    date,
    treasury,
    own_token_treasury,
    net_treasury,
    price
FROM
    art_share.uniswap.ez_metrics
WHERE
    date >= DATEADD(month, -3, CURRENT_DATE())
ORDER BY
    date ASC

Cross-Chain Comparison

-- Compare Uniswap metrics across different blockchains
SELECT
    date,
    chain,
    spot_volume,
    spot_dau,
    tvl,
    ecosystem_revenue
FROM
    art_share.uniswap.ez_metrics_by_chain
WHERE
    date >= DATEADD(month, -1, CURRENT_DATE())
ORDER BY
    chain, date ASC

Top Pools Analysis

-- Analyze top Uniswap pools by volume
SELECT
    date,
    chain,
    version,
    pool,
    token_0_symbol,
    token_1_symbol,
    spot_volume,
    spot_dau,
    tvl
FROM
    art_share.uniswap.ez_metrics_by_pool
WHERE
    date = DATEADD(day, -1, CURRENT_DATE())
ORDER BY
    spot_volume DESC
LIMIT 10

Token-specific Analysis

-- Analyze specific token metrics across the Uniswap protocol
SELECT
    date,
    token,
    chain,
    tvl,
    spot_fees,
    ecosystem_revenue
FROM
    art_share.uniswap.ez_metrics_by_token
WHERE
    date >= DATEADD(month, -1, CURRENT_DATE())
    AND token IN ('USDC', 'WETH', 'WBTC')
ORDER BY
    token, date ASC

Protocol Economics Analysis

-- Analyze relationship between TVL, trading volume, and fees
SELECT
    date,
    tvl,
    spot_volume,
    ecosystem_revenue,
    ecosystem_revenue / spot_volume * 100 as fee_percentage,
    spot_volume / tvl as capital_efficiency
FROM
    art_share.uniswap.ez_metrics
WHERE
    date >= DATEADD(month, -3, CURRENT_DATE())
ORDER BY
    date ASC

User and Holder Growth Analysis

-- Track Uniswap user and token holder growth
SELECT
    date,
    spot_dau,
    token_holder_count,
    price,
    market_cap
FROM
    art_share.uniswap.ez_metrics
WHERE
    date >= DATEADD(month, -6, CURRENT_DATE())
ORDER BY
    date ASC