Elementary

Gas & Fees

Elementary Track 03

Why Are Fees Necessary?

Ethereum is a Turing-complete computer. Without fees, anyone could run infinite loops and halt the network. Gas is the economic defense mechanism that solves this problem.

What You'll Learn

  • The role of gas and how fees are calculated (gas used × gas price)
  • EIP-1559's automatic base fee adjustment and ETH burn mechanism
  • Practical gas optimization: storage caching, events, and more
🚨 Ethereum Without Gas
Infinite loops run freely
Spam transactions billions of them
Network halted

Without execution cost, DoS attacks are free.

🛡
DoS Defense
Charging computation cost economically blocks spam and infinite loops
💰
Miner/Validator Incentive
Fees (the tip portion) are paid to the validator who produced the block
🔥
ETH Burn (EIP-1559)
The base fee is burned, creating deflationary pressure on ETH supply