We decode Optimism DEX trades from the chain ourselves: one row per swap, with the token bought, the token sold, the pool, the fees and the transaction around it. Each swap carries a USD value set from its safest side, a stablecoin or ETH before any other token, so one thin token cannot distort it. About 305 million trades, from block 105,238,867 to yesterday.
Most buyers start with volume for one pool or token: filter the pool contract, or the pool id for Uniswap v4, and sum the USD column over successful swaps. A routed swap spans several rows, so group by transaction when you want what a trader did.
Use cases
Velodrome and Uniswap volume on Optimism by pool
Price and volume history for any token, from its trades
Trader and router activity, split by the address that signed
Backtests on pool-level fills with fees
Table
54 columns · free sample for the table
dex_trades
54 columns
One row per DEX swap on Optimism, with both sides, pool and protocol, fees, transaction details and a USD value where a price exists.
optimism/dex_trades<start_block>_<end_block>.parquet50 blocks per file, sorted ascending
Fee_SenderFeeStringNetwork fee the sender paid for the whole transaction, in ETH, as a decimal string. It repeats on every row of the transaction, so count it once per transaction
Trade_Buy15
Trade_Buy_AmountStringAmount bought, decimal adjusted, as a decimal string with exactly as many places as the token has decimals; for NFTs and Polymarket shares, the number of items
Trade_Buy_AmountInUSDFloat64USD value of the swap at the block's hourly price, set from its best-priced side and the same on both sides; 0 when neither side has a price
Trade_Buy_BuyerStringAddress that received the bought currency, usually a router or the trader
Trade_Buy_Currency_DecimalsInt32Decimals of the bought token, as its contract reports them
Trade_Buy_Currency_FungibleStringWhether the bought token is fungible; true or false, and false for NFTs and Polymarket shares
Trade_Buy_Currency_HasURIStringWhether the bought token carries a metadata URI; true or false
Trade_Buy_Currency_NameStringName reported by the bought token's contract; lookalike tokens copy real names
Trade_Buy_Currency_ProtocolNameStringToken standard on the bought side, for example erc20 or erc1155; empty for native ETH
Trade_Buy_Currency_SmartContractStringContract of the bought token, 0x-prefixed; the string 0x for native ETH
Trade_Buy_Currency_SymbolStringSymbol reported by the bought token's contract; not unique, so join on the contract
Trade_Buy_IdsArrayToken ids bought, as strings; empty for fungible tokens
Trade_Buy_OrderIdStringOrder id for order-book and marketplace trades such as Seaport and Polymarket, hex without 0x; empty for pool swaps. The same value on both sides
Trade_Buy_PriceFloat64Price of the bought currency in units of the sold currency
Trade_Buy_PriceInUSDFloat64USD price of one unit of the bought currency: the swap's USD value divided by the bought amount, so per item for NFTs; 0 when unpriced
Trade_Buy_SellerStringAddress that sent the bought currency, usually the pool
Trade_Dex10
Trade_Dex_DelegatedStringtrue when the pool ran through a delegate call, as proxy and clone pools do, else false; the implementation address is not included
Trade_Dex_OwnerAddressStringFactory or owner the index records for the pool, 0x-prefixed; the string 0x when none. Use it to tell forks apart
Trade_Dex_Pair_DecimalsInt32Decimals of the pool's own LP token; 0 when the pool has none, as in v3 and v4
Trade_Dex_Pair_NameStringName of the pool's own LP token, for example Uniswap V2; empty for v3, v4 and other pools without one
Trade_Dex_Pair_SmartContractStringPool token contract for v2-style pools, 0x-prefixed; the string 0x otherwise, where Trade_Dex_SmartContract or Trade_PoolId names the pool
Trade_Dex_Pair_SymbolStringSymbol of the pool's own LP token, for example UNI-V2; not unique
Trade_Dex_ProtocolFamilyStringProtocol family, for example Uniswap, PancakeSwap, Aerodrome or Balancer
Trade_Dex_ProtocolNameStringProtocol and version as indexed, for example uniswap_v3 or seaport_v1.4. It names the pool design, so forks can share it
Trade_Dex_ProtocolVersionStringProtocol version string
Trade_Dex_SmartContractStringContract that emitted the swap, 0x-prefixed: the pool for v2 and v3 designs, the shared PoolManager for Uniswap v4 and PancakeSwap Infinity, the exchange for marketplaces
Trade5
Trade_FeesStringFees charged on the swap as a JSON array of [amount, amountInUSD, [decimals, name, token standard, contract hex, symbol], payer, recipient]; the USD value is set when the fee token is one side of the swap; [] when none
Trade_IndexUInt32Position of the swap within the transaction
Trade_PoolIdString32-byte pool id, 0x-prefixed, for Uniswap v4 and PancakeSwap Infinity, whose pools share one contract; empty for other protocols
Trade_SenderStringAddress that called the pool, often a router or aggregator
Trade_SuccessStringWhether this swap succeeded; true or false. A swap can fail inside a successful transaction, so filter on this column
Trade_Sell15
Trade_Sell_AmountStringAmount sold, decimal adjusted, as a decimal string with exactly as many places as the token has decimals; for NFTs and Polymarket shares, the number of items
Trade_Sell_AmountInUSDFloat64USD value of the swap at the block's hourly price, set from its best-priced side and the same on both sides; 0 when neither side has a price
Trade_Sell_BuyerStringAddress that received the sold currency, usually the pool
Trade_Sell_Currency_DecimalsInt32Decimals of the sold token, as its contract reports them
Trade_Sell_Currency_FungibleStringWhether the sold token is fungible; true or false, and false for NFTs and Polymarket shares
Trade_Sell_Currency_HasURIStringWhether the sold token carries a metadata URI; true or false
Trade_Sell_Currency_NameStringName reported by the sold token's contract; lookalike tokens copy real names
Trade_Sell_Currency_ProtocolNameStringToken standard on the sold side, for example erc20 or erc1155; empty for native ETH
Trade_Sell_Currency_SmartContractStringContract of the sold token, 0x-prefixed; the string 0x for native ETH
Trade_Sell_Currency_SymbolStringSymbol reported by the sold token's contract; not unique, so join on the contract
Trade_Sell_IdsArrayToken ids sold, as strings; empty for fungible tokens
Trade_Sell_OrderIdStringOrder id for order-book and marketplace trades such as Seaport and Polymarket, hex without 0x; empty for pool swaps. The same value on both sides
Trade_Sell_PriceFloat64Price of the sold currency in units of the bought currency
Trade_Sell_PriceInUSDFloat64USD price of one unit of the sold currency: the swap's USD value divided by the sold amount, so per item for NFTs; 0 when unpriced
Trade_Sell_SellerStringAddress that sent the sold currency, usually a router or the trader
Transaction4
Transaction_FromStringAddress that signed the transaction: the trader behind any router
Transaction_HashStringHash of the transaction, 0x-prefixed; the join key to transfers and logs
Transaction_IndexUInt64Position of the transaction within the block
Transaction_ToStringContract the transaction called, often a router
TransactionStatus1
TransactionStatus_SuccessStringWhether the transaction succeeded; true or false
Send this dataset’s full schema to an assistant and ask it anything. It reads the plain-text brief ↗ first, so the answer comes from the real column list rather than a guess.
One Parquet table with 54 columns: one row per swap our indexer decodes on Optimism DEXes, with both sides, the pool, fees, the transaction and a USD value. Failed trades stay in with a flag, and NFT marketplace trades stay in too.
How big is it?
About 305 million trades over 40 months, roughly 60 GB as Parquet, estimated from the sample files. The last 24 months hold about 241 million rows, the last 12 about 119 million and the latest month about 7 million. Row counts come from the live table; exact figures arrive with the delivery manifest.
How far back does it go?
To the start of our index: from 6 June 2023, just after the Bedrock upgrade, at block 105,238,867, to yesterday. Optimism before Bedrock is not in our index.
Which DEXes are covered?
In the month to 1 July 2026 Uniswap v3 carried most rows, then Uniswap v4, Velodrome, Uniswap v2 and Balancer, 7 protocol names in all. Velodrome shares Aerodrome's code, so its pools carry the label aerodrome_v1 (factory 0xf1046053aa5682b4f9a81b5481394da16be5ff5a). The protocol name describes the pool design, so group by Trade_Dex_OwnerAddress, the factory, to split forks that share a design.
What was left out, and why?
The export applies no filter of its own: failed trades, spam tokens and zero-value trades all stay in, and the columns let you drop them. History before the Bedrock upgrade in June 2023 is not in our index.
How are trades valued in USD?
Each swap takes its USD value from one side, the safer one: a stablecoin (USDC, the bridged USDC.e, USDT and DAI) first, then ETH or WETH, then any other priced token, at the block's hourly price from Ethereum's hourly series for ETH, WETH and the stablecoins, since Optimism has no price series of its own; other tokens carry a USD value only when the other side is one of these. The same value goes on both sides, so a thin token cannot inflate a swap against ETH. On one sampled day a year, between 88% and 96% of trades had a stablecoin, ETH or WETH on one side; the free sample has a USD value on 94.4% of rows. A value of 0 means no price for either side.
How are these produced, and how were they checked?
Decoded from Optimism by our own indexer, which reads each DEX's swap events and ties them to the transaction and the calling contract. USD values are added at export from our price series. Before release we ran the export query over blocks 153,654,213 to 153,654,312 and read the two sample files back: 1,027 trades, 54 columns, no empty values, USD on 94.4% of rows.
How do I get volume for one pool or one token?
For one token, filter the contract column on either side to its address and sum Trade_Buy_AmountInUSD over successful swaps. For a v2 or v3 pool, filter Trade_Dex_SmartContract to the pool; for Uniswap v4 and PancakeSwap Infinity, filter Trade_PoolId, since their pools share one contract.
What should I watch out for?
A routed swap through several pools is several rows: 58% of sample trades share a transaction with another swap, so sum by transaction for trader volume and by pool for DEX volume. The buyer address is usually a router; Transaction_From is the trader. Failed trades are 14.5% of the sample, some inside successful transactions, so filter Trade_Success. The free sample comes from blocks on 1 July 2026.
How do I load it?
One line in DuckDB: SELECT * FROM read_parquet('dex_trades/*.parquet') LIMIT 10. Pandas works too: pandas.read_parquet(path). The sample file opens without credentials.
How current is it, and how is it delivered?
Refreshed daily with T+1 latency, so a purchase made today includes everything to yesterday. Delivered as Parquet named by block range, 50 blocks per file and sorted ascending, under a stable S3 layout with a JSON manifest listing every file and its sha256. Signed HTTPS links are emailed once the files are prepared, or on request we deliver into your own S3, GCS or R2 bucket.