Glossary

Gas Fee

The transaction fee paid to network validators for processing and confirming transactions on a blockchain, measured in the network's native currency.

Detailed Explanation

Gas fees compensate validators for the computational resources needed to process transactions. On Ethereum, fees are denominated in gwei (billionths of ETH) and vary based on network congestion. EIP-1559 split fees into a base fee (burned) and a priority tip (paid to validators). During high demand, gas fees can spike from under $1 to over $50 per transaction, making Layer 2 solutions attractive for cost-sensitive operations.

Why It Matters

Gas fees directly impact the usability and economics of blockchain applications. High Ethereum gas fees drove the development of Layer 2 rollups and alternative Layer 1 chains that offer lower costs. Understanding gas helps users time transactions for lower fees, set appropriate limits, and choose between mainnet and L2 networks. Gas optimization is also a critical skill for smart contract developers.

Key Considerations

Always set a reasonable gas limit to avoid failed transactions that still consume fees. Use EIP-1559 gas estimation for more predictable pricing. For non-urgent transactions, setting a lower max fee and waiting for inclusion can save significantly. Never set gas limits too low as the transaction will fail and fees are still charged.

Example

A user wants to swap tokens on Uniswap during high network activity. The base fee is 30 gwei and they add a 2 gwei priority tip. For a swap using 150,000 gas units, the total fee is (30 + 2) x 150,000 = 4,800,000 gwei = 0.0048 ETH, roughly $16 at current prices.

Related Terms

Frequently Asked Questions

What is Gas Fee?

The transaction fee paid to network validators for processing and confirming transactions on a blockchain, measured in the network's native currency.

Why is Gas Fee important in crypto?

Gas fees directly impact the usability and economics of blockchain applications.

Why did my transaction fail but I still paid gas fees?

Gas fees pay for computational work, which occurs regardless of the transaction outcome. If a transaction reverts due to slippage, insufficient token balance, or contract errors, the network still processed the computation and validators deserve compensation for that work.