SDI.
All Crypto Terms
TransactionEIP-1559base feepriority feegas limitfee marketburning

Gas Mechanism

Gas is Ethereum's unit of computational work — every EVM operation costs a fixed amount of gas, and users pay for gas using ETH through a dual fee mechanism (EIP-1559) where a base fee is burned and a priority fee tips the validator.

Gas serves two purposes: metering (preventing infinite loops and DoS attacks by capping computation) and pricing (creating a fee market for block space). Each EVM opcode has a fixed gas cost (ADD = 3, SSTORE = 20,000 for cold storage). EIP-1559 split fees into: a base fee that adjusts algorithmically to target 50% block utilization (burned, making ETH deflationary) and a priority fee (tip to validators for inclusion priority). The block gas limit is 30M gas (target 15M). A simple ETH transfer costs 21,000 gas. At 30 gwei base fee + 2 gwei priority fee, that transfer costs ~0.000672 ETH. Gas refunds exist for clearing storage (SSTORE to zero) but are capped at 20% of total gas used.

Tradeoffs

Strengths

  • Solves the halting problem economically without restricting language expressiveness
  • EIP-1559 provides predictable fee estimation and ETH burning
  • Cold/warm distinction accurately reflects underlying I/O costs
  • Separate blob gas market reduces L2 costs without competing with L1 execution

Weaknesses

  • Failed transactions still consume gas, punishing users for estimation errors
  • Gas costs for some operations do not perfectly reflect hardware costs
  • Complex optimization techniques create a barrier to entry for developers
  • Gas limits constrain block capacity, limiting L1 throughput

Likely Follow-Up Questions

  • How does the EIP-1559 base fee adjustment algorithm prevent fee manipulation?
  • Why are gas refunds capped at 20% of total gas used?
  • What are gas tokens and why were they problematic?
  • How does cold vs warm storage access affect gas costs?
  • Explain the relationship between block gas limit and network throughput.
  • How did EIP-4844 change the gas economics for Layer-2 rollups?

Source: editorial — Synthesized from Ethereum Yellow Paper, EIP-1559, EIP-2929, EIP-3529, and EIP-4844

Command Palette

Search for a command to run...