nitsPools Retaining the Most
Updated 2022-02-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
31
32
33
34
35
36
›
⌄
with
btc_tvl as
(select tx_id, (block_timestamp)as b, to_address from ethereum.udm_events where tx_id in
(select tx_id from ethereum.udm_events
where contract_address = lower('0x65a833afDc250D9d38f8CD9bC2B1E3132dB13B2F') or contract_address = lower('0x8b5876f5B0Bf64056A89Aa7e97511644758c3E8c') --0x65a833afDc250D9d38f8CD9bC2B1E3132dB13B2F
and event_name ilike 'withdraw')
and amount_usd is not NULL ),
eth_tvl as
(select tx_id, (block_timestamp)as b, to_address from ethereum.udm_events where tx_id in
(select tx_id from ethereum.udm_events
where contract_address = lower('0x25751853Eab4D0eB3652B5eB6ecB102A2789644B') or contract_address = lower('0x0FABaF48Bbf864a3947bdd0Ba9d764791a60467A') --0x65a833afDc250D9d38f8CD9bC2B1E3132dB13B2F
and event_name ilike 'withdraw')
and amount_usd is not NULL ),
eth_tvl_put as
(select tx_id, (block_timestamp)as b, to_address from ethereum.udm_events where tx_id in
(select tx_id from ethereum.udm_events
where contract_address = lower('0x16772a7f4a3ca291C21B8AcE76F9332dDFfbb5Ef')
and event_name ilike 'withdraw')
and amount_usd is not NULL ),
eth_tvl_put_yvusdc as
(select tx_id, (block_timestamp)as b, to_address from ethereum.udm_events where tx_id in
(select tx_id from ethereum.udm_events
where contract_address = lower('0x8FE74471F198E426e96bE65f40EeD1F8BA96e54f')
and event_name ilike 'withdraw')
and amount_usd is not NULL ),
all_contracts as (select * from ethereum.udm_events where from_address in
(select to_address from eth_tvl_put
UNION ALL
select to_address from eth_tvl_put_yvusdc
UNION ALL
select to_address from eth_tvl
UNION ALL
select to_address from btc_tvl
)),
Run a query to Download Data