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 .

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

-- Daily Swap Volume 
select 
    date(block_timestamp) as date, 
    sum(usd_amount) as usd_volume,
    count(distinct transaction_hash) as txn_count
from ethereum.dex.uniswap_x_trades
where status = 1 
group by all 

Methodology

  • Identify the following trace call from UniswapX ExclusiveDutchOrderReactor contract

    • executeBatchWithCallback 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 the ExclusiveDutchOrderReactor contract

Using this transaction as an example: https://etherscan.io/tx/0xc3cb3b518f455144d153e6d086b8688d6678b7318ab928b82983ab03e315e333

{
  "msg.sender": "0x6f1cdbbb4d53d226cf4b917bf768b94acbab6168",
  "func": "execute",
  "args": {
    "order": [
      {
        "order": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000065c529c20000000000000000000000000000000000000000000000000000000065c529fe000000000000000000000000d198fbe60c49d4789525fc54567447518c7d2a110000000000000000000000000000000000000000000000000000000000000064000000000000000000000000111111111117dc0aa78b770fa6a738034120c302000000000000000000000000000000000000000000000083f4b3a5432fac844d000000000000000000000000000000000000000000000083f4b3a5432fac844d00000000000000000000000000000000000000000000000000000000000002000000000000000000000000006000da47483062a0d734ba3dc7576ce6a0b645c400000000000000000000000045fabb434124afaa123eeee19cea29b5e0e3dd0b04683207312f3edb79be915765c1d5b7529ef4a9500dbe0e667c9878fe7bce010000000000000000000000000000000000000000000000000000000065c52a0a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000057a57e7d2199140000000000000000000000000000000000000000000000000052ff507e7c84afc00000000000000000000000045fabb434124afaa123eeee19cea29b5e0e3dd0b",
        "sig": "0x4f210fdb1808d4ca777960ff781ceecc37f4362605fa241216ec85f201f3d244179158351a0a2d2e5ba9a2d42c4bf647ac6bcf46216d10863644cb31ea42eef31c"
      }
    ]
  },
  "return": []
}

Table Columns

Note that the decoded orders can be found in the extra_fields column.

Last updated