CryptoIcicleBridge Volume (Optimism Bridge)
    Updated 2022-07-24
    -- Payout 185.003 OP
    -- Grand Prize 555.01 OP
    -- Level Intermediate

    -- Q2. Compare user bridge volume on the Optimism Native Token Bridge vs. another Mainnet <-> Optimism Bridge
    -- of your choosing (e.g. Hop).
    -- Can we conclude if there are differences in the types of users or transactions using the native bridge
    -- vs. the non-native bridge?

    with txns as (
    select
    iff(eth_to_address = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1', 'Native', 'Hop') as type,
    *
    from ethereum.core.ez_eth_transfers
    where (
    eth_to_address = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1' --Optimism
    or eth_to_address = '0xb8901acb165ed027e32754e0ffe830802919727f' -- HOP Optimism
    )
    and block_timestamp >= CURRENT_DATE - {{n_days}}
    )


    select
    block_timestamp::date as date,
    type,
    count(distinct eth_from_address) as n_wallets,
    sum(amount) as eth_deposited,
    avg(amount) as avg_eth_deposited
    from txns
    group by date, type
    Run a query to Download Data