What is a gas fee How crypto transaction costs work

What is a gas fee? How crypto transaction costs work

User avatar placeholder
Written by NodeScribe

16 October 2026

What is a gas fee? It’s the charge you pay a blockchain network, most often Ethereum, to process a transaction or run a smart contract, and it applies whether you send crypto, swap tokens, or mint an NFT. The amount depends on how much computing work your action needs and how busy the network is at that moment, so the same transfer can cost cents or dollars.

What is a gas fee?

A gas fee is the payment you make to a blockchain network for processing a transaction or running a smart contract. In everyday crypto talk, “gas fees” almost always means the cost of getting something done on Ethereum, where you pay in ETH (ether), the network’s native currency, and prices are quoted in gwei.

“Gas” itself is the unit that measures how much computational work an on-chain action uses. Every action that touches the chain uses some of it. Sending crypto, swapping tokens, minting an NFT, using a dApp, and even casting a vote in a DAO all carry a fee. Your total is the amount of gas your action consumes multiplied by the price of gas when you send it.

If you’ve ever paid a bank transaction fee, the idea will feel familiar. The difference is who sets the level. A bank decides its own fees, while on Ethereum the network’s own demand pushes the price up or down.

Ethereum needs this metering because it’s a smart contract chain, not just a ledger of who owns what. A transaction can carry instructions for the Ethereum Virtual Machine (EVM) to execute, and heavier instructions take longer to run and consume more gas. A simple payment and a complex DeFi trade go through the same machine, but they don’t cost the same.

The name comes from a fuel analogy: transactions need gas the way cars need gasoline. That’s where the comparison ends. Gas fees have nothing to do with liquid fuel, and the term doesn’t refer to the environmental effects of mining.

Why do blockchains charge gas fees?

Blockchains charge gas fees to block spam, pay the people who keep the network running, and ration limited computing space. On Ethereum, no single party sets the price: not the developers, not the validators, not project leadership. Network traffic does, which is why fees drop when activity is light.

Why do blockchains charge gas fees?
Why do blockchains charge gas fees?

Spam defense comes first. Every EVM instruction carries a gas charge, so anyone trying to flood the network with heavy transactions drains their own funds doing it. A network without fees would be open to denial-of-service attacks and could become unresponsive or extremely expensive to use.

Overload doesn’t have to come from attackers, either. Genuine users rushing in at once can jam the network too, and rising gas prices are what discourage more load until things calm down.

Gas also protects the network from runaway code. Every transaction has a gas limit, so a smart contract stuck in an infinite loop gets halted once it hits that limit instead of running forever. The sender still pays the full fee in that case, because the network did the work.

Someone has to do that work, and a decentralized network can’t hire staff to run servers. Fees reward the nodes that verify transactions instead. Under Proof of Work, miners collected Ethereum’s gas fees. Since Ethereum switched to Proof of Stake, validators are selected to propose and attest to blocks, and they receive the tip portion of each fee, while the base portion is burned.

Gas is also a rationing tool. Putting a price on each operation decides how limited computational space gets shared out. Smart contract chains handle this pressure differently: some block frequent transactors or cap the number of instructions per transaction, while Ethereum keeps accepting transactions under heavy load and simply charges more gas for them.

How is a gas fee calculated?

The core formula is gas used × gas price. Gas used depends on what your transaction does, and the gas price is the market rate for block space at that moment.

Ethereum’s London upgrade, which activated EIP-1559 in August 2021, split the gas price into two parts: a base fee and a priority fee. The formula now reads:

Gas fee = units of gas used × (base fee + priority fee)

You pay the result in the network’s native token, which is ETH on Ethereum. In practice, you rarely do this math yourself. Your wallet estimates both parts of the fee before you sign, and the number it shows is a ballpark figure rather than a fixed quote.

Why a token swap costs more gas than an ETH transfer

Different operations cost different amounts of gas because they use different resources. Writing data on chain, reading from disk, and using memory each carry their own price.

With a plain ETH transfer, the network only updates two balances, yours and the recipient’s, which makes it about as light as a transaction gets, and Ethereum’s protocol rules fix its cost at 21,000 gas.

A token swap does much more. Your transaction calls a pool contract, which checks its reserves, computes how many tokens you get back, updates its own accounting, and moves two tokens. A typical swap uses 5 to 10 times the gas of a plain ETH transfer, depending on how many pools it touches.

Routed swaps push that higher. When a swap passes through several pools in one transaction, the same work repeats for each pool. Good route optimizers weigh the gas of touching an extra pool against the better rate it adds, and they skip pools that don’t pay for themselves.

The same logic explains why DeFi trading, lending, and NFT minting cost more than a simple wallet-to-wallet send. At the far end, a bet on Augur could use up to 1,000,000 gas.

What is gwei?

