Ali3NDaily Blockchains DEXs New Users Before and After FTX Collapse Over Time
Updated 2022-12-01
999
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
›
⌄
select 'Arbitrum' as chain,
date_trunc (day,mindate) as date,
case when date < '2022-11-08' then 'Before Collapse'
when date >= '2022-11-08' and date <= '2022-11-10' then 'Main Collapse Days'
when date > '2022-11-10' then 'After Collapse' end as timespan,
count (distinct origin_from_address) as New_Users
from (
select origin_from_address,
min (block_timestamp::date) as mindate
from arbitrum.core.fact_event_logs
where origin_to_address in (select distinct address from arbitrum.core.dim_labels where label_type ilike 'dex')
and tx_status = 'SUCCESS'
group by 1)
where mindate >= '2022-10-25' and mindate::date != CURRENT_DATE
group by 1,2,3
union ALL
select 'Optimism' as chain,
date_trunc (day,mindate) as date,
case when date < '2022-11-08' then 'Before Collapse'
when date >= '2022-11-08' and date <= '2022-11-10' then 'Main Collapse Days'
when date > '2022-11-10' then 'After Collapse' end as timespan,
count (distinct origin_from_address) as New_Users
from (
select origin_from_address,
min (block_timestamp::date) as mindate
from optimism.core.fact_event_logs
where origin_to_address in (select distinct address from optimism.core.dim_labels where label_type ilike 'dex')
and tx_status = 'SUCCESS'
group by 1)
where mindate >= '2022-10-25' and mindate::date != CURRENT_DATE
group by 1,2,3
union ALL
Run a query to Download Data