CryptoIciclestETH/ETH Fluctuation - stETH <> WETH vs Gas Price
    Updated 2022-06-11
    -- stETH/ETH Fluctuation
    -- Payout 150 USDC
    -- Grand Prize 450 USDC
    -- Level Advanced

    -- Analyze the price of stETH in ETH denomination and find meaningful correlations that explain its fluctuation.
    -- Possible correlations could be with ETH’s price in USD, ETH’s gas price, volume in the curve pool,
    -- Curve stETH/ETH pool composition, etc.

    -- Example Txs Swap of ETH to stETH:
    -- https://etherscan.io/tx/0xe7c901ad4228b00ab4f1d336ab7609a258e64c5d4fb31041472d04491b2d7a28
    -- Primary ETH-stETH Contract: https://etherscan.io/address/0xdc24316b9ae028f1497c275eb9192a3ea0f67022

    with
    swaps as (
    select
    amount_out/amount_in as weth_steth_ratio,
    block_timestamp
    from ethereum.core.ez_dex_swaps
    where symbol_in = 'stETH'
    and symbol_out = 'WETH'
    and block_timestamp >= {{date_start}}
    and amount_in > 0.1 -- Filter out small amounts
    ),
    token_price as (
    select
    date_trunc('hour', hour) as date,
    avg(price) as price
    from ethereum.token_prices_hourly
    where token_address = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' -- WETH
    and hour >= '2022-01-01'
    group by date
    ),
    txns as (
    select
    t.gas_used,
    Run a query to Download Data