cybergenlab[Supply Overview] Solution Circulating supply
    Updated 2024-11-16
    with eth_burn as (
    select
    block_number,
    block_timestamp,
    (gas_used) as total_gas,
    block_header_json:"baseFeePerGas" AS fees,
    (total_gas*fees/1e18) as total_fees_burnt
    from ethereum.core.fact_blocks
    where block_number >=15537394 -- block right after the merge
    ),

    eth_burnt_daily as (
    select
    block_timestamp::date as date,
    sum(total_fees_burnt) as eth_burnt
    from eth_burn
    group by date
    )

    , validators as (
    select
    slot_number,
    sum(effective_balance)/32 as nb_validators
    from ethereum.beacon_chain.fact_validators
    where validator_status='active_ongoing'
    group by 1
    )

    , daily_eth_issue as
    (
    select
    --issue.slot_number,
    fb.slot_timestamp::date as date,
    940.8659/365 * sqrt(nb_validators) as average_issue
    from ethereum.beacon_chain.fact_blocks fb
    join validators val
    QueryRunArchived: QueryRun has been archived