back to top

Gas Consumption Analysis on Dune – Part 1 (Blog)

Fueling “Gas Spells” on Dune – Part 1: Unpacking Fee Mechanics Across Ethereum, BNB Chain and Avalanche

By Thomas Thiery (originally posted on the Dune blog)
Published Mar 4 2026


Overview

The cost of executing transactions on a blockchain—commonly called “gas”—has become a focal point for developers, analysts, and everyday users as network congestion, fee structures, and incentive models evolve. In a recent technical overview, Dune Analytics introduced a series of open‑source “spells” – pre‑written SQL datasets that expose fee‑related data for several major Layer‑1 networks. The first installment surveys three EVM‑compatible chains: Ethereum, BNB Chain (formerly Binance Smart Chain) and Avalanche’s C‑Chain. By standardising fee queries across these ecosystems, the new spells aim to simplify cross‑chain comparisons, illuminate the impact of recent protocol upgrades, and provide a reusable foundation for deeper DeFi analytics.


1. How “Gas” Works on Each Chain

Chain Consensus Model Native Token Fee Calculation (Pre‑upgrade) Key Upgrade(s) Fee Burning & Distribution
Ethereum PoW → PoS (Ethereum 2.0) ETH gas_used × gas_price (all paid to the miner/validator) London hard fork (EIP‑1559, Aug 2021) Base fee is burned; priority tip goes to the block producer
BNB Chain PoA + DPoS (21 elected validators) BNB Same as pre‑EIP‑1559 Ethereum BEP‑95 (Nov 2021, “Bruno” fork) adds 10 % automatic burn of validator rewards 10 % of each fee is burned on‑chain; additional quarterly burns are managed off‑chain
Avalanche C‑Chain Snowman (sub‑sampled voting) AVAX Same as Ethereum pre‑EIP‑1559 Apricot upgrade (Aug 2021) introduces dynamic fees similar to EIP‑1559 Entire fee (base + priority) is burned; validators earn only staking rewards

Key differences:

  • Validator set size – Ethereum’s validator pool now exceeds 400 k, whereas BNB Chain operates with a fixed group of 21 validators, resulting in faster block times (≈3 s) but a higher centralisation risk.
  • Burn mechanisms – Ethereum only burns the base fee, while Avalanche burns the full fee and BNB Chain burns a fixed portion of validator rewards.

2. From Raw Transactions to “Spells”

The Dune team distilled the underlying fee logic into reusable queries, termed spells. Each spell is a SQL script stored in the public “spellbook” repository on GitHub, enabling anyone to query historical fee data without recreating the underlying logic.

Ethereum Spell

  • Pre‑London (Legacy) transactions are identified via the type = 'Legacy' column.
  • Post‑London (Dynamic Fee) transactions appear under type = 'Dynamic Fee'.
  • Queries capture gas usage, base fees, priority tips, and the amount of ETH that is burned per block.

BNB Chain Spell

  • Mirrors the Ethereum legacy formula but also incorporates the BEP‑95 10 % burn.
  • The spell includes a static label table that maps the 21 validator addresses to human‑readable names, leveraging Dune’s new get_labels() function.

Avalanche Spell

  • Uses the dynamic fee model introduced by the Apricot upgrade: a rolling 10‑second gas‑price window and a variable fee cap (75‑255 gwei).
  • Because the whole fee is burned, the spell aggregates both base and priority components into a single burn metric.

All three spells feed into a unified gas.fees view, allowing a single query to pull daily fee totals, burned amounts, and USD‑valued transaction costs across the three networks.


3. Why These Spells Matter

  1. Transparency for Researchers and Traders – By exposing fee data in a ready‑to‑use format, analysts can quickly assess the cost of on‑chain activity, compare fee‑efficiency across networks, and evaluate the effectiveness of protocol upgrades.
  2. Cross‑Chain Benchmarking – The common schema makes it trivial to calculate, for example, the cumulative ETH burned versus BNB burned, or to visualise per‑day average transaction costs in USD.
  3. Incentive Design Insight – Observing how fee‑burn mechanisms alter token supply dynamics helps economists model long‑term scarcity and price impacts.
  4. Community‑Driven Extension – Because spells are open‑source, anyone can fork the repository, add new metrics (e.g., MEV extraction on Ethereum), or adapt the queries for emerging chains.

4. Analytical Highlights

  • Ethereum’s post‑EIP‑1559 era shows a steady uptick in ETH burned, reflecting higher network utilisation and the effectiveness of the base‑fee adjustment algorithm.
  • BNB Chain’s rapid block cadence keeps raw fee amounts low, yet the 10 % burn on validator rewards sustains a measurable reduction in circulating supply.
  • Avalanche’s full‑fee burn creates a direct link between transaction activity and supply contraction, but validators are compensated solely through staking rewards, emphasizing a different security‑economic model.

Cross‑chain visualisations using the aggregated gas.fees view reveal that while Ethereum still dominates total burned value, BNB Chain and Avalanche together contribute a non‑trivial share of network‑wide fee burns, especially during periods of high DeFi activity.


5. Key Takeaways

  • Spells provide a plug‑and‑play layer of fee analytics, removing the need for bespoke SQL work each time a researcher wants to explore gas data.
  • EIP‑1559 and analogous upgrades on BNB Chain and Avalanche demonstrate a clear trend toward predictable fees and built‑in token burns, aligning user experience with supply‑side economics.
  • Validator centralisation vs. decentralisation trade‑offs remain evident: BNB Chain’s limited validator set yields lower fees and fast finality but raises governance concerns.
  • Burn mechanisms differ substantially: Ethereum burns only the base fee, Avalanche burns the entire fee, and BNB Chain burns a fixed percentage of validator rewards, each creating a distinct impact on tokenomics.
  • Cross‑chain fee monitoring is now more accessible, enabling DeFi platforms and investors to factor transaction costs into strategy decisions with greater confidence.

Looking Ahead

The Dune team promises a second installment focusing on Layer‑2 rollups such as Optimism and Arbitrum. By extending the spell framework to these scaling solutions, the community will soon have an even richer toolbox for dissecting fee dynamics across the entire Ethereum ecosystem and beyond.

For developers and data scientists eager to experiment, the spells and accompanying documentation are available in the Dune spellbook repository: https://github.com/duneanalytics/spellbook.


Thomas Thiery – @soispoke



Source: https://dune.com/blog/fueling-gas-spells-1

spot_img

More from this stream

Recomended