Moe AAVE depositors and withdrawers
Updated 2023-06-05
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with dep as (select
'DEPOSIT' as actions,
date_trunc(week , BLOCK_TIMESTAMP)::date as date,
count(distinct DEPOSITOR_ADDRESS) as users,
count(distinct TX_HASH) as transactions,
sum(SUPPLIED_USD) as value_usd,
sum(ISSUED_TOKENS) as value_aave,
value_aave / users as usd_per_user,
value_aave / transactions as usd_per_txn
from
ethereum.aave.ez_deposits
where
date(BLOCK_TIMESTAMP) >= current_date - {{days_back}}
and
symbol ilike 'aave'
group by 2),
witd as(
select 'WITHDRAW' as actions,
date_trunc(week , BLOCK_TIMESTAMP)::date as date,
count(distinct DEPOSITOR_ADDRESS) as users,
count(distinct TX_HASH) as transactions,
sum(WITHDRAWN_USD) as value_usd,
sum(WITHDRAWN_TOKENS) as value_aave,
value_aave / users as usd_per_user,
value_aave / transactions as usd_per_txn
from
ethereum.aave.ez_withdraws
where
date(BLOCK_TIMESTAMP) >= current_date - {{days_back}}
and
symbol ilike 'aave'
Run a query to Download Data