Skip to content
Dune Analytics

@johaya / Aave Accumulative Origination Volume

Aave Accumulative Origination Volume

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

1WITH borrows AS 
2(
3SELECT
4evt_block_time,
5t.symbol as token,
6sum("_amount"/10^decimals) as amount
7FROM aave."LendingPool_evt_Borrow" borrows
8LEFT JOIN erc20."tokens" t ON borrows."_reserve" = t.contract_address
9GROUP BY 1,2
10)
11
12select dt, sum(USDamt) over (
13                        ORDER BY dt ASC ROWS BETWEEN unbounded preceding AND CURRENT ROW) AS total_usd
14from
15(select dt,sum(USDamt) as USDamt
16from
17(select min(week) as dt,
18        USDvalue as USDamt
19from
20(SELECT 
21date_trunc('week',evt_block_time) as week, 
22sum(amount*price) As USDvalue
23from borrows
24LEFT JOIN 
25(SELECT avg(price) AS price,
...