CryptoIciclePolygon Block Performance - Polygon
    Updated 2022-07-23
    -- Polygon Block Performance
    -- What is the average time between blocks on Polygon?

    -- Payout 75 USDC
    -- Grand Prize 225 USDC
    -- Payout Network Ethereum
    -- Level Beginner

    -- What is the average time between blocks on Polygon?

    -- What was the maximum and minimum recorded time between two blocks?
    -- How many transactions are done in a block on average?
    -- How do these numbers compare to L1 such as Flow or Solana, or other L2 such as Arbitrum or Optimism?

    with tpb as (
    select
    min(n_txns_block) as min_tpb,
    avg(n_txns_block) as avg_tpb,
    max(n_txns_block) as max_tpb,
    min(diff_sec) as min_diff,
    avg(diff_sec) as avg_diff,
    max(diff_sec) as max_diff
    from(
    select
    block_timestamp,
    block_number,
    count(distinct tx_hash) as n_txns_block,
    datediff('second', lag(block_timestamp,1) ignore nulls over (order by block_timestamp asc), block_timestamp) as diff_sec
    from polygon.core.fact_transactions
    where block_timestamp >= CURRENT_DATE - {{n_days}}
    group by 1, 2
    )
    )

    select * from tpb

    Run a query to Download Data