Ethereum Layer 2 Fees Explained: Execution and Data Costs
Learn why an Ethereum Layer 2 transaction can include execution, L1 data, and chain-specific fees, and how batches, blobs, and upgrades affect the total.
In this guideAn L2 transaction does not use the same fee market as Ethereum mainnet
Short summary
Ethereum Layer 2 fees are not simply Ethereum mainnet gas fees at a lower rate. A rollup executes transactions on L2, then batches and publishes data to Ethereum, so a user’s total can include execution, data publication, and chain-specific charges. The exact components depend on the network and its active upgrades.
An L2 transaction does not use the same fee market as Ethereum mainnet
An Ethereum rollup executes many users’ transactions on L2, then publishes grouped state changes to Ethereum. The execution fee follows the L2’s block space and fee rules; it is not the price of executing every user transaction separately on mainnet. Ethereum provides data availability and settlement for the rollup.
That is why a single “Ethereum gas price” cannot reliably predict the full cost of an L2 transaction. The selected network can change the execution price, the data publication charge, and sometimes the token used to pay fees—even when the wallet action looks like the same ETH transfer.
This guide separates the general model for rollups that publish data to Ethereum from the specific fee structure documented for OP Mainnet. L2 networks may use similar wallet interfaces without sharing the same fee components or data publication method.
A single L2 fee can combine several cost components
A wallet quote may combine some of the following:
- L2 execution fee: gas needed to execute the transaction in an L2 block, multiplied by the L2 gas price
- L1 data fee: the user transaction’s allocated share of publishing rollup data to Ethereum
- Chain-specific charge: a separate operator fee or other charge set by a particular network
This is an explanatory model, not a universal three-part rule. One chain may show data publication as a separate line; another may include several components in one fee or gas-price field. The number of line items in a wallet does not define how many costs exist underneath.
Some batch-publication costs are shared across many transactions and do not appear as a separate Ethereum transaction initiated by each user. A rollup assigns or estimates each transaction’s share using its own size and pricing rules. Users do not normally submit the batch transaction or buy one whole blob for every L2 action.
Execution cost depends on the work and demand on the L2
Gas is a unit for the work required to execute smart-contract instructions; the fee is the gas multiplied by its price. A simple token transfer and a swap that calls several contracts can use different amounts of gas, even if both appear as one action in a wallet.
Conceptually, execution fee = gas used × L2 gas price. That gas price reflects demand for block space and the L2’s pricing rules. A higher Ethereum mainnet base fee does not automatically make every L2 execution fee rise by the same amount.
L2 block space can still become busy, which can increase that network’s execution price. A wallet’s gas limit or maximum fee may be an estimate or cap rather than the final amount charged. Do not treat either number as the same thing as the transaction’s eventual fee.
Data publication costs reflect batching and Ethereum data prices
Rollups publish the data needed for other nodes to verify or reconstruct state changes on Ethereum. Grouping transactions into batches and compressing their data can reduce the publication cost assigned to each user compared with submitting every transaction separately to mainnet.
Transactions do not all occupy the same amount of compressed data. A transaction with more data can account for a larger share under a rollup’s pricing method. The way a protocol estimates that share, and the parameters it applies, vary by network.
Consider a deliberately simplified allocation example. If 20 similar transactions share a hypothetical 0.0004 ETH of fixed batch-submission overhead, an even split would be 0.00002 ETH per transaction. Actual rollups do not necessarily divide costs evenly: compressed data size, the network’s data-pricing method, and fixed or protocol-specific parameters can change each transaction’s share. This illustrates why batch cost and user charge can differ; it is not a fee formula for any particular network.
Actions that look similar in a wallet can encode different contract calls and data, so token amount alone does not predict the data charge. L2 execution and batch-data costs are also separate dimensions. A complex swap can use more execution gas even with a small data footprint, while a larger payload can raise publication cost without adding much computation. Network rules determine how a quote combines them.
Putting more transactions in a batch can spread fixed posting overhead across more users, but waiting for a larger batch does not guarantee a lower fee for each user. Gas or blob prices may rise before publication, or a new transaction may account for a large share of compressed data, changing the total or each allocation. The potential efficiency of grouping transactions is different from a promised discount for every individual transaction.
Data-related fees can also respond to Ethereum gas prices or demand for blob space. An L2 execution price may barely move while the data component changes. Ethereum.org explains batching and fee factors for optimistic rollups and ZK rollups separately.
Calldata and blobs are different ways to publish data to Ethereum
Ethereum calldata is transaction data handled by the execution layer and is priced through the regular gas market. EIP-4844 added separate blob space and an independent blob-gas fee market to support rollup data publication. These paths differ in pricing and in how the data can be accessed and retained.
An EVM contract cannot read blob contents as if they were ordinary contract storage. Ethereum’s consensus layer makes blob data available for a limited period, after which clients can stop retaining it. EIP-4844 specifies that blob gas follows pricing rules separate from regular execution gas; see the EIP-4844 specification.
Keep the user fee separate from the rollup operator’s batch-publication transaction. Some L2 fee models, including OP Stack chains configured to use blobs, account for data publication in the user’s L2 fee. That does not mean every L2 user directly pays for a whole blob as a separate wallet charge.

