Skip to content
Dune Analytics

@0x / Matcha Volume (USD), daily

Matcha Volume (USD), daily

Loading
 

About queries and results

Dune Analytics lets you explore, create, and share Ethereum analytics. You can find an endless amount of great queries and dashboards on Dune.

We have decoded Ethereum smart contract data so you can do powerful analysis with simple SQL queries and visualise the query results into beautiful graphs.

Dune Analytics is free for everyone forever. If you want extra features like private queries, export your results and more check out our Pro plan.

SQL query

1WITH
2    matcha_tx AS (
3        SELECT DISTINCT
4            tx_hash
5        FROM zeroex.view_api_affiliate_data
6        WHERE
7            affiliate_address = '\x86003b044f70dac0abc80ac8957305b6370893ed'::BYTEA
8    )
9    , v3_fills_no_bridge AS (
10      SELECT fills.evt_tx_hash AS tx_hash
11          , fills.evt_index
12          , evt_block_time AS block_time
13          , fills."makerAddress" AS maker
14          , fills."takerAddress" AS taker
15          , SUBSTRING(fills."takerAssetData",17,20) AS taker_token
16          , SUBSTRING(fills."makerAssetData",17,20) AS maker_token
17          , fills."takerAssetFilledAmount"  AS taker_token_amount_raw
18          , fills."makerAssetFilledAmount"  AS maker_token_amount_raw
19          , 'Native Fill v3' as type
20      FROM zeroex_v3."Exchange_evt_Fill" fills
21      left join matcha_tx on matcha_tx.tx_hash = fills.evt_tx_hash
22      WHERE (SUBSTRING("makerAssetData",1,4) != '\xdc1600f3'::BYTEA)
23      and (matcha_tx.tx_hash is not null or fills."feeRecipientAddress" = '\x86003b044f70dac0abc80ac8957305b6370893ed'::BYTEA)
24    )
25    -- bridge fills...

SQL query results

Loading