CryptoCMD CryptoCMD

Gas Fees Explained: Why They Spike and How to Pay Less

Gas is what you pay a blockchain to process your transaction, and once you know how the price is set, you can stop overpaying and stop losing money on transactions that fail.

Priya Nair · · 10 min read
Gas Fees Explained: Why They Spike and How to Pay Less
Photo: RDNE Stock project / Pexels

Key takeaways

  • →Your fee is gas used multiplied by the price per unit of gas, and the price rises when blocks fill up.
  • →A failed transaction still costs you gas, so most of the money people lose to fees goes on transactions that never went through.
  • →Routing through a cheaper network or Layer 2 usually saves far more than timing the main chain.
  • →Always keep a small balance of the network's native coin, because you can't pay gas with anything else.
  • →Never set a custom gas limit below what your wallet suggests unless you know exactly why.

A gas fee is what you pay a blockchain to process your transaction, and the price comes from an auction for limited space in each block. Lots of people want in? Price goes up. Few people? It drops. Nearly every trick for not overpaying grows out of that one fact.

Here's what I'll cover: how fees get calculated on a typical smart-contract chain, why they spike, how to time or route your transactions to pay less, and how to dodge the priciest beginner mistake, which is paying for a transaction that fails.

What gas actually is

Every action on a chain like Ethereum takes computing work. A simple coin transfer takes a little. A token swap on a decentralized exchange takes a lot more, because the network has to run the exchange's code, update balances and check prices. Gas is the unit that measures that work.

Gas measures work. It isn't a currency. You pay for it in the network's native coin, such as ETH on Ethereum, so your fee hinges on two numbers:

  • Gas used: how much work your transaction needs. A plain ETH transfer uses 21,000 gas. A swap might use 100,000 to 200,000 or more, depending on the contract.
  • Gas price: how much you pay per unit of gas. On Ethereum it's quoted in gwei, which is one billionth of an ETH.

Fee = gas used × gas price. That's the whole formula. The rest is detail about how the price gets set.

How the price is set

Ethereum, and the many chains that copy its fee design, split the gas price in two.

The base fee. The protocol sets this on its own. Each block has a target size. If the previous block was more than half full, the base fee rises for the next block, by up to about 12.5%. If it was less than half full, the base fee falls. Nobody bids on it. It just tracks demand, block by block. And it's burned, so it goes to nobody.

The priority fee (the tip). This goes to the validator who includes your transaction. When the network's quiet, a small tip does the job. When it's busy, people raise their tips to get picked first.

When you send, your wallet also sets a max fee: the most you're willing to pay per unit of gas. You pay the actual base fee plus your tip, and anything left under your max is refunded. The max fee protects you if the base fee climbs between the moment you click send and the moment your transaction lands.

You'll also see a gas limit. That's the most gas units your transaction is allowed to consume. Use less, and you're charged only for what it used. Need more than the limit, and it runs out of gas and fails. You still pay for the gas it burned before it stopped.

Bitcoin works differently but follows the same logic. There's no gas. You pay per unit of transaction size (satoshis per virtual byte), and miners pick the highest-paying transactions from the waiting pool, called the mempool. Busy mempool, higher fees.

Why fees spike

Crypto Basics: What Gas Fees Are and How to Avoid Overpaying
Photo: Rafael Minguet Delgado / Pexels

Block space is fixed. Demand isn't. Fees jump when lots of people try to do something urgent at the same moment. The usual suspects:

  • Hyped launches. A popular NFT mint or token launch can bring thousands of people to one contract in the same minute, all raising their tips to get in first.
  • Market crashes and pumps. When prices move hard, traders rush to sell, buy, or add collateral to avoid liquidation. Those people will pay almost anything, and everyone else pays the higher price with them.
  • Airdrop claims. A free token that everyone can claim at a set time causes a short rush of demand.
  • Bots. Arbitrage and trading bots compete for profitable transactions and bid fees up in the process.

During a rush, the base fee can multiply several times over in a few minutes, because it compounds up to 12.5% per block. Then it falls back just as fast once the rush ends. Send at the peak, and you pay the peak price.

Failed transactions: paying for nothing

This one catches most first-time senders. A failed transaction still costs gas. The validator did the work of running your transaction up to the point it broke, and you pay for that work. You get your tokens back. Not the fee.

Common reasons a transaction fails:

  • Out of gas. You or your wallet set the gas limit too low.
  • Slippage exceeded. On a swap, the price moved more than your slippage tolerance allowed before your transaction was processed, so the exchange contract rejected it. This happens a lot during busy periods.
  • Contract conditions. The mint sold out, the sale ended, or you didn't approve the token first.
  • Insufficient balance. You didn't have enough of the token, or enough native coin left to cover the fee.

A failed swap during a fee spike is a double loss. You paid a peak fee, and you didn't get the trade.

Worked example (hypothetical numbers)

These figures are made up to show the math. Real gas prices change all the time.

Say you want to do two things on Ethereum: send ETH to a friend and swap ETH for a token.

