shadilFuse Pool DAI Allocation
    Updated 2022-03-23
    SELECT
    event_inputs:pool as pool_no,
    sum(event_inputs:amount)/pow(10,18) as dai_amount,
    case
    WHEN pool_no = 100 THEN 'Fuse-6 Tetranode'
    WHEN pool_no = 102 THEN 'Fuse-18 Olympus Pool Party'
    WHEN pool_no = 101 THEN 'Fuse-7 Tetranode"s ETH Pool Dai'
    -- WHEN pool_no = 1 THEN 'Compound'
    -- WHEN pool_no = 2 THEN 'Aave Interest bearing'
    end
    as pool_name
    FROM ethereum.events_emitted
    WHERE lower(contract_address) = lower('0xafd2aade64e6ea690173f6de59fc09f5c9190d74')
    AND tx_succeeded = 'TRUE'
    AND tx_to_label_subtype = 'pool'
    AND event_name = 'PoolAllocation'
    AND event_inputs:pool >= 100 -- exclude aave, compound
    group by pool_no
    ORDER by dai_amount DESC
    Run a query to Download Data