Linea

Linea gas fees combine execution charges with variable Ethereum data costs

Last updated

Linea gas fees cover transaction execution and Ethereum data publication through an ETH-denominated network charge. The amount changes with execution work, compressed transaction size, and the costs of publishing batches on Ethereum. A transaction-specific quote is more useful for budgeting than a single advertised gas price.

Bottom line: A canonical ETH withdrawal requires gas on both Linea and Ethereum, so its initiating fee alone understates the total cost.

Execution and Ethereum Publication

Execution gas measures the work that a transaction performs on Linea, while Ethereum publication costs pay for making the rollup's data available on Ethereum. The sequencer orders transactions into blocks, and the rollup publishes their data in batches. Proof verification adds another shared Ethereum expense. Linea incorporates these underlying costs into its recommended L2 gas pricing, so the network fee already accounts for publication. Adding a second estimated publication charge to that fee would double-count an included component.

Gas units and gas prices describe different parts of the charge. A contract's operations determine its gas consumption, while the price specifies the ETH charge for each unit. Network pricing also accounts for infrastructure costs. A small protocol base fee therefore says little about the full transaction bill; the priority fee recommendation carries additional pricing requirements.

Blob Demand and Compressed Transaction Data

Blob demand affects the Ethereum cost of carrying Linea transaction data. Ethereum prices blobs through a separate market from ordinary execution gas. Greater demand for blob space can raise that component even when a particular Linea contract performs the same computation. Lower blob costs reduce a publication input, while execution and other network expenses remain part of the fee.

Linea's variable data charge also responds to usage of the data space in recent Linea blocks. Sustained high-data activity can increase that charge; lower usage can move it back toward the underlying publication cost.

Shared Batch Costs

Batch submission spreads Ethereum overhead across multiple transactions. The fee model accounts for publication costs per byte, while a particular transaction's compressed size helps determine its share. Gas consumption and data size therefore influence pricing in different ways.

Data Compression

Lossless compression reduces the data that Linea must publish while retaining the original transaction information. Two calls with similar execution gas can contain different amounts of compressed data. Their appropriate per-gas price recommendations can differ as a result.

Proof Aggregation

Proof aggregation combines proofs for multiple batches into a final proof that Ethereum can verify. Sharing verification overhead reduces its allocation across those batches. The saving per transaction still varies with how much activity shares the overhead.

Transaction-Specific Fee Quotes

linea_estimateGas returns a recommended gas limit, base fee per gas, and priority fee per gas for the supplied transaction. Its priority recommendation includes Ethereum publication costs and reflects compressed transaction data. The result uses hexadecimal integers; fee-per-gas values represent wei. Supplying the sender, destination, value, and encoded call data lets the estimate describe the intended call. Changing those inputs or the relevant contract state can change the answer.

Estimation simulates execution without submitting a transaction or spending onchain gas. A quote represents the node's calculation at that moment, including its pricing assumptions and margin. Some estimation margins are configurable by the RPC provider. Keeping an old quote through changing block conditions can leave the offered fee below the amount required for inclusion. A fresh estimate still cannot guarantee that later contract execution will succeed.

Linea gas fees - Transaction-Specific Fee Quotes - diagram

View image file

Gas Limits and Maximum Fee Settings

Gas limits cap execution allowance, while maxFeePerGas caps the price of each gas unit for an EIP-1559 transaction. Their product gives the maximum gas-fee budget for that transaction. Any ETH value that the transaction sends adds to the required balance. This budget excludes an application's separate token charges or other transactions that the operation needs.

Execution Allowance

Unused gas does not become an extra charge merely because a wallet chose a higher limit. The final gas consumption determines the fee. An inadequate limit can prevent execution or cause an included contract call to run out of gas. An execution that runs out of gas consumes its provided gas allowance while reverting its state changes.

Priority and Total Price Caps

maxPriorityFeePerGas limits the offered priority payment. The effective priority payment also cannot exceed the headroom left after the base fee within maxFeePerGas. Raising only the total cap leaves a low priority cap unchanged. On Linea, that can still prevent the offer from covering transaction-specific data costs.

Fee Information From RPC Methods

RPC queries answer different parts of a fee question: transaction simulations estimate requirements, historical queries show block pricing, and receipts record included transactions. A general unit-price response lacks the transaction-specific data inputs that Linea's estimator uses.

RPC Method Fee Information Returned
linea_estimateGas Recommended transaction gas limit, base fee, and priority fee that includes publication costs.
eth_estimateGas Execution gas estimate for the supplied call, without a corresponding transaction-specific gas price.
eth_gasPrice General gas-price response in wei, without transaction call data as an input.
eth_feeHistory Base fees and gas-used ratios across a requested block range, plus priority-fee samples when requested.
eth_getTransactionByHash Submitted gas limit and transaction fee settings, without actual gas-consumption data.
eth_getTransactionReceipt Actual gas used and effective gas price after inclusion; pending transactions have no receipt.

