CoinConverseFuse Pool Analysis dai not in usdc
Updated 2022-05-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
36
›
⌄
with fuse_pool_usdc as (select block_timestamp::date as dt, tx_id, event_inputs:pool as pool_number,
case when event_inputs:pool = 1 then 'Compound_USDC'
when event_inputs:pool = 2 then 'Aave Protocol V1'
when event_inputs:pool = 3 then 'mStable'
when event_inputs:pool = 100 then 'Fuse 4'
when event_inputs:pool = 101 then 'Fuse 7'
when event_inputs:pool = 102 then 'Fuse 13'
when event_inputs:pool = 103 then 'Fuse 14'
when event_inputs:pool = 104 then 'Fuse 15'
when event_inputs:pool = 106 then 'Fuse 11'
when event_inputs:pool = 108 then 'Fuse 18'
when event_inputs:pool = 109 then 'Fuse 6'
end as Fuse_pools, case
when event_inputs:pool = 3 then (event_inputs:amount/1e18)
when event_inputs:pool != 3 then (event_inputs:amount/1e6)
end as amount_of_usdc
from ethereum.events_emitted
where contract_address = '0x66f4856f1bbd1eb09e1c8d9d646f5a3a193da569'
and tx_succeeded = 'TRUE'
and event_name = 'PoolAllocation'
and tx_to_label_subtype = 'pool'
and tx_to_label = 'rari capital'),
fuse_pool_dai as (select block_timestamp::date as dt, tx_id, event_inputs:pool as pool_number,
case when event_inputs:pool = 1 then 'Compound_DAI'
when event_inputs:pool = 2 then 'Aave Protocol V1'
when event_inputs:pool = 100 then 'Fuse 6'
when event_inputs:pool = 101 then 'Fuse 7'
when event_inputs:pool = 102 then 'Fuse 18'
end as Fuse_pools,
event_inputs:amount/1e18 as amount_of_dai
from ethereum.events_emitted
where contract_address = lower('0xaFD2AaDE64E6Ea690173F6DE59Fc09F5C9190d74')
and tx_succeeded = 'TRUE'
and event_name = 'PoolAllocation'
and tx_to_label_subtype = 'pool'
Run a query to Download Data