Gwei is a denomination of ether used to quote gas prices, and 1 gwei equals 0.000000001 ETH (10^-9 ETH). Quoting fees in gwei lets you read and set prices without counting zeros in long decimal fractions of ETH.

What is gwei?
What is gwei?

The name is short for giga-wei, and you’ll also see it called nanoether or nanoeth. Wei is the smallest unit of ETH, named after Wei Dai, the cryptographer and cypherpunk. Wallets and block explorers show gas prices in gwei, so it’s the unit you’ll run into whenever you check a fee.

Here’s how the conversion works. A gas price of 20 gwei means 0.00000002 ETH per unit of gas. At that price, a plain 21,000-gas ETH transfer costs 420,000 gwei, or 0.00042 ETH.

Base fee vs. priority fee after EIP-1559

EIP-1559, part of Ethereum’s London upgrade, replaced the old single bid price with a two-part fee. Each part is set differently and ends up in a different place.

Base fee Priority fee
Set by Ethereum protocol, based on block fullness You or your wallet
Where it goes Burned The validator or block builder that includes your transaction
Maximum change 12.5% from one block to the next No protocol cap; the sender chooses the amount
Required? Mandatory Optional

The base fee is a protocol-set minimum, not a market quote. Ethereum computes it from how full the previous block was compared with a target. When you pay it, that ETH is destroyed, which permanently removes it from supply. So not all of your fee goes to validators, even though plenty of older explanations still say it does. The 12.5% limit on each block’s change means costs rise smoothly during congestion instead of spiking unpredictably.

The priority fee is a tip to the validator or block builder that includes your transaction. Validators keep these tips and favor transactions that pay larger tips per unit of gas, so a higher tip buys earlier inclusion when blocks are running full.

Together, the two parts make fees more predictable than the earlier single-price auction, where every sender had to guess what everyone else was bidding.

Gas limit, max fee, and refunds

Two settings put a ceiling on what you can be charged, and they behave very differently when something goes wrong.

The gas limit is the maximum computational work you agree to pay for. It has to exceed the minimum gas your transaction type requires, so a plain ETH transfer can’t go out with a limit under 21,000. If you set the limit below what the transaction actually needs, it runs out of gas and fails, and you’re still charged for the gas up to the limit. That gas isn’t returned, because validators did the work even though the result was thrown out. When a transaction finishes under its limit, you get the unused difference back.

The max fee is your ceiling on price per unit of gas. The price you actually pay is the base fee plus your priority fee, capped at that max fee. If you set the max fee too low for current conditions, the transaction stays pending until a block comes along where the price fits under your ceiling.

That’s the distinction to remember: a gas limit that’s too low costs you money on a failed transaction, while a max fee that’s too low only costs you time. Setting a custom gas limit also doesn’t guarantee the transaction will execute, so if you’re unsure, let the wallet’s estimate stand.

Gas fee example in ETH and dollars

The same computation can cost wildly different amounts depending on the network gas price when you send it. Here’s a swap that uses 200,000 gas, with ETH priced at $3,000:

Gas price Cost in gwei Cost in ETH Cost in dollars (ETH at $3,000)
1 gwei 200,000 gwei 0.0002 ETH About $0.60
20 gwei 4,000,000 gwei 0.004 ETH $12
200 gwei (2021 peak) 40,000,000 gwei 0.04 ETH $120

The swap does exactly the same work in every row. Only the price of block space changes, and the gap between the first and last rows is 200 times. That’s why gas fees behave like a market rather than a fixed charge.

The dollar figure also moves with the ETH price, separately from gwei. If ETH doubled while the gas price held at 20 gwei, the same swap would cost $24 instead of $12.

To run the numbers for your own transaction, multiply gas used by the gas price in gwei, divide by 1,000,000,000 to convert to ETH, then multiply by the current ETH price.

Why gas fees go up and down

Ethereum blocks have limited space, and that space goes to whoever pays for it. A cap on how much gas each block can hold puts an upper limit on how many transactions the network can process in a day, with a new block arriving about every 12 seconds.

Why gas fees go up and down
Why gas fees go up and down

How block space gets priced

Each new block works like a recurring auction: users bid per unit of gas to get included. When demand jumps, the base fee climbs with every full block, and those increases compound fast. Six consecutive full blocks, a bit over a minute, are enough to double the base fee.

This is congestion pricing by design. It sorts out who goes first and discourages more people from piling on. The ramp follows rules, too. Increases start only once blocks fill past a usage target, they rise at a limited rate, and the fee eases back down once demand cools, unless the crowd returns.

What causes spikes

Most spikes trace back to an event, such as an NFT drop, a DeFi surge, or a popular launch that pulls a crowd onto the network at once. The Yuga Labs Otherside NFT drop in 2022 pushed the average Ethereum gas fee to $440 per transaction, while at the 2021 peak, a single swap could cost $50 or more.