ETH Funding and Wallet Fee Conversion

ETH on Linea funds ordinary transactions from the sending account. A wallet can arrange payment through an eligible token while the protocol still charges gas in ETH. MetaMask's gas included feature supports eligible sends and application transactions on Linea when Smart Transactions and Estimate balance changes are enabled. Eligible token choices depend on the network and available balances. The displayed token-funded quote includes a MetaMask fee, making that service charge relevant when comparing payment options.

Illustration: Linea gas fees - ETH Funding and Wallet Fee Conversion

View image file

Bridge Charges Beyond the Linea Transaction

Native bridge costs depend on the transfer direction and claiming mode. Ethereum-to-Linea deposits require gas for the Ethereum initiation transaction. Manual claiming adds a transaction on the destination network, and the account submitting the claim pays its gas. For native ETH deposits, the postman sponsors eligible automatic message claiming below 250 000 gas. That sponsorship covers destination claiming, while the sender still pays Ethereum initiation gas. Unsponsored postman pricing uses the estimated claim gas, the target gas price, a gas buffer, and a margin.

Canonical ETH withdrawals from Linea to Ethereum require a Linea initiation and a manual Ethereum claim. The native message service also charges a 0.001 ETH protection fee for this direction. An ERC-20 bridge operation may need an approval if the bridge lacks sufficient allowance, adding gas where that approval occurs. USDC transfers through the native bridge use the Cross-Chain Transfer Protocol (CCTP) and require manual claiming on the destination network, so canonical ETH charges do not describe every asset route. Claiming availability depends on the applicable bridge process and finality, independently of the initiating gas charge.

The Charged Fee and the Application Bill

A transaction receipt records gas consumption and pricing for an included Linea transaction. The network gas fee equals gasUsed multiplied by effectiveGasPrice. The receipt's cumulativeGasUsed measures gas accumulated through that transaction's position in the block. The calculation needs the transaction's own gasUsed. An estimate describes expected requirements; the receipt supplies the quantities for the charge that actually occurred.

Wei is the smallest ETH denomination: one ETH contains 10 18 wei. Multiplying gas units by a price in wei produces a charge in wei; dividing by 10 18 converts it to ETH. A wallet's fiat display adds the ETH exchange rate as another input. A changed fiat figure can reflect currency valuation even when the network charge in ETH remains the same.

Visual summary: The Charged Fee and the Application Bill (Linea gas fees)

View image file

Application fees belong to a separate cost line from receipt gas. A swap can include a trading or service fee, and a wallet's fee conversion can add its own charge. The gas receipt does not establish the application's token output or total service charges. A budget for the operation needs any required approval, claim, and service costs alongside the transaction's gas estimate.

Key questions about Linea gas fees

Can LINEA Tokens Pay Ordinary Linea Gas Fees?

LINEA tokens do not replace ETH for ordinary protocol gas payments on Linea. A LINEA balance remains separate from the account's native ETH balance. A wallet can therefore report insufficient gas funds even when the account holds LINEA.

Does Revoking a Token Allowance Cost Gas on Linea?

An onchain ERC-20 allowance revocation on Linea costs gas because it updates the token contract's state. Changing an allowance through a transaction uses execution resources, even when no tokens move. The charge depends on the specific contract call and the network fee recommendation at submission.

Are read-only Contract Queries Subject to Linea Gas Fees?

A read-only call through eth_call does not create an onchain transaction or debit network gas. The node executes it locally against the requested blockchain state. Sending a contract call as an onchain transaction incurs gas for execution, including when the method only returns data.

Why Can a Linea Fee Estimate Fail Despite Sufficient ETH?

A contract simulation can reject a call because its execution conditions are unmet, regardless of the sender's ETH balance. Insufficient token holdings, a missing spending allowance, or another contract rule can prevent execution. Additional ETH addresses gas funding; it does not satisfy those separate application requirements.

How Can I Estimate a Linea Transaction Before the Account Holds the Required Assets?

linea_estimateGas supports temporary state overrides, including account balances and selected contract storage. These allow a simulation under modified conditions without changing the blockchain. A successful estimate under an override does not give the real account those funds or permissions; the eventual transaction still needs its actual onchain prerequisites.

Is a Pending Linea Transaction Charged Again for Every Block It Waits?

A pending transaction does not accrue another execution gas charge for each waiting block. The network charges gas when a transaction enters a block and executes. A replacement can carry different fee settings, while a separate later transaction has its own charge. Waiting time alone does not consume execution gas.

Do Larger ETH Transfers Always Have Higher Linea Network Fees?

An ETH transfer's value does not impose a percentage-based network fee. Execution work and data-related pricing inputs determine gas charges. Changing the amount can alter the encoded transaction and its compressed representation, so different transfer values do not guarantee identical quotes. An application's percentage-based service fee follows separate pricing rules.