Skip to content
Dune Analytics

@hagaetc / DAI outstanding

DAI outstanding

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 mint AS
2(
3SELECT SUM(wad/1e18) AS minted FROM makermcd."DAI_call_mint"
4WHERE call_success = 'true'
5),
6burn AS
7(
8SELECT SUM(-wad/1e18) AS burned FROM makermcd."DAI_call_burn"
9WHERE call_success = 'true'
10),
11
12dsrinbound AS(
13SELECT SUM(rad/1e45) as inb FROM makermcd."VAT_call_move"
14WHERE dst = '\x197e90f9fad81970ba7976f33cbd77088e5d7cf7'
15AND call_success),
16
17dsroutbound AS(
18
19SELECT SUM(-rad/1e45) as outb FROM makermcd."VAT_call_move"
20WHERE src = '\x197e90f9fad81970ba7976f33cbd77088e5d7cf7'
21AND call_success
22)
23
24SELECT minted+burned+inb+outb AS "DAI Outstanding"
25FROM mint, burn, dsrinbound, dsroutbound...

SQL query results

Loading