CryptoIciclePolygon Fees - July 2022
    Updated 2022-07-09
    -- Visualize transaction fees on Polygon since July 1, 2022.

    -- Payout 125 USDC
    -- Grand Prize 2000 USDC
    -- Level Beginner

    -- Visualize transaction fees on Polygon since July 1, 2022.
    -- Compare these to fees on Ethereum over the same time period - are they correlated?
    -- Do they diverge significantly at any points? Provide analysis as to why you think this might be.
    -- We will be giving the top 15 submissions a 125 $USDC payout,
    -- with the best getting the grand prize of 2,000 $USDC and 2nd place taking 1,000 $USDC
    -- Good luck!

    with eth_price as (
    select
    date_trunc('day', hour) as date,
    avg(price) as price
    from ethereum.core.fact_hourly_token_prices
    where symbol = 'WETH' and hour >= '{{start_date}}'
    group by date
    ),
    matic_price as (
    select
    date_trunc('day', hour) as date,
    avg(price) as price
    from ethereum.core.fact_hourly_token_prices
    where symbol = 'MATIC' and hour >= '{{start_date}}'
    group by date
    ),
    eth_txns as (
    select
    t.*,
    coalesce(t.tx_fee * price, 0) as fee_usd
    from ethereum.core.fact_transactions t
    join eth_price p on t.block_timestamp::date = p.date and t.block_timestamp >= '{{start_date}}'
    and t.tx_fee > 0
    Run a query to Download Data