Ethereum users often see only the price of a transaction. Behind it is a system for measuring computational resources. Gas is a unit of work: a transfer and a complex contract interaction can consume different amounts.

Why fees fluctuate

Block space is limited. When demand is high, users compete for transaction inclusion. Since the London upgrade in August 2021, Ethereum has used an algorithmically adjusted base fee and a possible priority fee as an inclusion incentive.

What a cheap transaction means

Costs depend on gas consumed and fee parameters. When a service offers zero fees, check who actually pays and at which layer the operation occurs.

Layer 2 and security

Rollups can reduce costs through batching, but also consume resources and have their own security assumptions. Cheap and secure are different criteria. Alongside fees, users should check the recipient and permissions granted.

A simplified calculation

Suppose a simple transfer requires 21,000 gas and the price actually paid is 20 gwei per gas. Execution costs 420,000 gwei, or 0.00042 ETH. A more complex smart-contract interaction may need more units of gas. The actual figures depend on the operation and network demand.

Since EIP-1559 the fee mechanism consists of a protocol-determined base fee and, where applicable, a priority fee. A user-selected maximum is not automatically the full price actually paid. A wallet should distinguish estimates from figures established at completion.

Why unsuccessful operations may still cost money

If a smart contract terminates with an error, computation may already have occurred. State changes can be reverted while fees are charged for the execution resources used. An unsuccessful swap is therefore not necessarily free.

Comparing networks requires considering the entire journey. Low fees on a second layer may involve additional transfer or conversion costs. Gas measures resource usage, rather than representing a universal price for a payment.

Sources and further reading

These links lead to original documents and further reading.

  1. Ethereum.org · gas ↗
  2. Ethereum.org · scaling ↗