0xaimanMonthly Growth of New Liquidity Providers (%)
Updated 2022-08-21
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
›
⌄
with raw as (with pool_address as
(select address from ethereum.core.dim_labels
where label_type= 'dex' and label ='sushiswap' and label_subtype='pool'
)
Select bLOCK_TIMESTAMP as t, TX_HASH, ORIGIN_FROM_ADDRESS as sender,
ORIGIN_TO_ADDRESS,
CONTRACT_ADDRESS as pool_address, EVENT_NAME, EVENT_INPUTS, EVENT_INPUTS:amount0 as a0, TX_STATUS
from ethereum.core.fact_event_logs el inner join pool_address
on el.contract_address=pool_address.address
where event_name = 'Mint' and tx_status ='SUCCESS'
),
time_min as (
Select sender, min(t) as tm
from raw
where a0>0
group by 1 )
select date_trunc('month', tm) as month, count(distinct sender ) as n_lp,
Lag(n_lp, 1) OVER(
ORDER BY month ASC) AS n_lp2, ((n_lp2 - n_lp)/n_lp)*100 as percentage_increase_n_lp, case
when percentage_increase_n_lp >0 then percentage_increase_n_lp
when percentage_increase_n_lp <0 then null end as monthly_positive_growth, case
when percentage_increase_n_lp <0 then percentage_increase_n_lp
when percentage_increase_n_lp >0 then null end as monthly_negative_growth
from time_min
where tm>='2021-01-01'
group by 1 order by 1
Run a query to Download Data