MLDZMNweth on OSMO
Updated 2022-06-11Copy 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 tb1 as (select
BLOCK_TIMESTAMP::date as day,
sum(AMOUNT/1e18) as deposit_osmo,
sum(deposit_osmo) over (order by day) rate_deposit_osmo
from osmosis.core.fact_liquidity_provider_actions
where CURRENCY in ('ibc/65381C5F3FD21442283D56925E62EA524DED8B6927F0FF94E21E0020954C40B5','ibc/EA1D43981D5C9A1C4AAEA9C23BB1D4FA126BA9BC7020A25E0AE4AA841EA25DC5')
and action='pool_joined'
and TX_STATUS='SUCCEEDED'
group by 1),
tb2 as (select
BLOCK_TIMESTAMP::date as day,
sum(ASSET_AMOUNT) as deposit_thorchain,
sum(deposit_thorchain) over (order by day) rate_deposit_thorchain
from flipside_prod_db.thorchain.liquidity_actions
where POOL_NAME ilike '%ETH.ETH%'
and BLOCK_TIMESTAMP>='2022-01-01'
and LP_ACTION='add_liquidity'
group by 1),
tb3 as (select
BLOCK_TIMESTAMP::date as day,
sum(EVENT_INPUTS:value/1e18) as deposit_sushi,
sum(deposit_sushi) over (order by day) rate_deposit_sushi
from ethereum.core.FACT_EVENT_LOGS s join ethereum.core.dim_labels b on s.ORIGIN_TO_ADDRESS=b.ADDRESS
where BLOCK_TIMESTAMP>='2022-01-01'
and EVENT_NAME='Deposit'
and CONTRACT_ADDRESS='0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
and LABEL_SUBTYPE='swap_contract'
and LABEL='sushiswap'
group by 1)
select
tb1.day as day,
deposit_osmo,
deposit_thorchain,
Run a query to Download Data