Skip to content
Dune Analytics

@MatteoLeibowitz / MCD Realized Revenue (Surplus Auction)

MCD Realized Revenue (Surplus Auction)

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 results

Loading
 

SQL query

1SELECT 
2date_trunc('day', block_time) as day,
3sum(e.value/1e18*p.price) as MCD_rev,
4sum(sum(e.value/1e18*p.price)) over (order by date_trunc('day', block_time)) as cumulative_MCD_rev
5FROM erc20."ERC20_evt_Transfer" e
6LEFT JOIN ethereum."transactions" tx ON evt_tx_hash = tx.hash
7INNER JOIN prices.usd p ON p.minute = date_trunc('minute', block_time)
8WHERE e."to" = '\xdfe0fb1be2a52cdbf8fb962d5701d7fd0902db9f'
9AND p.symbol = 'MKR'
10GROUP BY 1 
11ORDER BY 1 desc
12LIMIT 10