CryptoIcicleFlash Bounty: Merge Open Analytics - Swap Metrics
    Updated 2022-09-24
    -- The merge has occurred. How have users responded in days that followed?
    -- Pay by Quality
    -- Your score determines your final payout.
    -- Grand Prize 112.5 USDC (A score of 11 or 12 earns you a Grand Prize title)
    -- Payout 75 USDC
    -- Score Multiplier0-7 : 0% 8 : 50% 9 : 75% 10 : 100% 11 : 125% 12 : 150%
    -- Payout Network Ethereum
    -- Level Intermediate
    -- Difficulty Hard
    -- We want to know all about the merge — and we’re turning to you for the answers.
    -- Take a deep dive into the ETH merge and switch to POS with this Open Analytics Bounty.
    -- This is a chance to explore the topic without any specific prompt, just a direction and a reward.
    -- It’s your chance to have your brain follow your heart — got a spark of interest, or a loose thread,
    -- or a weirdly-specific question gnawing at the back of your mind? Follow it as far as you can!
    with
    txns as (
    select
    *
    from ethereum.core.ez_dex_swaps
    where (block_number >= 15537351 - {{n_blocks}} and block_number <= 15537351 + {{n_blocks}})
    )

    select
    date_trunc('day', block_timestamp) as date,
    iff(block_number < 15537351, 'before', 'after') as category,
    concat(platform,'::',category) as type,
    count(distinct origin_from_address) as n_users,
    count(distinct tx_hash) as tx_frequency,
    sum(n_users) over (partition by type order by date asc rows between unbounded preceding and current row) as cum_n_users,
    sum(tx_frequency) over (partition by type order by date asc rows between unbounded preceding and current row) as cum_tx_frequency
    from txns
    group by date, category, type
    Run a query to Download Data