chill Fuse Pools and Amounts
Updated 2022-05-26
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
with datas as
(
select (EVENT_INPUTS:value/1e18) as amount_usd, block_timestamp,
case
when event_inputs:to = '0x989273ec41274c4227bcb878c2c26fdd3afbe70d' then 'Tetranode Pool Dai (fDAI-6)'
when event_inputs:to = '0x8e4e0257a4759559b4b1ac087fe8d80c63f20d19' then 'Olympus Pool Party Dai (fDAI-18)'
when event_inputs:to = '0x7322b10db09687fe8889ad8e87f333f95104839f' then 'Tetranode ETH Pool Dai (fDAI-7)'
when event_inputs:to = '0x3dfd23a6c5e8bbcfc9581d2e864a68feb6a076d3' then 'Aave'
when event_inputs:to = '0x5d3a536e4d6dbd6114cc1ead35777bab948e3643' then 'Compound Dai (cDAI)'
end as pool_name
from ethereum_core.fact_event_logs
where
contract_name='Dai'
and event_inputs:from = '0xafd2aade64e6ea690173f6de59fc09f5c9190d74'
and origin_function_signature = '0xd42ec3fe'
and event_name = 'Transfer'
and amount_usd != 0
)
select sum(amount_usd),pool_name from datas
group by pool_name
Run a query to Download Data