Uniswap X Trades
UniswapX: Dutch Order Reactor orders and settlement. This
ethereum.dex.uniswap_x_trades
table includes all trades including failed execute
calls from Uniswap X's ExclusiveDutchOrderReactor
.
⚠️ This model includes failed orders that failed to execute.
To filter them out, set status = 1 (see example below) .These trades amount to ~1.6% of total volume, and ~3% of all trades.
Sample Query
Methodology
Identify the following trace call from UniswapX
ExclusiveDutchOrderReactor
contractexecuteBatchWithCallback executeWithCallback executeBatch execute
From the trace calls, we fetch the serialised order and ABI decode.
From event logs, we join the corresponding
Fill
event emitted by theExclusiveDutchOrderReactor
contract
Using this transaction as an example: https://etherscan.io/tx/0xc3cb3b518f455144d153e6d086b8688d6678b7318ab928b82983ab03e315e333
Table Columns
Note that the decoded orders can be found in the extra_fields
column.
Column Name | Description | Example |
---|---|---|
project | Project name. | uniswap_x |
protocol | Protocol name. | uniswap_x |
trace_call | Trace call method. | execute |
order_type | Order type. Can be either `single` or `batch` orders. `execute` and `executeWithCallback` maps to single orders. | single |
order_index | Order index within the call. For batch orders, they are flatten with each order executed represented as a line. | 0 |
status | Trace status of the call. This will 1 for successful traces and 0 for failed traces. | 1 |
error | Error message emitted by the trace call. | |
filler | Address of the filler. These agents pickup signed orders from swappers and compete to execute them using any source of liquidity they have access to. | 0x7321ac264b89254ea749a0657d41a9a2ebf8e3da |
reactor | Address or the reactor. Order Reactors settle UniswapX orders. They are responsible for validating orders of a specific type, resolving them into inputs and outputs, and executing them against the filler's strategy, and verifying that the order was successfully fulfilled. | 0x6000da47483062a0d734ba3dc7576ce6a0b645c4 |
swapper | Address of the swapper. | 0x27b6318dd9861cf26ba8c32dde26bbf8b5e0c956 |
exclusive_filler | Address of the exclusive filler. | 0x7321ac264b89254ea749a0657d41a9a2ebf8e3da |
exclusivity_override_bps | The amount in bps that a non-exclusive filler needs to improve the outputs by to be able to fill the order. | 100 |
token_sold_address | Input token address. Input tokens will map to token sold. Native ETH will be represented as zero address `0x0000000000000000000000000000000000000000`. | 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 |
token_sold_name | Input token name. | Wrapped Ether |
token_sold_symbol | Input token symbol. | WETH |
token_sold_decimals | Input token decimals. | 18 |
token_sold_amount_raw | Input token amount, unnormalized, in string. | 40000000000000000 |
token_sold_amount | Input token amount, normalized. | 0.04 |
usd_sold_amount | USD value of the input token. | 132.4968 |
outputs | Array of outputs. Note that there can be > 1 outputs for a single trade. Most of the case the bulk of the output values goes to the first output. | [ { "endAmount": 92415831, "recipient": "0x27b6318dd9861cf26ba8c32dde26bbf8b5e0c956", "startAmount": 119475368, "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" }, { "endAmount": 138831, "recipient": "0x27213e28d7fda5c57fe9e5dd923818dbccf71c47", "startAmount": 179482, "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" } ] |
token_bought_address | First output token address. Output tokens will map to tokens bought. Native ETH will be represented as zero address `0x0000000000000000000000000000000000000000`. | 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 |
token_bought_name | First output token name. | USD Coin |
token_bought_symbol | First output token address. | USDC |
token_bought_decimals | First output token decimals. | 6 |
token_bought_amount_raw | Amount of token bought, unnormalized and in string. | 119475368 |
token_bought_amount | Amount of token bought, normalized. | 119.475368 |
usd_bought_amount | USD amount of token bought, normalized. | 119.43952539 |
usd_amount | USD value of the swap. We preferentially select the input (token sold) usd value. If this is not available, we will select the output. | 132.4968 |
additional_validation_contract | Custom validation contract. | 0x0000000000000000000000000000000000000000 |
additional_validation_data | Encoded validation params for additionalValidationContract. | |
deadline | Deadline timestamp. | 1712191068 |
decay_start_time | The time at which the DutchOutputs start decaying. | 2024-04-04 00:36:36.000 |
decay_end_time | The time at which price becomes static. | 2024-04-04 00:37:36.000 |
order_hash | Unique hash of the order. | 0xe2bdd76383aab99fb591ca99fac72b6b99dc0e5822df200f7e97e481a99426b7 |
nonce | Nonce of the order. | 1993352865421623303439960934785910165619400008222801057126382995622032590081 |
sig | Signature of the order. | |
extra_fields | The decoded serialized order. | { "decayEndTime": 1712191056, "decayStartTime": 1712190996, "exclusiveFiller": "0x7321ac264b89254ea749a0657d41a9a2ebf8e3da", "exclusivityOverrideBps": 100, "input": { "endAmount": 40000000000000000, "startAmount": 40000000000000000, "token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2" }, "orders": { "additionalValidationContract": "0x0000000000000000000000000000000000000000", "additionalValidationData": "", "deadline": 1712191068, "nonce": 1.993352865421623e+75, "reactor": "0x6000da47483062a0d734ba3dc7576ce6a0b645c4", "swapper": "0x27b6318dd9861cf26ba8c32dde26bbf8b5e0c956" }, "outputs": [ { "endAmount": 92415831, "recipient": "0x27b6318dd9861cf26ba8c32dde26bbf8b5e0c956", "startAmount": 119475368, "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" }, { "endAmount": 138831, "recipient": "0x27213e28d7fda5c57fe9e5dd923818dbccf71c47", "startAmount": 179482, "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" } ] } |
transaction_from_address | The address of the sending party of this transaction. | 0xd9f4faa80fa2ace09ccf56b15b9d2eec423dd4bd |
transaction_to_address | The address of the receiving party of this transaction (could be a contract address). | 0x7321ac264b89254ea749a0657d41a9a2ebf8e3da |
transaction_hash | Transaction hash of this trade. | 0xb072c5aa5c36dc3a31140d8adf02af47c5290238fd4294076701dbbf99256e6a |
transaction_index | Transaction index of this trade in the block. | 57 |
calldata_selector | The call data selector of the transaction. | 0x01349c00 |
transaction_fees | Fees paid at the transaction level. | 0.00365229813185184 |
transaction_fees_usd | Fees paid in USD. | 12.097945378 |
fee_details | Additional fee details of the transaction, including max priority fee, gas price and gas used for the transaction. | { "gas": 247915, "gas_price": 0, "max_fee_per_gas": null, "max_priority_fee_per_gas": null, "receipt_effective_gas_price": 21038098960, "receipt_gas_used": 173604 } |
log_index | Log index of this trade. | 133 |
trace_id | Block timestamp of this trade. | call_0xb072c5aa5c36dc3a31140d8adf02af47c5290238fd4294076701dbbf99256e6a_0 |
trace_type | Block number of this trade. | call |
call_type | Block hash of this trade. | call |
block_timestamp | Block timestamp of this trade. | 2024-04-04 00:36:23.000 |
block_number | Block number of this trade. | 19578864 |
block_hash | Block hash of this trade. | 0xef0c1104a96c2a515121058f045b945f54f679f27665a5a64d55fba070f0aa8e |
unique_id | Unique ID of each trade. | trace_id-call_0xb072c5aa5c36dc3a31140d8adf02af47c5290238fd4294076701dbbf99256e6a_0_order_index-0 |
_created_at | Timestamp of the entry creation. | 2024-04-04 04:29:21.057 |
_updated_at | Timestamp of the entry update. | 2024-04-04 04:29:21.057 |
Last updated