Rollup type and network configuration change the fee mix
Optimistic rollups can include L2 execution and a user allocation for publishing batch data. ZK rollups also account for execution and data publication; proving batches and verifying them on Ethereum may affect the protocol’s economics. Those costs do not necessarily appear as a separate line called “proof fee” on the user’s receipt.
Networks may publish data as calldata or blobs, and they may differ in compression, batch frequency, and how they estimate each user’s data cost. Comparing only the quoted L2 gas price can therefore miss a meaningful part of the total.
Fee rules can change through network upgrades. A calculator or old article that describes a fixed formula may no longer match the active network. Check the network’s current fee display and its official documentation for the applicable version.
The same caution applies when comparing a past receipt with a current quote on one network. A familiar network name does not guarantee the fee schedule is unchanged: its data-publication method or active fee upgrades may have changed. For an older transaction, check its date, block, and protocol version so you do not confuse a change in L1 data prices with a change to the chain’s fee rules.
OP Mainnet’s operator fee is a chain-specific example
Optimism documents OP Mainnet transaction fees as execution gas plus an L1 data fee, with an operator fee added after the Isthmus upgrade. Its structure is therefore execution gas fee + L1 data fee + operator fee when applicable.
That fee schedule should not be copied as a universal Ethereum L2 formula. The OP Mainnet documentation also explains that data-fee and operator-fee parameters depend on active upgrades. Other OP Stack chains can have different operator settings or upgrade timing.
For OP Mainnet, use Optimism’s current transaction-fee documentation. For Base or another L2, check that network’s own fee guide. Sharing a software stack does not guarantee that two networks charge the same total.
Add the line items in a hypothetical receipt
The following fictional example illustrates a three-component OP Mainnet-like structure. It is not a current network rate or wallet quote.
| Hypothetical item | Amount |
|---|---|
| L2 execution fee | 0.000008 ETH |
| L1 data publication fee | 0.000020 ETH |
| Operator fee | 0.000004 ETH |
| Total | 0.000032 ETH |
The arithmetic is 0.000008 + 0.000020 + 0.000004 = 0.000032 ETH. Data publication costs more than execution in this example, but that will not be true for every transaction. Each share changes with data size, L1 demand, execution work, and the network’s fee settings.
The total excludes fiat conversion, bridge charges, a swap protocol’s fee, price impact, and exchange deposit or withdrawal charges. It is not enough to decide that one network is cheaper or to calculate the full economic cost of a transaction.
A wallet quote and the final receipt can differ
A wallet quote estimates transaction cost before signing, using predicted gas, gas prices, and data fees. The fee market can change before inclusion, or the actual execution path can differ from the estimate. A maximum fee is a spending limit, not necessarily the amount ultimately charged.
After the transaction, open its receipt in a block explorer for the correct network and review gas used, actual charges, and whether execution succeeded. Some networks expose L1 data or operator fees as separate fields; others may report a combined amount. Interpret field names in the context of that chain.
Check the network name, chain ID, and fee token as well. The guide to Ethereum mainnet gas fees explains the difference between L1 execution gas and the amount paid for it.
Separate bridge, swap, and network charges
A deposit from Ethereum to an L2 is initiated as a mainnet transaction and can incur L1 gas. A swap on the L2 can involve the network fee, the swap contract’s trading fee, and price impact. Withdrawing back to Ethereum can involve additional network costs for the withdrawal path and its L1 execution.
Calling all of these “L2 gas” hides where each charge occurs. Separate network fees, bridge-service charges, swap fees, and exchange withdrawal fees before comparing the total. The crypto transfer network checklist can help when reviewing a bridge route.
Before transacting, check (1) the selected network and fee token, (2) whether execution, data, and operator costs are itemized, (3) the quote time and network conditions, (4) separate deposit, withdrawal, or swap charges, and (5) the final receipt. Knowing what a quote includes is more useful than comparing one unexplained number.
Common questions
Q1Does every Ethereum L2 show an L1 data fee as a separate line?
No. Rollups publish data to Ethereum, but their fee displays differ. A wallet or receipt may combine the user’s data-publication cost with another field instead of showing a separate L1 data line.
Q2Does an L2 user pay for each blob directly?
Users do not normally buy individual blobs. A rollup operator may use blobs to publish batch data, and the L2’s fee rules can assign part of that cost to user transactions.
Q3Do I only need to budget for the L2 fee when bridging from Ethereum?
No. The deposit request is an Ethereum mainnet transaction and can require L1 gas. Later L2 transactions or withdrawals can have costs at their own stages, so check the estimate for each step.
Sources and further reading
Report an issue
We’ll prepare an email with this article link. Mark receives the report only after you send it
Quick check
Read the guide? Check yourself with 3 questions
Question 01
Why can an Ethereum rollup charge an L1 data fee for an L2 transaction?
Choose an answer to see the explanation
Options glossary
The portion of premium above intrinsic value, reflecting remaining time, expected uncertainty, rates, dividends, and supply and demand.
Read the deeper guideGammaAn estimate of how much delta may change for a small move in the underlying, all else equal; it often becomes more concentrated near expiration and near the money.
Read the deeper guide