CommunitySign in

Share

Crypto

Definition

A gas fee is the fee paid to process a transaction or run a smart contract on Ethereum and similar blockchains. It covers the computation and storage the network uses and is paid in the network's native coin.

How it works

Every operation on an Ethereum-style network has a cost measured in units of gas. A simple transfer uses little gas, while a complex smart-contract action, such as a token swap, uses more. The fee is gas used × gas price. The gas price is usually quoted in gwei, where 1 gwei is 0.000000001 of the native coin, or one billionth.

On Ethereum, since the EIP-1559 upgrade, the gas price has two parts. The base fee is set by the protocol according to how full recent blocks have been, and it is burned, meaning permanently removed from supply. The priority fee, or tip, is optional and goes to the validator; a higher tip can get a transaction included sooner. A wallet also sets a gas limit, the most gas a transaction may use. If a transaction fails, for example because it runs out of gas or a contract rejects it, the gas used up to that point is still charged.

Gas fees depend on network congestion and on the complexity of the transaction, not on the amount of money being sent. Fees can rise sharply when demand for block space is high. Layer-2 networks, which process transactions separately and settle them on the main chain, are often much cheaper.

Example (hypothetical numbers)

Suppose a token transfer on an Ethereum-style network uses 50,000 gas, the base fee is 18 gwei, the sender adds a 2 gwei priority fee, and the network's coin is priced at $3,000.

Fee = 50,000 × (18 + 2) gwei = 1,000,000 gwei = 0.001 coin, or 0.001 × $3,000 = $3.

Of that, 50,000 × 18 = 900,000 gwei is burned and 50,000 × 2 = 100,000 gwei goes to the validator.

The fee would be the same $3 whether the transfer moved $10 or $10,000 worth of tokens, because gas measures computation, not value.

Common mistakes

  • Assuming the gas fee grows with the amount being sent.
  • Expecting gas to be refunded when a transaction fails.
  • Setting fees too low during busy periods, which can leave a transaction pending for a long time.
  • Forgetting to keep some of the native coin in the wallet to pay gas when sending other tokens.

Related calculators

This glossary is for education only and is not investment advice. Examples use hypothetical numbers.

All glossary terms