Aggregator Trades
Identify swap volumes executed from DEX aggregators.
The dex.aggregator_trades
table contains successful swaps executed by DEX aggregators.
DEX aggregators scan multiple decentralized exchanges (DEXs) simultaneously to find the best trading prices and routes for users, often splitting trades across different liquidity sources to optimize for better rates and lower slippage.
DEX Trades vs Aggregator Trades
DEX projects that execute trades tapping on the liquidity of other protocols/project/market makers or contracts will be included in the aggregator_trades table.
Liquidity Source
Single liquidity pool (e.g., one Uniswap pool)
Multiple pools/DEXs in one transaction (e.g., split between Uniswap, Curve, Balancer)
Route Complexity
Simple A → B swap
Complex routes possible (A → B → C → D) with multi-hop optimization
Price Discovery
Price determined by single pool's AMM formula
Best price found by comparing across multiple DEXs and routes
This model is not compatible with dex.trades
in terms of column coverage. There are integrator fields that are only applicable for dex aggregators.
Table Column
Unique Key: unique_id
integrator
Name of the integrator/frontend used for the trade (e.g., matcha, 1inch) inferred from the integrator tag. This will be null if there are no integrator
integrator_tag
Contract address, event log field or other relevant field that is used to indicate the frontend integrator
project
Name of the project. Includes dodo, paraswap, zeroex, cow_protocol, kyberswap_aggregator, tokenlon, openocean.
cow_protocol
protocol
DEX protocol or project contract which executed the aggregator trade.
cow_protocol
event_name
This field will be null for majority of DEX aggregator trades. Unless the event specifies the pools that the trade was routed through.
Trade
contract_address
The name of the event (or the function call) for this trade.
0x9008d19f58aabd9ed0d60971565aa8510560ab41
liquidity_pool_address
The contract address of the aggregator.
null
sender_address
Address of the sender of the swap event log, which can be the Router.
0x2fb4aa67cc48c9dd126dc2f6a437c5c995b2732d
to_address
Address of the recipient of the swap event.
0x2fb4aa67cc48c9dd126dc2f6a437c5c995b2732d
token_sold_address
Address of the token sold.
0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
token_sold_name
Name of the token sold.
USD Coin
token_sold_symbol
Symbol of the token sold.
USDC
token_sold_amount_raw_str
Amount of token sold (not divided by the number of decimals) in string.
6250000000
token_sold_amount_raw
Amount of token sold (not divided by the number of decimals).
6250000000
token_sold_amount_str
token_sold_amount_raw divided by the number of decimals of the token in string.
6250
token_sold_amount
token_sold_amount_raw divided by the number of decimals of the token.
6250
usd_sold_amount
USD value of tokens sold.
6245
token_bought_address
Token address of the token bought, i.e. the asset acquired from the trade.
0xccccb68e1a848cbdb5b60a974e07aae143ed40c3
token_bought_name
Name of the token bought.
TOPIA
token_bought_symbol
Symbol of the token bought.
TOPIA
token_bought_amount_raw_str
Amount of token bought (not divided by the number of decimals) in string.
64632249553876898925672
token_bought_amount_raw
Amount of token bought (not divided by the number of decimals).
6.46322E+22
token_bought_amount_str
token_bought_amount_raw divided by the number of decimals of the token in string.
64632.24955
token_bought_amount
token_bought_amount_raw divided by the number of decimals of the token.
64632.24955
usd_bought_amount
USD value of tokens bought.
6048.867603
usd_amount
USD value of the swap. Note that this preferentially selects the price and value of the more reputable token.
6245
extra_fields
This field contains all the extra columns emitted from the event/function call that were not part of the convetional DEX trades columns.
{ "fee_amount": "0", "order_uid": "0E839EC0B7F089F2337620489748E70BA616417C506B3C6BCC7749CAEFE2F3C32FB4AA67CC48C9DD126DC2F6A437C5C995B2732D65EF27BA" }
transaction_from_address
The address of the sending party of this transaction.
0xbf54079c9bc879ae4dd6bc79bce11d3988fd9c2b
transaction_to_address
The address of the receiving party of this transaction (could be a contract address).
0x9008d19f58aabd9ed0d60971565aa8510560ab41
transaction_hash
Transaction hash of this trade.
0x7a3be25e6fffa9fd29ef9aa9eafdfd0d8ee4a24aedb074ebb6c1a473ce750fce
transaction_index
Transaction index of this trade in the block.
17
transaction_fees
Fees paid at the transaction level.
0.02354155877
transaction_fees_usd
Fees paid in USD.
95.02173534
fee_details
Additional fee details of the transaction, including max priority fee, gas price and gas used for the transaction.
{ "base_fee_per_gas": 88733305846, "block_gas_limit": 30000000, "block_gas_used": 12073153, "gas": 502304, "gas_price": 93734307405, "max_fee_per_gas": 358721698469, "max_priority_fee_per_gas": 5001001559, "priority_fees": "0.001256011543545968", "priority_fees_usd": 5.069689633676332e+00, "priority_gas_fee": "5001001559", "receipt_effective_gas_price": 93734307405, "receipt_gas_used": 251152 }
calldata_selector
The call data selector of the transaction.
0x13d79a0b
log_index
Log index of this trade.
42
block_timestamp
Block timestamp of this trade.
2024-03-11 12:48:59
block_number
Block number of this trade.
19411959
block_hash
Block hash of this trade.
0xe1944bbf513fa729bc78f34bee665dfafebede27cb73fd99d86ed4265c2b0852
unique_id
Unique ID of each trade.
txn-0x7a3be25e6fffa9fd29ef9aa9eafdfd0d8ee4a24aedb074ebb6c1a473ce750fce_log_index-42
_created_at
Timestamp of the entry creation.
2024-04-16 11:46:12
_updated_at
Timestamp of the entry update.
2024-04-16 11:46:12
_changed_since_full_refresh
Whether the entry was recreated.
FALSE
Last updated