Gas Fee

A gas fee is the payment required to have a transaction or smart contract action processed on Ethereum and similar blockchains. It is paid in the network's native coin, compensates validators and discourages spam.

On Ethereum, network fees are called gas, and every computational step a transaction performs has a set gas cost. Simple actions use fewer gas units than complex smart contract calls. The total fee is the gas used multiplied by the price per unit, which is usually quoted in gwei. One gwei equals 0.000000001 ETH. Under EIP-1559, that price is made up of two parts: a base fee set by the network, which is burned, and an optional priority fee, or tip, that goes to the validator.

Gas fees matter because they add to the true cost of anything done on-chain, whether that is sending coins, swapping tokens or minting an NFT. They also rise when the network is busy. If a user offers too little, validators are less likely to include the transaction, so it may execute late or not at all.

As an example, if a transaction consumes a certain number of gas units at a price of 50 gwei, the fee is that number of units multiplied by 50 gwei. A token swap runs more code than a plain ETH transfer, so it costs more at the same gas price. Layer 2 networks typically charge much lower fees for similar actions.

A common misconception is that the gas limit is a fee. It is actually a cap on how many gas units a transaction may use. If the transaction needs more than the limit, it fails, and the gas already consumed is still paid.

Learn more

Related terms