/ Fork of (#1270) ZRX 0x v3 Fees @devinwalsh
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 results
SQL query
1SELECT
2date_trunc('day', evt_block_time) as day,
3sum("protocolFeePaid"/1e18) as fees_eth,
4sum("protocolFeePaid"/1e18*p.price) as fees_paid,
5sum(sum("protocolFeePaid"/1e18*p.price)) over (order by date_trunc('day', evt_block_time)) as cumulative_fees,
6avg(p.price) as ETH_usd
7FROM zeroex_v3."Exchange_evt_Fill"
8INNER JOIN prices.usd p ON p.minute = date_trunc('minute', evt_block_time)
9WHERE p.symbol = 'WETH'
10GROUP BY 1
11ORDER BY 1 desc
12
13