Understanding Gas Fees on Ethereum
What gas fees are, why they exist, and what makes them rise and fall.
Jump to section
What to remember
- Gas measures the computational work a transaction requires.
- Gas fees compensate the network and limit excessive computational load.
- Fees rise with network demand and transaction complexity.
- A failed transaction can still consume gas.
What gas measures
"Gas" is Ethereum's unit for measuring the computational work required to process a transaction or execute a smart contract. More complex operations (like interacting with a DeFi protocol) require more gas than a simple transfer.
Why gas fees exist
Gas fees compensate the network for the computational resources a transaction consumes, and they also act as a practical limit on how much work can be processed, protecting the network from being overwhelmed by excessively complex or intentionally wasteful transactions.
What makes gas prices rise and fall
- Network demand: more people trying to transact at once increases competition for limited block space.
- Transaction complexity: interacting with a complex smart contract typically costs more gas than a simple transfer.
- Network upgrades and Layer 2 adoption can meaningfully change typical fee levels over time.
A failed transaction can still cost gas
If a transaction runs but ultimately fails (for example, due to a smart contract condition not being met), gas already consumed up to that point is typically still charged, since computational work was still performed.
What to remember
- Gas measures the computational work a transaction requires.
- Gas fees compensate the network and limit excessive computational load.
- Fees rise with network demand and transaction complexity.
- A failed transaction can still consume gas.
Part of these learning paths
Related concepts
Network Fees vs. Economic Throughput
Read the article
Comparing Stablecoin Transaction Costs Across Networks
Read the article
Gwei
Read the Gwei glossary definition
Calldata
Read the Calldata glossary definition
Opcode
Read the Opcode glossary definition
Base Fee
Read the Base Fee glossary definition
Priority Fee
Read the Priority Fee glossary definition
Gas Cost Calculator
Open the calculator
Why Did My Transaction Fail or Get Stuck?
Read the full guide
Protecting Your Transactions from MEV
Read the article