# Understanding Gas Fees: Why Transactions Cost What They Cost > A deep dive into how gas fees work on Ethereum and L2s, what factors drive prices, and how to minimize your costs. **Published by:** [Onchain Diary](https://paragraph.com/@onchaindiary/) **Published on:** 2026-07-19 **Categories:** security, crypto, onchaindiary **URL:** https://paragraph.com/@onchaindiary/understanding-gas-fees ## Content Why Do Gas Fees Exist? Every action on a blockchain — sending tokens, interacting with a smart contract, minting an NFT — requires computational resources. Gas fees are the mechanism that ensures those resources are compensated and that the network isn't spammed with free transactions. The Anatomy of a Gas Fee A gas fee has two main components: Gas Limit: The maximum amount of gas units you're willing to spend. A simple ETH transfer uses 21,000 gas units. More complex operations (like swapping tokens on a DEX) can use 100,000–300,000+. Gas Price: How much you pay per gas unit, measured in gwei (1 gwei = 0.000000001 ETH). Total Fee = Gas Limit × Gas Price (in gwei) × 0.000000001 ETH/gwei EIP-1559: Base Fee + Priority Fee Since August 2021, Ethereum uses a two-part fee structure: Base Fee: Set by the protocol, adjusts automatically based on network demand. This portion is burned (permanently removed from supply). Priority Fee (Tip): Optional tip to validators to prioritize your transaction. What Drives Gas Prices? Gas prices fluctuate based on simple supply and demand: Block space is limited: Ethereum targets ~15 million gas per block High-demand events: NFT mints, popular token launches, or airdrop claims can spike fees to 100+ gwei Time of day: Fees are typically lower during Asian and European nighttime hours How to Save on Gas Use Layer 2s: Arbitrum, Optimism, and Base offer 10–100x lower fees Time your transactions: Use tools like Gas Now or Etherscan Gas Tracker to find low-fee windows Batch transactions: Some wallets and protocols support batching multiple operations Set appropriate gas limits: Don't overpay by setting unnecessarily high limits Try Our Calculator Use our Gas Fee Calculator to estimate your transaction costs across different networks. Originally published at https://theonchaindiary.com/articles/understanding-gas-fees/. More Web3 security guides and risk-scoring tools at Onchain Diary. ## Publication Information - [Onchain Diary](https://paragraph.com/@onchaindiary/): Publication homepage - [All Posts](https://paragraph.com/@onchaindiary/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@onchaindiary): Subscribe to updates