glossary

Gas Fee

The fee paid to process a transaction on Ethereum and similar blockchains. What gas is, how the fee is calculated, and why it sometimes spikes.

A gas fee is what you pay to have a transaction processed on Ethereum and on blockchains built the same way. “Gas” measures how much computational work a transaction needs. A simple transfer uses a little gas. Interacting with a complex smart contract uses more.

How the fee is calculated

The fee is the amount of gas used multiplied by the price per unit of gas:

fee = gas used × (base fee + priority tip)

  • The base fee is set automatically by the network and rises or falls depending on how full recent blocks were. It is burned (destroyed) rather than paid to anyone, a change introduced by an upgrade known as EIP-1559 in 2021.
  • The priority tip goes to the validator and encourages them to include your transaction sooner.

Gas prices are quoted in gwei, a billionth of one ether. A standard ether transfer uses 21,000 units of gas. At a combined price of 20 gwei, that transfer costs 21,000 × 20 = 420,000 gwei, or 0.00042 ether.

Why fees spike

Block space is limited. When many people want to transact at once, during a market crash or a popular token launch for example, the base fee climbs and users bid higher tips to get in. Fees that are pennies on a quiet day can become many dollars on a busy one.

Ways people pay less

  • Transacting at quieter times.
  • Using layer 2 networks, which bundle many transactions together and settle them on Ethereum, cutting the cost per transaction.
  • Setting a maximum fee in the wallet so a transaction waits rather than overpays.

A failed transaction usually still costs gas, because the network did the work of trying to run it.

Related: How Does a Blockchain Work?

#glossary#gas#fees#ethereum