What Are Gas Fees in Crypto? How They Work and How to Pay Less

Updated

The short answer

Gas fees are the payments you make to a blockchain network to process a transaction or run a smart contract. They go to validators or are burned, and they rise when the network is busy. On Ethereum, the fee is the gas used multiplied by the price per unit of gas, shown in gwei.

If you have ever seen a “network fee” before confirming a swap or transfer, that was gas. It is separate from any fee an exchange or app charges.

Gas fees at a glance

What it pays for Computing and storing your transaction on the network
Who receives it Validators or miners, and on some networks part is burned
Paid in The network’s own coin, such as ETH on Ethereum
What sets the price Demand for block space and the complexity of what you do
Can you avoid it Not on-chain; you can only reduce it

How do gas fees work?

On Ethereum, which many networks copy, the process is:

  1. Every action costs gas units. A simple transfer needs fewer units than a swap or an NFT mint, because contract calls do more work.
  2. A base fee is set by the network. It rises when blocks are crowded and falls when they are quiet. Under Ethereum’s design the base fee is burned, not paid to anyone.
  3. You can add a tip. The priority fee goes to the validator and nudges your transaction up the queue.
  4. Total fee = gas used x (base fee + tip). Prices are quoted in gwei, a billionth of one ETH.
  5. Failed transactions can still cost gas. The computing happened, so the fee is usually not refunded.

The base fee and the priority fee make up the price per gas unit in gwei, which is multiplied by the gas used to give the total fee.

Total fee = gas used x (base fee + priority fee).

A worked example (invented prices)

According to ethereum.org’s gas documentation, a plain ETH transfer uses 21,000 units of gas. Suppose the base fee is 20 gwei and you add a 2 gwei tip.

Step Calculation Result
Price per gas unit 20 + 2 gwei 22 gwei
Fee in gwei 21,000 × 22 462,000 gwei
Fee in ETH 462,000 ÷ 1,000,000,000 0.000462 ETH
Fee in dollars if ETH is $3,000 0.000462 × $3,000 $1.39
Of which burned 21,000 × 20 gwei = 0.00042 ETH $1.26
Of which paid to the validator 21,000 × 2 gwei = 0.000042 ETH $0.13

A token swap might use several times the gas of a transfer, so the same prices would give a fee several times higher. The numbers are examples, not current rates.

See what Ethereum is for the network where the term started, and our Ethereum gas tracker page for checking current levels. For more background, see what Polygon is, which covers POL, MATIC and how the network works.

Why a transaction fails, and what you pay

Situation What happens to the fee
Transaction succeeds You pay gas for the work done
Transaction fails inside a contract (for example, price moved past your slippage limit) The computation ran, so the gas is usually still charged
Transaction is still pending Nothing is charged until it is included in a block
You replace or cancel a pending transaction You pay only for the one that is included

Why gas fees change

  • Demand. Busy periods, such as popular token launches, push prices up.
  • Complexity. Multi-step swaps cost more than sending coins.
  • Network design. Some chains are built for lower fees, others for security first.

Gas on other networks

Network type How fees tend to work
Ethereum Variable fee in ETH, set by demand
Layer 2 networks Usually much lower, paid in ETH on many of them. See what Base is
Solana Small fees paid in SOL. See what Solana is
BNB Smart Chain Paid in BNB. See what BSC is
Bitcoin Fee depends on the transaction’s size in bytes, not on a smart contract

How to pay less gas

  1. Check the fee before you confirm. Wallets show an estimate; do not approve a number that looks far too high.
  2. Wait for quiet periods. If a transaction is not urgent, try again when the network is less busy.
  3. Use a layer 2 or a cheaper network when the app you want exists there, and bridge carefully.
  4. Avoid unnecessary approvals. Each approval is its own transaction.
  5. Set a slippage limit on swaps so a failed trade does not repeat. See what slippage is.

Risks to watch for

  • Fake gas “helpers”. Never give your seed phrase to a site that offers to lower fees.
  • Sending on the wrong network. You need the right coin for gas on that network, or you cannot move your tokens.
  • MEV. Some bots reorder transactions for profit. Learn more in what MEV is.

What to do when the fee looks wrong

  1. Fee far above usual: open a gas tracker and compare. If the wallet’s estimate is much higher, cancel and retry later.
  2. Transaction stuck pending: use the wallet’s “speed up” option, which re-sends with a higher fee, or “cancel”.
  3. “Insufficient funds for gas”: you need more of the network’s coin than the amount you want to send plus the fee.
  4. Tokens but no coin for gas: you cannot move the tokens until you send a small amount of the native coin to the same address on the same network.

Common questions

Do I need to hold the native coin to pay gas?

Usually yes. A few apps sponsor fees for you, but most require a small balance of the network’s coin.

Why was my transaction stuck?

The fee you set may have been lower than the network’s current price, so validators skipped it. Many wallets let you speed it up or cancel it by paying more. To see what a transaction costs at the current base fee, use the gas fee calculator.

What is a gwei?

A gwei is one billionth of an ETH, so 1 gwei is 0.000000001 ETH. Ethereum quotes gas prices in gwei because the numbers are easier to read than tiny fractions of ETH.

Why do I pay gas even when I do not hold much?

Gas is a price per unit of work, not a share of what you send. Moving $10 or $10,000 of ETH costs the same gas, and a failed contract call is still charged.

Are gas fees the same as exchange fees?

No. Gas goes to the network. An exchange or app fee goes to the company, and withdrawing from an exchange can carry both.

What we have not confirmed

Current base fees and the cost of a given action change by the minute and are not stated here. Check a live gas tracker or your wallet’s estimate. Fee arrangements on networks other than Ethereum are set in each network’s own documentation.

Sources

  1. ethereum.org supports: Gas, base fee, priority fee, gwei, and how Ethereum fees are calculated