0xaimanAverage ETH Volume Deposited/Withdrawn from BendDAO reserve
Updated 2022-09-07
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 cx as (with ax as (with a as (select tx_hash
from ethereum.core.fact_event_logs
where contract_address='0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' and
event_name='Deposit' and
ORIGIN_TO_ADDRESS = '0x3b968d2d299b895a5fcf3bba7a64ad0f566e6f88'),
c as (select date_trunc('week',block_timestamp) as month, origin_from_address as depositor, amount from ethereum.core.ez_eth_transfers b
inner join a on b.tx_hash=a.tx_hash)
select month, avg(amount) as avg_deposit_volume
from c
group by 1),
bx as (with a as (select tx_hash
from ethereum.core.fact_event_logs
where contract_address='0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' and
event_name='Withdrawal' and
ORIGIN_TO_ADDRESS = '0x3b968d2d299b895a5fcf3bba7a64ad0f566e6f88'),
c as (select date_trunc('week',block_timestamp) as month, origin_from_address as depositor, amount from ethereum.core.ez_eth_transfers b
inner join a on b.tx_hash=a.tx_hash)
select month, avg(amount) as avg_withdraw_volume
from c
group by 1)
select ax.month,avg_deposit_volume,avg_withdraw_volume
from ax inner join bx on ax.month=bx.month
),
dx as (select date_trunc('week',hour) as month, avg(price) as wbtc_price from ethereum.core.fact_hourly_token_prices
where token_address=lower('0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599')
group by 1)
Run a query to Download Data