DEX Trades

Enriched swap events across 8 chains with token symbols, USD amounts, and protocol attribution.

14 tables — one trade table per chain, plus additional Tempo DEX detail tables.

TableChainNotable
agent.ethereum_dex_tradesEthereumMost DEX diversity
agent.base_dex_tradesBaseAerodrome-heavy
agent.arbitrum_dex_tradesArbitrumGMX, Camelot
agent.bsc_dex_tradesBSCLargest table (~4B rows), PancakeSwap-dominant
agent.tron_dex_tradesTronSunSwap-dominant, base58 addresses
agent.hyperevm_dex_tradesHyperEVMNewest chain, thinner coverage
agent.robinhood_dex_tradesRobinhood ChainExtended schema with per-side prices and USD method (see below)
agent.tempo_dex_swapsTempoSolver/intent-based swaps, different schema (see below)

Tempo also has raw and aggregated DEX detail tables:

TableWhat it is
agent.tempo_dex_base_tradesRaw per-event swaps in the standard bought/sold shape (project, taker, amounts, USD)
agent.tempo_dex_trades_dailyDaily volume, trade count, and unique traders per token pair (ReplacingMergeTree — use FINAL)
agent.tempo_stablecoindex_swapsIndividual StablecoinDEX swap events
agent.tempo_exchange_v2_pairsTempoExchange V2 pair-creation registry (ReplacingMergeTree — use FINAL)
agent.tempo_uniswap_v2_pairsUniswap V2 pair-creation registry (ReplacingMergeTree — use FINAL)
agent.tempo_uniswap_v4_poolsUniswap V4 pool initializations with fee, tick spacing, hooks (ReplacingMergeTree — use FINAL)

Schema (EVM Chains)

The 6 EVM tables share this schema. Minor type differences noted where applicable.

Engine: MergeTree | Partition: toYYYYMM(block_date) | ORDER BY: block_time, tx_hash, evt_index

ColumnTypeDescription
blockchainStringChain name
projectStringProtocol (lowercase): uniswap, sushiswap, curve, pancakeswap, aerodrome, etc.
versionStringProtocol version: '1', '2', '3', 'v3', 'slipstream'
block_dateDatePartition key — always filter on this
block_timeDateTime64(3)UTC timestamp
block_numberUInt64
token_bought_symbolNullable(String)Token received
token_sold_symbolNullable(String)Token sent
token_pairStringAlphabetically sorted pair (e.g., 'ETH-USDC')
token_bought_amountFloat64Human-readable (decimal-adjusted)
token_sold_amountFloat64Human-readable (decimal-adjusted)
token_bought_amount_rawUInt256Raw pre-decimal amount
token_sold_amount_rawUInt256Raw pre-decimal amount
amount_usdNullable(Float64)One-sided USD value (token_sold). Null for unpriced tokens.
token_bought_addressStringContract address
token_sold_addressStringContract address
takerStringEOA that initiated the swap (not the router)
makerNullable(String)Liquidity pool address
project_contract_addressStringPool or router contract
tx_hashStringTransaction hash
tx_fromStringTransaction sender
tx_toStringTransaction recipient
evt_indexUInt32Event log index

Good to Know

  • amount_usd is one-sided (token_sold value). Multiply by 2 for two-sided volume.
  • taker is the EOA, not the router/aggregator contract.
  • token_pair is alphabetically sorted — always 'ETH-USDC', never 'USDC-ETH'.
  • No aggregator attribution — a 1inch-routed swap shows as the underlying DEX.
  • USD prices from CoinGecko hourly — new/illiquid tokens may have null amount_usd.
  • Does not include limit orders, RFQ fills, or off-chain matching.

Tempo DEX Swaps Schema

agent.tempo_dex_swaps uses a different schema — Tempo is a stablecoin payment chain with solver/intent-based swaps, not a standard AMM DEX.

Engine: MergeTree | Partition: toYYYYMM(block_date) | ORDER BY: block_date, transaction_hash

ColumnTypeDescription
block_dateDatePartition key
block_numberUInt64
transaction_indexUInt32
transaction_hashString
user_addressStringSwapper address
token_inStringInput token contract
token_in_symbolStringInput token symbol
amount_in_usdFloat64Input amount in USD
token_outStringOutput token contract
token_out_symbolStringOutput token symbol
amount_out_usdFloat64Output amount in USD
reason_hexStringSwap reason/memo (hex-encoded)

Robinhood Chain DEX Trades Schema

agent.robinhood_dex_trades has every column of the EVM schema above, plus per-side pricing and provenance columns. Like the other trade tables, it requires a block_date lower bound.

ColumnTypeDescription
unique_keyStringUnique row identifier
token_bought_decimals / token_sold_decimalsNullable(Int64)Token decimals
token_bought_price_usd / token_sold_price_usdNullable(Float64)Per-token USD price used for valuation
token_bought_price_source / token_sold_price_sourceNullable(String)Where each side's price came from
amount_usd_methodStringHow amount_usd was derived — values include external_sold, external_bought, dex_sold, dex_bought, external_both_min, dex_both_min, and unpriced
price_availableUInt81 when amount_usd is populated
taker_sourceStringHow taker was resolved
swap_senderStringsender from the swap event
registry_sourceStringSource of the pool registry entry
  • Unlike the other chains, amount_usd is not always the sold side: check amount_usd_method — it can use the bought side, or the smaller of the two sides (*_both_min).
  • A large share of swaps involve unpriced tokens (amount_usd_method = 'unpriced', amount_usd NULL). Filter on price_available = 1 before summing volume.
AskSurf (Surf AI) — Market Intelligence for AI Agents