Back
Christof Jori

11 min read · 14 June 2024
Last reviewed

Next
Made on your device, with no Instagram connection. We copy the post link for Instagram’s Link sticker.

Why Do Ethereum Gas Fees Exist?

Ethereum gas is an accounting unit for execution work. It makes each operation consume a defined resource, prevents programs from running without a bound, and helps price limited block capacity. The amount shown in a wallet depends on both the units the transaction actually uses and the effective price paid for each unit.

Gas units and ETH fees are different

A transaction sets a gas limit, which is the maximum number of execution-gas units it may consume. The limit is not the amount of ETH the sender necessarily pays. If execution succeeds with fewer units, unused gas is not charged. If execution runs out of gas, state changes revert, but the computation already performed still consumes a fee.

A simple ETH transfer has a predictable execution path. Calling a smart contract can use more gas depending on storage changes, internal calls, input data, and the branch the code takes. A wallet simulation is therefore more useful than a generic claim that a particular action is always cheap or expensive.

How EIP-1559 prices execution

For an EIP-1559 transaction, the paid execution fee can be expressed as:

gas used × effective gas price

The effective gas price includes a protocol-set base fee and a priority fee, subject to the sender's maximum fee. The base fee rises when recent blocks use more than the target capacity and falls when they use less. It is burned. The priority fee is paid to incentivize inclusion. The sender's maxFeePerGas caps the price per unit, and any unused difference between that cap and the effective price is not spent.

The transaction gas limit and maxFeePerGas protect different dimensions. One caps execution units; the other caps the offered price per unit. Wallets normally estimate both, but the user should still check the total value, destination, network, and fee immediately before signing.

Why fees change

Ethereum block space is limited. When demand is above the protocol's target, the next block's base fee increases under the EIP-1559 rule. When demand is below target, it decreases. Users can also offer different priority fees, so transactions with greater urgency may pay more for inclusion.

The fee can change even when the displayed gas price looks stable. A swap may take a different route, a contract may execute a different branch, storage may have changed, or the transaction may revert. Fee history is useful context, not a quote for a future transaction.

Execution gas is not blob gas

EIP-4844 introduced blob-carrying transactions for data availability used by rollups. Blob gas has a separate fee market and targeting rule from normal EVM execution gas. A rollup batch publisher may pay blob fees to make data available on Ethereum, while an end user's L2 transaction also pays fees defined by that rollup.

This distinction matters when comparing costs. Ethereum execution demand and blob demand can move differently. A low L1 execution base fee does not guarantee a low rollup data fee, and a low blob fee does not determine the L2 execution or operator component.

What an OP Stack transaction can include

On an OP Stack chain, the total is not simply Ethereum gas at a lower price. Depending on the chain and activated upgrades, the charge can include:

  • L2 execution fee: gas used on the L2 multiplied by its effective L2 gas price;
  • L1 data fee: the cost attributed to publishing compressed transaction data or related data commitments to Ethereum;
  • operator fee: a chain-configured component introduced for post-Isthmus OP Stack chains and modified by later upgrades.

Fee parameters and active forks differ across OP Stack chains. Use the target chain's current estimator rather than copying a formula or scalar from another network. Bridging also creates separate transactions and may add third-party fees or a different withdrawal path.

How BNB Smart Chain differs

BNB Smart Chain is an EVM-compatible blockchain, but it is not an Ethereum L2 and does not settle its state to Ethereum as a rollup. Its validator set, Proof of Staked Authority consensus, block parameters, fee market, native fee token, and security assumptions are its own.

The current BNB Chain documentation describes 45 validators and a 0.45-second mainnet block interval after the Lorentz, Maxwell, and Fermi upgrades. Those protocol facts can change in later upgrades. They do not prove that every BSC transaction is cheaper, faster to finality, or safer for a particular application. Compare current quotes and the complete trust and operating model.

Do L2s inherit all Ethereum security?

No single sentence covers every Layer 2. A rollup may use Ethereum for data availability and settlement while retaining dependencies on its sequencer, proof system, upgrade keys, governance, bridges, and withdrawal mechanism. Fee savings and security properties must be evaluated together.

For a production decision, document the exact chain, bridge, asset representation, finality assumptions, failure and escape paths, upgrade authority, data availability, monitoring, and expected transaction mix.

A fee-comparison checklist

QuestionWhy it matters
Which exact transaction is simulated?Execution paths and calldata differ.
Which token pays the fee?User balance and price exposure differ by chain.
Which components are included?Execution, data, blob, operator, and bridge fees may be separate.
What happens on failure?A reverted transaction can still consume execution fees.
How are funds bridged and withdrawn?Extra transactions, waiting periods, and trust assumptions may apply.
When was the quote measured?Demand and protocol parameters change.

Sources

Final thoughts

Gas prices bounded execution and scarce capacity. Ethereum execution fees combine gas used with an EIP-1559 effective price, while blob gas has a separate market. Rollup transactions can add execution, L1 data, blob-related, and operator components. Compare the exact transaction and current network quote, then evaluate the fee alongside bridge, upgrade, data-availability, finality, and operational risks.

Web3 systems that hold value

Shipping blockchain, wallet, ZK, or token infrastructure where mistakes are expensive? Wavect builds production-grade on-chain products with security, UX, and delivery discipline.

Relevant service path:

Inbox, without the noise

Follow the work that matters to you

Get a short email when we publish something new. Follow the whole blog or only the problems you care about.

What would you like to receive?
Choose your topics

Free, double opt-in, no tracking pixels.

Back
Christof Jori

11 min read · 14 June 2024
Last reviewed

Next

Get the next Web3 and privacy field note

One concise email when we publish. No tracking pixels, and no inbox filler.

Free, double opt-in, no tracking pixels.