theericstoneCOMP pump or dump
Updated 2021-11-11
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
›
⌄
-- deposits to CEXes
select
date_trunc('hour',block_timestamp) as block_hour,
to_label as exchange,
'cex_deposit' as tx_type,
sum(amount_usd) as amount_usd
from ethereum.udm_events
where contract_address = LOWER('0xc00e94cb662c3520282e6f5717214004a7f26888') -- COMP
and amount_usd > 0 -- easily subset to where COMP actually changes hands
and block_timestamp > getdate() - interval '4 days'
and to_label_type = 'cex' -- this gets everything going to a cetnralized exchange address
and (from_label IS NULL OR (from_label <> to_label)) -- this eliminates intra-exchange stuff that all the cexes do a ton of
group by 1,2
UNION
-- withdrawals
select
date_trunc('hour',block_timestamp) as block_hour,
from_label as exchange,
'cex_withdrawal' as tx_type,
sum(amount_usd) as amount_usd
from ethereum.udm_events
where contract_address = LOWER('0xc00e94cb662c3520282e6f5717214004a7f26888') -- COMP
and amount_usd > 0 -- easily subset to where COMP actually changes hands
and block_timestamp > getdate() - interval '4 days'
and from_label_type = 'cex' -- this gets everything coming from a cetnralized exchange address
and (to_label IS NULL OR (from_label <> to_label)) -- this eliminates intra-exchange stuff that all the cexes do a ton of
group by 1,2
order by 1 desc;
Run a query to Download Data