ScenarioGas usedBase fee + tipFee
Quiet: simple transfer21,00020 + 2 = 22 gwei462,000 gwei = 0.000462 ETH
Quiet: token swap150,00022 gwei3,300,000 gwei = 0.0033 ETH
Spike: token swap150,000120 + 5 = 125 gwei18,750,000 gwei = 0.01875 ETH
Spike: swap fails on slippage after 60,000 gas60,000125 gwei7,500,000 gwei = 0.0075 ETH, with no swap

The same swap costs more than five times as much during the spike. The failed attempt costs more than twice what the successful swap would have cost on a quiet day, and you still have to pay again to retry. Ouch. Now picture doing the swap on a Layer 2 network, where the same action might cost a small fraction of the quiet-day mainnet fee. That's why routing matters more than timing.

How to pay less

You've got three main options: send at a better time, send on a cheaper network, or send fewer transactions.

Timing. Activity tends to drop when the biggest trading regions are asleep, and often on weekends. That's a tendency, not a rule. One surprise launch can wreck a quiet Sunday. Check a live gas tracker rather than assuming. If your transaction isn't urgent, wait for the base fee to fall.

Routing. This is the biggest saving. Layer 2 networks (rollups built on top of Ethereum) and other low-fee chains process transactions much more cheaply. If the casino, exchange or app you're paying supports a Layer 2 or a cheaper chain for deposits, use it. Many exchanges let you pick the withdrawal network, and the difference can be large.

One warning on routing: the network must match on both ends. Withdraw a token on one network to an address that only watches another, and your funds can land somewhere the recipient can't see. Sometimes they can be recovered. Sometimes they can't.

Fewer transactions. Every action costs a fee, so combine where you can. Move funds once instead of in five small top-ups. And remember the first time you swap a token, you usually need a separate approval transaction, which costs gas too. Plan for it.

Also know what you're actually paying for. When you withdraw from an exchange, the exchange usually charges its own flat withdrawal fee. That isn't live gas, and timing won't change it. Compare withdrawal fees across networks on the withdrawal screen.

Step by step: sending a transaction without overpaying

  1. Confirm the network. Check which network the recipient supports, and make sure the deposit address belongs to that network. Copy the address. Don't type it.
  2. Pick the cheapest supported option. If both a Layer 2 and the main chain are supported, choose the Layer 2 unless you have a reason not to.
  3. Check your native coin balance. Make sure you hold enough of the network's own coin to cover the fee, with some spare. You can't pay gas in USDT or any other token.
  4. Look at a gas tracker. If fees are clearly elevated and you're not in a hurry, wait and check again later.
  5. Use the wallet's suggested settings. Pick the standard speed. Don't lower the gas limit. If you set a custom max fee, set it high enough to absorb a few blocks of base-fee rises. Unused amounts are refunded.
  6. For swaps, set sensible slippage. Too tight and the swap fails during volatility. Too loose and you get a worse price. For major, liquid pairs, a low single-digit percentage is typical.
  7. Send a small test first if it's a new address or a large amount. One extra fee is cheap insurance.
  8. Watch the transaction on a block explorer. Paste the transaction hash and confirm it succeeded, not just that it was submitted.
  9. If it's stuck, use speed up or cancel. Most wallets let you replace a pending transaction with a higher-fee version. Don't send a second, separate transaction to fix it. That can queue up behind the first one.

Common mistakes

  • Holding zero native coin. You've got tokens in your wallet but can't move them, because there's no ETH (or equivalent) to pay gas. Always keep a buffer.
  • Lowering the gas limit to save money. It doesn't save anything. Unused gas is already refunded. A too-low limit just makes the transaction fail, and you pay for the attempt.
  • Panic-trading during a spike. Rushing a swap during a crash means peak fees plus a high chance of slippage failure. Decide in advance whether the trade is worth a peak fee.
  • Spamming retries. Each failed retry costs gas. Find out why it failed on the block explorer before you try again.
  • Ignoring the fee-to-amount ratio. Paying a mainnet swap fee to move a small amount can eat a big percentage of what you're moving. On small amounts, cheap networks matter most.
  • Wrong-network withdrawals. Picking the cheapest network on an exchange without checking that the destination supports it.
  • Approving unlimited spending without thinking. Unlimited approvals save gas on future swaps, but they leave a contract able to move that token later. For apps you won't use again, approve only what you need.

FAQ

Why did I pay a fee when my transaction failed?

The network ran your transaction up to the point it failed, and that work costs gas whether the result was success or failure. Your tokens stay put, but the fee for the computation is spent. Check the block explorer for the failure reason, usually out of gas or slippage, and fix that before retrying.

Can I get a refund on gas?

Only the unused part. If your max fee was higher than what the network actually charged, or your gas limit was higher than the gas used, the difference never leaves your wallet. Gas that was actually consumed is gone, including on failed transactions.

Is a higher tip always faster?

Up to a point. A higher tip gets you picked ahead of lower bidders, but once you're competitive for the next block, extra tip does nothing. During a hyped launch, though, the people outbidding you are often bots. You have to decide whether getting in is worth paying their price.

That last question is the one most people skip. The cheapest gas fee is often the one you don't pay because you decided the transaction could wait, or didn't need to happen on that network at all.

Keep learning