Every Ethereum transaction pays gas. The number you see in your wallet — 30 gwei, 50 gwei — is a compressed summary of a mechanism that has three moving parts, was rebuilt from the ground up in 2021, and is the single biggest driver of user experience on the network. Understanding what happens between "I click send" and "the transaction lands in a block" is the shortest way to stop overpaying.
What gas actually measures
Gas is a unit of computational work. Every operation the Ethereum Virtual Machine performs — reading storage, writing storage, executing arithmetic, calling another contract — costs a specific number of gas units, defined by the protocol. A simple ETH transfer costs 21,000 gas. A complex DeFi swap can cost 200,000-400,000 gas. Deploying a new contract can cost millions.
Gas units are unrelated to price. Gas price is what you pay per unit of gas, denominated in gwei (a billionth of ETH). The total fee is gas_used × gas_price, paid in ETH.
The block gas limit — currently around 30 million gas per block — caps how much total work fits in a single block. When user demand exceeds that cap, transactions compete on gas price to be included.
Before EIP-1559: the auction era
Before August 2021, Ethereum ran a simple first-price auction. You bid a gas price, and if your bid was high enough to get you into the next block, you paid exactly what you bid. Wallets guessed the winning price by looking at recent blocks and adding a small premium.
This mechanism worked but was hostile to users. Small mistakes could cost dollars. Overbidding was rewarded; underbidding meant your transaction stalled indefinitely. Fee volatility was extreme because there was no equilibrium mechanism — a block full at 100 gwei was followed by a block available at 20 gwei with no correction.
After EIP-1559: base fee + priority fee
EIP-1559, activated in the London hard fork of August 2021, restructured the auction into two parts:
**Base fee** — a per-block price set by the protocol based on how full the previous block was. If the previous block was more than 50% full (over 15M gas), the base fee ticks up. If less than 50% full, it ticks down. The adjustment is capped at 12.5% per block, so base fee moves smoothly, not discontinuously. The base fee is burned — destroyed from circulation — not paid to any validator.
**Priority fee (tip)** — an amount the user offers as a bonus to validators for including their transaction. Validators sort by priority fee within a block, but the base fee is a hard floor: no transaction below current base fee gets included.
Total gas price you pay = base fee + priority fee. Your wallet sums the two and shows you the total.
The consequence: fee estimation became far more accurate. Base fee is a known input at the moment you send (visible on any block explorer or wallet). Priority fee needs to be modest — 1-2 gwei is often enough to land in the next block during normal congestion.
The refund mechanism
EIP-1559 also introduced a max-fee-per-gas ceiling. When you sign a transaction, you specify:
- **maxFeePerGas** — the absolute maximum you'll pay per gas unit
- **maxPriorityFeePerGas** — the maximum you'll tip
You pay the actual base fee plus your priority fee, up to your max. If the base fee is lower than your max at inclusion time, you keep the difference — no more overpaying just because you were nervous about being outbid.
This is why wallets often show a "max fee" that seems much higher than the "estimated fee" — you're not going to pay the max unless the base fee spikes between broadcast and inclusion. You're just authorizing that ceiling.
Where the money goes
The base fee is burned. Since EIP-1559 activated, tens of millions of ETH have been permanently removed from supply via base-fee burn — a deflationary pressure that, combined with post-Merge staking issuance being lower than PoW mining issuance, has made ETH net-deflationary in most months since 2022.
The priority fee goes to the validator (miner, pre-Merge) who included your transaction. This is their compensation for choosing your transaction over others in the same block. Validators also earn staking rewards separately.
For MEV searchers and block builders, the priority fee is where most of the game is played. During complex arbitrage or liquidation opportunities, priority fees can reach thousands of gwei — orders of magnitude above the norm — because the transaction extracts enough value to justify overpaying dramatically to be first.
Setting fees intelligently
For everyday user transactions:
- **Casual, not urgent**: set priority fee at 1 gwei. Your transaction lands within a few blocks (30-60 seconds).
- **Standard**: 1-2 gwei priority fee. Reliable next-block inclusion during normal conditions.
- **Time-sensitive** (auction, mint, liquidation defense): 5-20+ gwei priority fee. Buys you certainty even during moderate congestion.
- **MEV territory** (backrun opportunity, arbitrage): whatever it takes. Priority fees can be thousands of gwei here.
Wallet defaults are usually reasonable but conservative. If you're doing something normal (send, swap, approve), watch the base fee and set the priority fee just slightly above what the wallet suggests. Overpaying by 5 gwei on a 100,000-gas transaction is 500,000 gwei = 0.0005 ETH — a few cents. Not worth optimizing further.
Layer 2s: same primitives, different scale
Layer 2 rollups (Arbitrum, Optimism, Base, zkSync, and others) have their own gas markets, denominated in their own gas units and gwei on the L2. The L2 fee also includes an implicit L1 data cost — every L2 transaction ultimately posts a small amount of data to L1, and that cost is passed through.
L2 fees are typically 10-100x cheaper than L1 for the same operation, because the L2 handles execution locally and only pays L1 for data availability. The exact ratio depends on the L2's efficiency and current L1 base fee.
Post-EIP-4844 (blob transactions, activated March 2024), L2 data costs dropped dramatically. This is why L2 fees fell 10x in early 2024 and have stayed low. The blob mechanism gives L2s a cheaper "data lane" to L1 than they had before.
What breaks the estimator
The main failure mode of fee estimation is fast base-fee spikes. If a big NFT mint or MEV event lands, the base fee can jump 50-100% in a single block. Your wallet's fee estimator, which is showing you a number from a few seconds ago, may be underpriced by the time you actually broadcast.
Modern wallets solve this by setting maxFeePerGas well above the current base fee — 2x to 3x is typical — so your transaction survives a short spike. This is why you should not decrease the wallet's max-fee cap unless you know exactly what you're doing.
The other failure mode is undertipping during MEV wars. If a liquidatable position appears, dozens of bots will bid up priority fees to be first. If you're a regular user trying to send a normal transaction during this window, you may need to bump your priority fee to keep pace, or wait 30 seconds until the war ends.
The one habit worth building
Before every meaningful transaction, look at the current base fee. Any wallet, any explorer, any L2 shows it. Compare to the wallet's suggested priority fee. If the wallet is suggesting something much higher than base-fee + 2 gwei, ask why — usually there's live congestion. If it's much lower, you might wait longer than expected.
Fee awareness is one of those crypto habits that pays for itself within a few transactions. The EIP-1559 mechanism makes it much easier than it used to be — you're no longer bidding blind — but the discipline of checking the base fee remains the difference between paying the market price and paying whatever the wallet decided to guess.




