Skip to main content
Decentralized exchanges (DEXs) have become a cornerstone of DeFi, enabling permissionless trading of tokens directly on-chain. Dune provides comprehensive coverage of DEX activity through curated tables that capture trades, aggregator usage, and MEV events like sandwich attacks across both EVM and Solana networks. These datasets enable analysis of trading volumes, liquidity dynamics, price impact, and market manipulation across major DEX protocols and networks.
Maintained by: Dune · Refresh: ~30 min · Chains: 50 EVM chains, Solana

Get This Data

Access DEX trading data via API, Datashare, or the Dune App.

Cross-Chain DEX Coverage

Our DEX data covers multiple blockchain ecosystems:
  • EVM Networks: Ethereum, Arbitrum, Polygon, Base, Optimism, and 50 EVM chains total
  • Solana: Comprehensive coverage of Solana DEX protocols and Jupiter aggregator

Available Datasets

EVM DEX Data

Solana DEX Data

Key Features

  • Multi-Chain Coverage: Analyze DEX activity across EVM and Solana ecosystems
  • Standardized Schema: Consistent data structure for cross-chain analysis
  • MEV Detection: Identify sandwich attacks and other MEV activities (EVM)
  • Aggregator Data: Track trades through major aggregators on both networks
  • Real-time Updates: Data is updated continuously as new blocks are processed

Sample Cross-Chain Analysis

Compare DEX trading volume across different blockchain networks:
-- EVM DEX volume
SELECT 
    'EVM' as ecosystem,
    blockchain,
    DATE_TRUNC('day', block_time) as date,
    SUM(amount_usd) as volume_usd
FROM dex.trades
WHERE block_time >= NOW() - INTERVAL '30' day
GROUP BY 1, 2, 3

UNION ALL

-- Solana DEX volume  
SELECT 
    'Solana' as ecosystem,
    'solana' as blockchain,
    DATE_TRUNC('day', block_time) as date,
    SUM(amount_usd) as volume_usd
FROM dex_solana.trades
WHERE block_time >= NOW() - INTERVAL '30' day
GROUP BY 1, 2, 3

ORDER BY date DESC, volume_usd DESC

When to Use These Tables

  • Analyze DEX trading volumes and market share across protocols and chains
  • Track token price impact and liquidity depth on specific pairs
  • Monitor MEV activity (sandwich attacks) and their cost to traders
  • Build DEX aggregator performance benchmarks
  • Compare DEX activity across L1s and L2s for ecosystem analysis

Query Performance

Partition keys for dex.trades: blockchain, project, block_month Always include blockchain and a time filter (block_month or block_time range) for best performance.
-- ✅ Good: partition key filters
SELECT * FROM dex.trades
WHERE blockchain = 'ethereum'
  AND block_month >= DATE '2025-01-01'
  AND project = 'uniswap'

-- ❌ Slow: no partition filters
SELECT * FROM dex.trades
WHERE token_bought_symbol = 'USDC'

Methodology

DEX tables are maintained by Dune (source code). They aggregate data from protocol-specific base models (e.g., uniswap_v3_ethereum.trades, curve_ethereum.trades) that decode swap events from each DEX’s smart contracts. Token amounts are decimal-adjusted and joined with Dune’s price feeds for USD values. The dex.trades union view combines all EVM chain models; dex_solana.trades covers Solana DEXs separately.

Example Queries

Daily DEX volume by protocol on Ethereum (last 30 days):
SELECT
  date_trunc('day', block_time) AS day,
  project,
  SUM(amount_usd) AS volume_usd,
  COUNT(*) AS num_trades
FROM dex.trades
WHERE blockchain = 'ethereum'
  AND block_month >= DATE '2025-01-01'
  AND block_time >= NOW() - INTERVAL '30' DAY
GROUP BY 1, 2
ORDER BY 1 DESC, 3 DESC
Top traded pairs on Uniswap v3 (last 7 days):
SELECT
  token_bought_symbol,
  token_sold_symbol,
  SUM(amount_usd) AS volume_usd,
  COUNT(*) AS num_trades
FROM dex.trades
WHERE blockchain = 'ethereum'
  AND project = 'uniswap'
  AND project_version = '3'
  AND block_time >= NOW() - INTERVAL '7' DAY
GROUP BY 1, 2
ORDER BY 3 DESC
LIMIT 20
  • prices.day / prices.hour / prices.minute — Token pricing feeds used for USD values
  • tokens.erc20 — Token metadata (symbols, decimals, contract addresses)
  • nft.trades — NFT marketplace trades (separate from fungible token DEX trades)
  • dex.sandwiches — MEV sandwich attack data