CryptoIcicleFlash Bounty: Post Merge Behavior - Swaps
    Updated 2022-09-24
    -- Flash Bounty: Post Merge Behavior
    -- 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
    -- The merge has occurred. How have users responded in days that followed?
    -- Analyze any notable trends or outliers you can see since ETH switched to POS.
    -- Compare this to user behavior in the days and weeks leading up.
    -- What major changes can you see?

    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, '1.before-merge', '2.after-merge') 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, type
    Run a query to Download Data