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.

FeatureDEX TradesDEX Aggregator Trades
Liquidity SourceSingle liquidity pool (e.g., one Uniswap pool)Multiple pools/DEXs in one transaction (e.g., split between Uniswap, Curve, Balancer)
Route ComplexitySimple A → B swapComplex routes possible (A → B → C → D) with multi-hop optimization
Price DiscoveryPrice determined by single pool’s AMM formulaBest 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

Column NameDescriptionExample
integratorName 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_tagContract address, event log field or other relevant field that is used to indicate the frontend integrator
projectName of the project. Includes dodo, paraswap, zeroex, cow_protocol, kyberswap_aggregator, tokenlon, openocean.cow_protocol
protocolDEX protocol or project contract which executed the aggregator trade.cow_protocol
event_nameThis field will be null for majority of DEX aggregator trades. Unless the event specifies the pools that the trade was routed through.Trade
contract_addressThe name of the event (or the function call) for this trade.0x9008d19f58aabd9ed0d60971565aa8510560ab41
liquidity_pool_addressThe contract address of the aggregator.null
sender_addressAddress of the sender of the swap event log, which can be the Router.0x2fb4aa67cc48c9dd126dc2f6a437c5c995b2732d
to_addressAddress of the recipient of the swap event.0x2fb4aa67cc48c9dd126dc2f6a437c5c995b2732d
token_sold_addressAddress of the token sold.0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
token_sold_nameName of the token sold.USD Coin
token_sold_symbolSymbol of the token sold.USDC
token_sold_amount_raw_strAmount of token sold (not divided by the number of decimals) in string.6250000000
token_sold_amount_rawAmount of token sold (not divided by the number of decimals).6250000000
token_sold_amount_strtoken_sold_amount_raw divided by the number of decimals of the token in string.6250
token_sold_amounttoken_sold_amount_raw divided by the number of decimals of the token.6250
usd_sold_amountUSD value of tokens sold.6245
token_bought_addressToken address of the token bought, i.e. the asset acquired from the trade.0xccccb68e1a848cbdb5b60a974e07aae143ed40c3
token_bought_nameName of the token bought.TOPIA
token_bought_symbolSymbol of the token bought.TOPIA
token_bought_amount_raw_strAmount of token bought (not divided by the number of decimals) in string.64632249553876898925672
token_bought_amount_rawAmount of token bought (not divided by the number of decimals).6.46322E+22
token_bought_amount_strtoken_bought_amount_raw divided by the number of decimals of the token in string.64632.24955
token_bought_amounttoken_bought_amount_raw divided by the number of decimals of the token.64632.24955
usd_bought_amountUSD value of tokens bought.6048.867603
usd_amountUSD value of the swap. Note that this preferentially selects the price and value of the more reputable token.6245
extra_fieldsThis 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_addressThe address of the sending party of this transaction.0xbf54079c9bc879ae4dd6bc79bce11d3988fd9c2b
transaction_to_addressThe address of the receiving party of this transaction (could be a contract address).0x9008d19f58aabd9ed0d60971565aa8510560ab41
transaction_hashTransaction hash of this trade.0x7a3be25e6fffa9fd29ef9aa9eafdfd0d8ee4a24aedb074ebb6c1a473ce750fce
transaction_indexTransaction index of this trade in the block.17
transaction_feesFees paid at the transaction level.0.02354155877
transaction_fees_usdFees paid in USD.95.02173534
fee_detailsAdditional 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_selectorThe call data selector of the transaction.0x13d79a0b
log_indexLog index of this trade.42
block_timestampBlock timestamp of this trade.2024-03-11 12:48:59
block_numberBlock number of this trade.19411959
block_hashBlock hash of this trade.0xe1944bbf513fa729bc78f34bee665dfafebede27cb73fd99d86ed4265c2b0852
unique_idUnique ID of each trade.txn-0x7a3be25e6fffa9fd29ef9aa9eafdfd0d8ee4a24aedb074ebb6c1a473ce750fce_log_index-42
_created_atTimestamp of the entry creation.2024-04-16 11:46:12
_updated_atTimestamp of the entry update.2024-04-16 11:46:12
_changed_since_full_refreshWhether the entry was recreated.FALSE