The datasets outlined below are used to analyze the coincidence of wants peer-to-peer by converting on-chain trades to intents, and looking at the price improvement in execution. For each of the multiple datasets utilized in the empirical analysis, the metadata and instructions on how to pull the datasets are outlined below.
Blockchain trades fetched from Dune Analytics with query trades.dune.sql.
Query sources trades from dex_aggregator.trades
, dex.trades
, oneinch.swaps
and custom query for UniswapX fills.
Trades from dex_aggregator.trades
and dex.trades
are filtered to only ones where sender of the transaction equals protocol's address; with exception of CowSwap, Bebob and 0x Settler.
Each directory contains metadata file describing parameters used when fetching the data: chain
, date_from
, date_to
and tokens
.
The dataset is curated by Miha Lotrič, and is part of the TLDR 2025 fellowship program.
.parquet
id
[String]: Trade identifierproject
[String]: Protocol the trade was facilitated throughblock_time
[Int64]: Unix timestamp of the block the trade was included inamount_usd
[Float64]: Trading amount in USDtoken_bought_address
[String]: Address of the asset trader receivedtoken_sold_address
[String]: Address of the asset trader gavetoken_bought_amount
[Float64]: Fixed-point amount trader receivedtoken_sold_amount
[Float64]: Fixed-point amount trader gaveData can be programmatically collected by running the script as shown below:
python -m utils.dune.trades --tokens weth,usdc,wbtc --date-from "2025-03-01 00:00:00" --date-to "2025-03-23 00:00:00" --chain ethereum --performance medium --out-dir data/hist-trades --label ethereum-mar25-1
Parameters:
--tokens
: List of supported token symbols or addresses--date-from
: Start date in format "YYYY-MM-DD HH:MM:SS" --date-to
: End date in format "YYYY-MM-DD HH:MM:SS"--result-limit
: Maximum number of rows to fetch (default: 600,000)--chain
: Blockchain network (default: ethereum)--performance
: Query performance (choices: low, medium, high)--label
: Label for the output directory (default: random UUID)--out-dir
: Base output directory (default: data)CowSwap protocol orders fetched from CowSwap's batch API. Only a subset of original parameters is recorded.
File name indicates the chain orders relate to.
parquet
batch_id
[Int64]: Unique CowSwap batch identifieruid
[String]: Unique CowSwap order identifersell_token
[String]: Address of token trader is sellingbuy_token
[String]: Address of token trader is buyingsell_amount
[String]: Amount trader is selling (in wei)buy_amount
[String]: Amount trader is buying (in wei)created_at
[Int64]: Unix timestamp of order creationvalid_to
[Int64]: Unix timestamp of order expirykind
[String]: Whether order is sell
or buy
partially_fillable
[Bool]: Whether order is partially fillableclass
[String]: Order class (eg. limit)Data can be collected by running utils.dune.cowswap_intent_loader.py
. Note that, as of writing, only batches from the last 28 days can be queried.
CowSwap protocol order fills fetched from Dune Analytics with query cowswap_fills.dune.sql.
The query sources fills from Dune's dataset gnosis_protocol_v2_multichain.GPv2Settlement_evt_Trade
.
Each directory contains metadata file describing parameters used when fetching the data: chain
, date_from
, date_to
and tokens
.
parquet
tx_hash
[String]: Transaction hash in which order was filledblock_time
[Int64]: Unix timestamp of the block fill was included inorderUid
[String]: Unique CowSwap order identifer for filled ordertoken_sold
[String]: Address of token trader soldtoken_bought
[String]: Address of token trader boughtamount_sold
[String]: Amount trader bought (in wei)amount_bought
[String]: Amount trader sold (in wei)Data can be programmatically collected by running the script as shown below:
python -m utils.dune.cowswap_fills --tokens weth,usdc,wbtc --date-from "2024-12-18" --date-to "2025-04-27" --chain ethereum --out-dir data/intents/cowswap/fills --label ethereum_20241218_20250427
OneInch Fusion order data streamed from OneInch Fusion websocket feed.
File name indicates the chain order data relates to.
jsonl
See OneInch Fusion docs.
TBD
OneInch Fusion order fills fetched from Dune Analytics with query fusion_fills.dune.sql.
The query sources fills from Dune's dataset oneinch.swaps
.
Each directory contains metadata file describing parameters used when fetching the data: chain
, date_from
, date_to
and tokens
.
parquet
tx_hash
[String]: Transaction hash in which order was filledblock_time
[Int64]: Unix timestamp of the block fill was included inorder_hash
[String]: Unique Fusion order identifer for filled orderamount_usd
[Float64]: Trading amount in USDtoken_bought_address
[String]: Address of the asset trader receivedtoken_sold_address
[String]: Address of the asset trader gavetoken_bought_amount
[Float64]: Amount trader received (in wei)token_sold_amount
[Float64]: Amount trader gave (in wei)Data can be programmatically collected by running the script as shown below:
python -m utils.dune.fusion_fills --tokens weth,usdc,wbtc --date-from "2024-12-18" --date-to "2025-04-27" --chain ethereum --out-dir data/intents/fusion/fills --label ethereum_20241218_20250427
Token price candles fetched from Dune Analytics using query prices.dune.sql.
Query sources prices from Dune's table prices.usd_daily
.
Each directory contains metadata file describing parameters used when fetching the data: chain
, date_from
, date_to
and tokens
.
parquet
day
[String]: Date of the candletoken
[String]: Token addressdecimals
[Int64]: Token decimalsprice
[Float64]: Average priceprice_high
[Float64]: Highest daily priceprice_low
[Float64]: Lowest daily priceData can be programmatically collected by running the script as shown below:
python -m utils.dune.prices --tokens weth,usdc,wbtc --date-from "2024-12-18" --date-to "2025-04-27" --chain ethereum --out-dir data/prices --label ethereum_20241218_20250427
TBD