What is gas, and why do fees move the way they do
Gas is the unit Ethereum uses to price computation. Here is how the market works, why fees swing from 8 to 800 gwei, and what to read on a block explorer.
On 1 May 2022, the Yuga Labs Otherdeed mint pushed Ethereum’s median gas price to 1,943 gwei for several blocks, briefly turning a routine ERC-721 transfer into a $3,300 charge. Three years later, on 2 March 2024, the same network was settling roughly 1.1 million transactions per day at an average base fee of 21 gwei. By the time the Pectra upgrade shipped in May 2025 and rollup blob throughput tripled, mainnet base fees were averaging single digits for hours at a stretch. Gas is the most misunderstood number in crypto: traders track it like a stock chart, builders treat it like a tax, and almost no one reads what it actually measures. This explainer fixes that, with citations to the specs that define every term.
What is at stake is not academic. Every wallet swap, every NFT mint, every DeFi liquidation, and every bridge withdrawal pays gas in some form. The way that fee is calculated changed dramatically with EIP-1559 in August 2021 and again with EIP-4844 in March 2024. Understanding gas is the difference between paying $1.10 for a Uniswap trade and watching the same trade fail at $47 because the priority fee was set by a wallet’s default slider. If you are routing through our gas dashboard or the on-chain calculators, the rest of this article is the missing manual.
Gas is not a fee. Gas is a unit of work
Before this distinction is clear, every conversation about Ethereum fees ends up confused. Gas is a measure of computational effort, defined in the Ethereum Yellow Paper, Appendix G. A plain ETH transfer costs 21,000 gas. An ERC-20 transfer between two addresses that already hold the token costs roughly 51,000 gas. A Uniswap v3 swap with a single hop sits between 120,000 and 180,000 gas, depending on whether the pool is touched for the first time in that block.
The price you pay per unit of gas is denominated in gwei, where 1 gwei equals 10^-9 ETH. Your final fee in ETH is the product: gas_used × gas_price. This separation matters because the gas cost of an opcode is fixed by the protocol, while the gas price is set by an auction every twelve seconds. When you hear "gas is high," what is actually high is the gwei the network is charging per unit, not the work your transaction requires.
The EIP-1559 base fee and the priority tip
Before the London hard fork at block 12,965,000 in August 2021, every transaction was a sealed-bid first-price auction. Wallets guessed, miners cherry-picked, and users overpaid systematically. EIP-1559, authored by Vitalik Buterin, Eric Conner, Rick Dudley, Matthew Slipper, Ian Norden, and Abdelhamid Bakhta, replaced that with a two-part fee: a base fee that is algorithmically set by the previous block’s fullness, and a priority fee (the "tip") that you pay validators directly. The base fee is burned, not paid out. You can see live burn totals on Etherscan’s burn chart.
The base fee adjusts by up to 12.5% per block. If the previous block was more than 50% full (above the 15 million gas target), the next base fee goes up; if it was below 50%, it goes down. This is why gas can quintuple in under a minute during a popular mint and decay to background levels in roughly twenty blocks. The Blocknative gas estimator exposes this curve in real time, and Etherscan’s gas tracker aggregates the priority tip distribution per block.
A practical reference table of common operations
| Operation | Typical gas used | Cost at 20 gwei | Cost at 200 gwei |
|---|---|---|---|
| Plain ETH transfer | 21,000 | $1.05 | $10.50 |
| ERC-20 token transfer | 51,000 | $2.55 | $25.50 |
| Uniswap v3 single-hop swap | 150,000 | $7.50 | $75.00 |
| Uniswap v3 multi-hop swap | 260,000 | $13.00 | $130.00 |
| NFT mint (simple ERC-721) | 110,000 | $5.50 | $55.00 |
| Aave v3 deposit + collateral toggle | 290,000 | $14.50 | $145.00 |
| Safe multisig deployment | 320,000 | $16.00 | $160.00 |
The takeaway from this table is that the cost differences between operations are large enough that you should always check the gas estimate before signing. Most wallets show an estimate, but very few show the gas limit separately from the gas price, which is where users end up overpaying. The limit is the ceiling you authorise; the price is what you bid. A failed transaction still consumes the gas it used before reverting, which is why setting a sane limit matters.
Why fees swing — congestion, MEV, and blob math
Three forces move gas. The first is plain congestion: a hot mint or a token launch fills blocks, the base fee climbs by 12.5% each time, and within ten blocks the price is doubled. The second is MEV competition. Searchers running arbitrage and liquidation bots will bid priority fees of 50 to 300 gwei to be first in a block, which raises the effective floor for everyone behind them. The Flashbots documentation describes the auction mechanics in detail. Looking at mevboost.pics on a busy day shows blocks where the top bundle paid more in tips than every other transaction combined.
The third force is rollup demand, which since EIP-4844 has been routed through a separate fee market called blob gas. A blob is a 128 KB chunk of data that Layer-2 rollups post to mainnet to inherit Ethereum security. Each blob costs a base fee in gwei per blob-byte, with a target of three blobs per block and a max of six. When Arbitrum, Base, and Optimism are all batching, blob fees rise independently of normal gas, and rollup users feel that spike before mainnet users do. Etherscan’s blob page tracks the live blob market.
How to read a transaction on a block explorer
Pull any transaction on Etherscan and four fields tell you everything: Gas Limit (the ceiling you set), Gas Used by Transaction (what was actually consumed), Gas Price (the effective price you paid), and the breakdown into Base + Max Priority Fee per Gas. The ratio of used-to-limit tells you whether your wallet overshot. If you set a limit of 300,000 for a 51,000-gas ERC-20 transfer, you are not wasting ETH (unused gas refunds), but you are reserving block space the network reprices around.
- Status: Success or Reverted. A revert still costs the gas burned up to the failing opcode.
- Transaction Fee: gas_used × gas_price, in ETH and USD at block time.
- Burnt Fees: base_fee × gas_used, sent to address zero forever.
- Txn Savings Fees: when EIP-1559 wallets set a Max Fee above the realised base, the difference is refunded.
Timing your transactions — the patterns that actually hold
Long-run data on YCharts and Dune’s gas dashboards show that Ethereum mainnet fees are statistically lowest between 04:00 and 09:00 UTC on Saturdays and Sundays, when US institutional flow and European working hours are both quiet. Asian session opens around 23:00 UTC reliably bring a small spike. Token unlock dates, found on our events calendar, almost always raise gas the hour before and the hour after the unlock vests, because market makers rebalance.
For ordinary users, the rule that has held since 1559 shipped is: set Max Fee to roughly 2× the current base fee, and set Max Priority Fee to 1 gwei unless you are bidding into an active mint. The wallet returns any unused base. Bidding 30 gwei priority on an idle block does not get your transaction included faster than bidding 1; it just pays validators more for no reason.
What about Layer-2 gas?
Rollup gas is structurally cheaper because the execution happens off-chain and only the proof or the compressed data is posted to mainnet via blobs. As of March 2026, a Uniswap swap on Base costs roughly $0.04, on Arbitrum about $0.05, and on Optimism around $0.06 at idle mainnet conditions. Those numbers float with both the L2’s own sequencer fee and the underlying blob market. The l2fees.info dashboard publishes a live comparison, and our market page charts the weekly average alongside ETH price.
What gas does not measure is worth saying plainly. Gas does not measure security, decentralisation, or correctness. A failed mint that burns $300 in gas does not get you the NFT. A successful swap at low gas can still route through a malicious pool and lose 30%. Gas is a price signal for block space, nothing more. Treat it as such, read the four fields on the explorer, and most fee surprises stop happening.
Gas refunds and the EIP-3529 reform
One last piece of the gas mechanism that frequently surprises users is the refund system. Originally, certain opcodes — particularly SSTORE when clearing a storage slot and SELFDESTRUCT — gave back gas to the caller, sometimes up to half the transaction total. This was abused for years through "gas tokens" like GST2 and CHI, which let users pre-pay storage at low gas times and redeem the refund during high-fee windows. EIP-3529, shipped alongside 1559 in the London fork, cut these refunds dramatically: the maximum refund per transaction is now 20% of gas used, and the SELFDESTRUCT refund was removed entirely. Gas-token arbitrage stopped working overnight, and effective gas usage estimates from wallets became dramatically more accurate.
Why this matters: if you ever see a Dune query or block-explorer breakdown showing a transaction’s "effective gas price" lower than the realised base, it is almost always the refund mechanism at work. The contract design pattern of using one big SSTORE clearance at the end of a transaction to recover gas is still legal, just capped. For ordinary users, this is invisible. For protocol developers and arbitrage bots, EIP-3529 changed the calculus of contract design and is the reason modern DeFi contracts pack state more aggressively than 2020-era ones.
When transactions get stuck — replacement and acceleration
If you submit a transaction with a gas price below the next several base fees, it will sit in the mempool unconfirmed, sometimes for hours. The fix is a replacement transaction: send a new transaction from the same address with the same nonce, a higher tip, and a higher maxFee. Validators take whichever pays more. Most wallets — MetaMask, Rabby, Frame — expose this as a "speed up" or "cancel" button. MetaMask’s transaction docs describe the workflow, and the EIP-1559 standard requires the new tip be at least 10% higher than the original to discourage trivial-replacement DoS.
If you don’t have your wallet handy, a third-party service like Flashbots Protect can re-broadcast a stuck transaction or its replacement directly to block builders, bypassing the public mempool entirely. This is also the cleanest way to avoid front-running on time-sensitive trades. The same private-mempool services that help you here are, on the other side of the trade, what searchers use to bid into MEV opportunities — the two ends of the same plumbing.