Aggregator Trades
Dex trades from aggregators.
This table is not compatible with dex.trades
in terms of columns. There are additional gas fees and transaction details available on DEX aggregator trades.
ethereum.dex.aggregator_trades
contains successful DEX trades from DEX aggregators.
In addition to the convention fields involved in DEX swaps, this table includes transaction fees, extra fee details (priority fees), and additional fields emitted specifically to each aggregator contract.
Coverage
The project and protocol coverage for our aggregator_trades
table includes:
Projects | Protocols |
---|---|
1inch | 1inch_ar_v3, 1inch_ar_v6, 1inch_ar_v2, 1inch_ar_v4, 1inch_lop_v3, 1inch_lop_v4, 1inch_lop_v2, 1inch_ar_v5 |
cow_protocol | cow_protocol |
dodo | dodo_x_v1, dodo_x_v2 |
hashflow | hashflow_x |
kyberswap_aggregator | kyberswap_aggregator_v2 |
okx | okx_ar_v1 |
openocean | openocean_v2 |
paraswap | paraswap_v4, paraswap_v2, paraswap_v3, paraswap_v1, paraswap_v5 |
tokenlon | tokenlon_amm_v2, tokenlon_pmm, tokenlon_amm_v1, tokenlon_rfq_v2, tokenlon_rfq_v1 |
uniswap_x | uniswap_x |
zeroex | zeroex_v4 |
The project and protocol coverage for our aggregator_trades
table includes:
Projects | Protocols |
---|---|
1inch | 1inch_ar_v3, 1inch_ar_v6, 1inch_ar_v2, 1inch_ar_v4, 1inch_lop_v3, 1inch_lop_v4, 1inch_lop_v2, 1inch_ar_v5 |
cow_protocol | cow_protocol |
dodo | dodo_x_v1, dodo_x_v2 |
hashflow | hashflow_x |
kyberswap_aggregator | kyberswap_aggregator_v2 |
okx | okx_ar_v1 |
openocean | openocean_v2 |
paraswap | paraswap_v4, paraswap_v2, paraswap_v3, paraswap_v1, paraswap_v5 |
tokenlon | tokenlon_amm_v2, tokenlon_pmm, tokenlon_amm_v1, tokenlon_rfq_v2, tokenlon_rfq_v1 |
uniswap_x | uniswap_x |
zeroex | zeroex_v4 |
List of specific event names / function calls that are indexed.
Project | Protocol | Event Name / Function Call |
---|---|---|
zeroex | zeroex_v4 | OtcOrderFilled, LimitOrderFilled, LiquidityProviderSwap, RfQOrderFilled |
uniswap_x | uniswap_x | execute, executeBatch, executeBatchWithCallback, executeWithCallback |
tokenlon | tokenlon_rfq_v2 | FilledRFQ |
tokenlon | tokenlon_rfq_v1 | FillOrder |
tokenlon | tokenlon_pmm | FillOrder |
tokenlon | tokenlon_amm_v2 | Swapped |
tokenlon | tokenlon_amm_v1 | Swapped |
paraswap | paraswap_v5 | SwappedDirect, Bought, BoughtV3, Swapped, Bought2, SwappedV3, Swapped2 |
paraswap | paraswap_v4 | Bought, Swapped |
paraswap | paraswap_v3 | Bought, Swapped |
paraswap | paraswap_v2 | Swapped |
paraswap | paraswap_v1 | Swapped |
openocean | openocean_v2 | Swapped |
okx | okx_ar_v1 | OrderRecord |
kyberswap_aggregator | kyberswap_aggregator_v2 | Swapped |
hashflow | hashflow_x | Trade |
dodo | dodo_x_v2 | OrderHistory |
dodo | dodo_x_v1 | OrderHistory |
cow_protocol | cow_protocol | Trade |
1inch | 1inch_lop_v4 | fillContractOrderArgs, fillOrder, fillContractOrder, fillOrderArgs |
1inch | 1inch_lop_v3 | fillOrderRFQ, fillOrder, fillOrderTo, fillOrderRFQTo, fillOrderRFQToWithPermit, fillOrderToWithPermit, fillOrderRFQCompact |
1inch | 1inch_lop_v2 | fillOrderRFQTo, fillOrderRFQToWithPermit, fillOrderRFQ |
1inch | 1inch_ar_v6 | unoswap2, unoswap, unoswap3, ethUnoswap, swap, ethUnoswap3, ethUnoswapTo3, unoswapTo2, ethUnoswap2, ethUnoswapTo2, unoswapTo3, clipperSwap, clipperSwapTo, ethUnoswapTo, unoswapTo |
1inch | 1inch_ar_v5 | uniswapV3Swap, unoswapToWithPermit, swap, clipperSwapToWithPermit, unoswap, uniswapV3SwapTo, clipperSwap, unoswapTo, uniswapV3SwapToWithPermit, clipperSwapTo |
1inch | 1inch_ar_v4 | clipperSwap, uniswapV3Swap, uniswapV3SwapToWithPermit, unoswap, clipperSwapToWithPermit, swap, unoswapWithPermit, uniswapV3SwapTo |
1inch | 1inch_ar_v3 | Swapped |
1inch | 1inch_ar_v2 | Swapped |
Data Caveats
There are several data caveats that you should take note of while using this table.
-
The scope of DEXs and calls indexed in this table represents a subset of all on-chain DEX aggregator volume. For protocols and projects covered, please refer to the list above.
-
Trades indexed from trace calls will have a
-1
log index assigned. -
Due to the limitation of trace calls, there are edge cases where the token-bought address is null.
There are several data caveats that you should take note of while using this table.
-
The scope of DEXs and calls indexed in this table represents a subset of all on-chain DEX aggregator volume. For protocols and projects covered, please refer to the list above.
-
Trades indexed from trace calls will have a
-1
log index assigned. -
Due to the limitation of trace calls, there are edge cases where the token-bought address is null.
For trades that are index from traces calls, they do not have a corresponding log index. These trades will be assigned a default -1 value.
For 1inch, contracts beyond AggregatorRouterV4 (V5, V6) do not emit events. We index the trace calls to identify the swaps performed.
There are several limitations in using trace call data as they are incomplete. Below are the caveats and data impact we identified:
Call type | Caveats | Implication |
---|---|---|
unoswap calls | unoswap calls does not have the destination token swapped. The call data only has | There will be a small minority of trades where the
|
uniswap calls | UniswapV3 calls does not have source and destination tokens swapped. We use to identify the tokens swapped. Following which, we roll-up the swaps by matching which Callback traces with the calls by pool address and swap amounts: uniswapV3Swap uniswapV3SwapTo uniswapV3SwapToWithPermit | There will be a small minority of trades where the
|
Table Column
Column Name | Description | Example |
---|---|---|
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 |