Skip to content
Dune Analytics

@johaya / COMP Total Outstanding Debt & Price

COMP Total Outstanding Debt & Price

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 date_trunc('day', block_time) AS day,
2        sum("borrow_amount_usd") AS total_borrow,
3        b.price
4FROM (select avg(price) as price,date(minute) as dt from prices."usd" where symbol = 'COMP'
5group by 2) b 
6left join 
7compound."view_borrow" a on date(a.block_time)=b.dt
8WHERE block_time > now() - interval '60 days' 
9GROUP BY 1,3
10ORDER BY 1