Gas wars make those moments worse. Users outbid each other with priority fees to get the fastest confirmation, which lifts the average fee for everyone else. Complex transactions get hit hardest, because they compete for the same limited space while needing more of it.

A few other forces move prices outside of big events:

  • Protocol changes: EIP-2929 raised gas costs for certain storage operations, so a contract call that touches storage can cost more gas than it did before the change.
  • Spam attacks or malicious activity: a flood of junk transactions can inflate gas prices temporarily until the load clears.
  • ETH’s market price: it doesn’t change the gwei fee, but it shifts what that same fee is worth in dollars.

Why mainnet fees have been lower lately

The Dencun and Pectra upgrades moved most retail activity onto cheaper layer 2 networks, which pulled Ethereum mainnet averages down. According to YCharts, the average Ethereum gas price ran about 1 gwei through 2025 and 2026. A typical mainnet transaction in 2025 cost roughly $0.10 to $0.30. Spikes can still happen when demand returns, so a low average doesn’t promise a cheap fee at the exact moment you send.

Are gas fees unique to Ethereum?

No. Every blockchain charges something to process transfers, but the base fee and priority fee model is specific to Ethereum. Older chains such as Bitcoin and Litecoin charge for the same purpose, with similar mechanics, under the name “transaction fees.”

Ethereum-compatible networks, including BNB Smart Chain, Polygon, and Avalanche, run gas systems that work much like Ethereum’s. Some newer networks have built their own fee models using mechanisms inspired by EIP-1559.

The consensus mechanism shapes fees as well. Bitcoin runs on Proof of Work, with miners producing a new block of transfers about every 10 minutes, while Ethereum runs on Proof of Stake, with validators who stake ETH. Chains that generate blocks faster and handle more transactions see less competition for block space, which tends to keep fees lower. That’s the pitch behind low-fee Proof of Stake chains such as Solana, Cardano, Avalanche, and Cosmos, sometimes called “Ethereum killers.”

If you move assets between chains with a cross-chain bridge, expect to pay gas twice: once on the source chain and again on the destination chain.

How to check current gas fees

The number that matters most is the estimate your wallet shows right before you confirm, because it’s calculated for your exact transaction. Gas trackers are better for deciding when to send.

  • Your wallet or trading platform: shows the estimated gas fee before you confirm the transaction, so you can cancel if it’s higher than you expected.
  • Etherscan Gas Tracker: real-time Ethereum gas prices on the block explorer.
  • ETH Gas Station: real-time gas price recommendations for Ethereum.
  • CoinMarketCap and Blockchain.com: crypto gas trackers that show average fees ahead of time, before you open your wallet.

Some trackers follow several networks at once, such as Bitcoin, Ethereum, and Polygon, which saves time if you use more than one chain. Historical fee charts show whether the current fee is high or low compared with recent trends, which a single live number can’t tell you. Some tools also send gas price alerts when the price drops below a threshold you choose, and a few publish gas price predictions so you can time a transaction around the forecast.

How to lower gas fees

Gas fees are unavoidable on on-chain transactions, but you can reduce the total you pay. Timing, network choice, wallet settings, and the number of transactions you send all affect the final bill.

How to lower gas fees
How to lower gas fees

Transact when the network is quiet

The base fee tracks live demand, so off-peak hours are routinely several times cheaper than busy ones. Some busy windows are easy to see coming: scheduled NFT releases, blockchain upgrades, and major crypto news all draw crowds onto the network.

If your transaction isn’t urgent, waiting for a low base fee trades a little time for a lower cost. A gas price alert or a tracker’s historical chart can do the watching for you.

Use layer 2 networks

A layer 2 is a secondary framework built on a layer 1 blockchain such as Ethereum, and it processes transactions off the main chain. It bundles many transactions together and settles them to Ethereum as a batch, so hundreds of swaps share one set of mainnet costs while keeping the main chain’s security. Layer 2 fees run 10x to 100x cheaper than Ethereum mainnet, and a common fee is under one cent per transaction.

The main types differ in how they prove a batch is valid. Optimistic rollups, such as Arbitrum, Optimism, and Base, post batches and treat them as valid unless someone challenges them; on Optimism, it takes about 7 days for transactions to be finalized on layer 1. ZK rollups, such as Loopring and networks built on StarkEx, cover batched transactions with cryptographic proofs, and their transactions are written to layer 1 within a few hours. Polygon is another low-fee scaling network, though technically it’s a sidechain rather than a layer 2.

A layer 2 fee has two parts: the network’s own fee plus a share of the cost of posting data to layer 1. That posting cost is passed through with a time lag, and layer 1 fees rise faster than they fall. As a result, a layer 2 fee can stay elevated for a while after mainnet has calmed down.

