ChinmayFNet Liquidity of different assets staked (locked in at the moment)
Updated 2023-04-13Copy Reference Fork
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 a as (select date_trunc('day', block_timestamp) as Day, sum(raw_amount)/1e18 as "WETH" from optimism.core.fact_token_transfers
where contract_address = lower('0x4200000000000000000000000000000000000006')
and to_address = lower('0xC91EE78162424c5d1279DAe6f04baBEA4794b34f')
and from_address = origin_from_address
group by 1
),
b as (select date_trunc('day', block_timestamp) as Day, sum(raw_amount)/1e6 as "USDC" from optimism.core.fact_token_transfers
where contract_address = lower('0x7F5c764cBc14f9669B88837ca1490cCa17c31607')
and to_address = lower('0xC91EE78162424c5d1279DAe6f04baBEA4794b34f')
and from_address = origin_from_address
group by 1),
c as (
select date_trunc('day', block_timestamp) as Day, sum(raw_amount)/1e18 as "DAI" from optimism.core.fact_token_transfers
where contract_address = lower('0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1')
and to_address = lower('0xC91EE78162424c5d1279DAe6f04baBEA4794b34f')
and from_address = origin_from_address
group by 1
),
d as (select date_trunc('day', hour) as Day , avg(price) as Price from optimism.core.fact_hourly_token_prices
where symbol in ('WETH')
and date_trunc('day', hour) >= '2022-08-16'
group by 1)
, e as (select date_trunc('day', block_timestamp) as Day, sum(raw_amount)/1e18 as "WETH1" from optimism.core.fact_token_transfers
where contract_address = lower('0x4200000000000000000000000000000000000006')
and from_address = lower('0xC91EE78162424c5d1279DAe6f04baBEA4794b34f')
and to_address = origin_from_address
group by 1
),
f as (select date_trunc('day', block_timestamp) as Day, sum(raw_amount)/1e6 as "USDC1" from optimism.core.fact_token_transfers
where contract_address = lower('0x7F5c764cBc14f9669B88837ca1490cCa17c31607')
and from_address = lower('0xC91EE78162424c5d1279DAe6f04baBEA4794b34f')
and to_address = origin_from_address
Run a query to Download Data