Before you can use a layer 2, you have to bridge your assets over from mainnet, and that bridge transaction costs gas too. Some layer 2 networks also run their own token ecosystems, so check that the tokens you need are available there. Bitcoin users have a similar option in the Lightning Network, a lower-fee layer built on top of Bitcoin.

Adjust gas settings in your wallet

Most wallets calculate fees automatically and give you the option to set a custom gas price. MetaMask, for example, lets you set a maximum gas amount. With that cap in place, the transaction won’t post if fees climb above it, so you can’t overpay.

The priority fee is where you have the most say. On a non-urgent transaction, a lower tip means slower inclusion at a lower cost. When something is time-sensitive and blocks are full, a higher tip gets it processed faster. Some wallets add auto-adjusting gas prices and scheduled transactions on top of that. Our wallet reviews at AXL Research Hub cover which gas controls each wallet offers, so you can match the wallet to how often and how urgently you transact.

Leave the gas limit alone unless you know what the transaction needs. Lowering it won’t make the transaction cheaper, since unused gas is refunded anyway, and a limit that’s too low makes the transaction fail while still charging you.

Cut down on approvals and extra transactions

Every extra transaction carries its own fee, and token approvals are one of the most common. Before a DeFi app can move your tokens, you often have to approve it in a separate transaction with its own gas fee. On tokens that support permits, a permit signature replaces that approval transaction with one signed message.

Batching cuts costs as well. Combining several operations into one transaction uses gas more efficiently than sending them one at a time. On the developer side, gas-efficient smart contract design lowers costs for every user who interacts with the contract.

Meta-transactions and intent-based orders take a different route. You sign an order, and a third party submits the transaction and pays the gas, with that cost folded into the rate you’re quoted. In this signed-order mode, you don’t need the native gas token in your wallet, and you don’t lose a fee if an attempt fails.

Do crypto exchanges like Coinbase charge gas fees?

Not for activity that stays inside the exchange. On a centralized crypto exchange such as Coinbase, transfers between users happen off-chain, so no gas fee is involved, and the exchange earns commission fees for its service instead. Gas comes into play when your crypto leaves the exchange for an external wallet.

That withdrawal fee is set by the exchange, and it may be more or less than the gas the exchange actually pays to send your transaction. The exchange keeps any difference. So the withdrawal fee you see isn’t a direct readout of network gas. If you’re comparing platforms in our exchange reviews, look at withdrawal fees as a cost separate from trading commissions.

You may also see the phrase “network fee” on card transactions. Card scheme network fees are contractual charges on card payments and have nothing to do with blockchain gas, even though the wording is identical.

Decentralized exchanges work differently. They’re built directly on blockchains like Ethereum, so every trade carries gas to compensate validators. That doesn’t make a decentralized exchange automatically more expensive, though. Your total cost depends on each exchange’s fee structure, and those structures change over time.

Gas fee FAQ

What does “insufficient gas” mean on Base?

It means your wallet doesn’t hold enough of the network’s native gas asset to pay for the transaction you’re trying to send. Gas is always paid in the network’s native asset, not in the token you’re moving, so a wallet that holds only a stablecoin can’t send that stablecoin. Add some of the asset Base charges gas in, or use an app that supports signed orders, letting someone else send the transaction on your behalf and cover the gas.

Why does the gas estimate keep changing?

The base fee reprices with every new block, roughly every 12 seconds on Ethereum, so any estimate is tracking a moving target. Your wallet refreshes the figure as conditions change, and the max fee you approve caps what you’ll pay if the price rises before your transaction is included.

Does sending a larger amount cost more gas?

No. Gas prices computation, not value, and a $10 transfer and a $10,000 transfer use the same computation. That’s also why a small transfer can end up costing more in fees than the amount it moves.

Why the same transfer can cost cents or dollars

An identical USDC transfer on Ethereum can cost a few cents in a quiet period and several dollars in a busy hour. Nothing about the transfer itself changes, and no one quotes you a price in advance.

That’s what makes gas an unusual operating cost: it’s variable, it’s paid in a volatile asset, and it’s outside the sender’s control. It’s also why stablecoin settlement at scale runs on low-fee networks and batches transfers wherever possible. If you move stablecoins often, the same reasoning applies to you on a smaller scale: send on a low-fee network the recipient can receive on, and keep enough of that network’s gas asset in your wallet so a transfer never stalls for lack of it.

nodescribe

nodescribe

@nodescribe89

NodeScribe has traded crypto since 2018, mostly Solana and Ethereum memecoins, and runs blockchain nodes and writes code on the side. He writes every guide, review and research piece on AXL Research Hub, working from official documentation, fee schedules and on-chain data. Nothing on this site is financial advice.

Follow on:

→ More about nodescribe

Join Our Email List

Sign up to receive the latest articles right in your inbox.

Leave a Comment