Why a transaction costs anything
Transaction costs on a blockchain like Ethereum are not arbitrary; they represent the scarcity of block space and the computational requirements for network participants to verify state changes. Every transaction submitted consumes gas, which is an abstract unit of measurement representing the effort required for the Ethereum Virtual Machine (EVM) to execute operations. Because there is a finite capacity for how much data can be included in a single block, users must bid for inclusion through transaction fees, effectively paying for the privilege of permanent storage on the ledger.
What fits in a block
Ethereum currently imposes a hard constraint on block size defined by the block gas limit, which is set at 30 million gas. This limit ensures that nodes can realistically process the block within the slot time without causing excessive centralization due to high hardware requirements. Inside the block, nodes must execute opcodes, modify the state trie, and store transaction data in the form of calldata. Each operation has a predetermined gas cost defined in the yellow paper; for example, a standard SSTORE operation can cost up to 20,000 gas if it updates a zero-to-nonzero slot, while basic arithmetic opcodes like ADD or MUL cost only 3-5 gas.
Rollups: compute offchain, data onchain
To scale beyond the inherent limitations of the L1 block limit, developers architected Layer 2 (L2) rollups to move the heavy lifting of computation off-chain. In a rollup architecture, transactions are bundled into a batch by a sequencer, and the resulting state change is computed on an L2 execution environment rather than the L1. Crucially, the rollup must post a compressed version of the transaction data, along with a cryptographic commitment or proof, to an L1 smart contract. This ensures that even if the L2 sequencer goes offline, the state can be reconstructed or challenged by anyone monitoring the L1 data.
Where your L2 fee actually goes
An L2 fee is an aggregation of three distinct cost factors designed to cover the total operational expenses of the network. First, there is the execution cost, which covers the computation performed by the L2 sequencer nodes to update the rollup state. Second, there is the amortized L1 data cost, which represents the expense of posting the batch data to Ethereum, typically the largest component of the fee. Finally, there is a protocol overhead fee, which acts as a margin for the sequencer to cover infrastructure costs and risk. Since the introduction of EIP-4844, the cost of the data component has dropped significantly, as blobs provide a more efficient way to store temporary transaction data.
What L2 does not fix
While rollups offer significant improvements in throughput and cost, they do not resolve every challenge inherent to distributed systems. Specifically, they do not inherently solve wallet UX problems, such as complex account management or the risks of loss of private keys. Furthermore, they contribute to the fragmentation of liquidity, as assets must be bridged between different L2s, and they rely on the trust assumptions of the sequencer and the multisig upgrade keys held by the project teams. Users must always be aware that if an upgrade key is compromised, the security of the funds deposited in the bridge contract could be at risk, regardless of the rollup's underlying proof system.
| Feature | Layer 1 | Layer 2 | | :--- | :--- | :--- | | Execution | On-chain | Off-chain | | Data Availability | Permanent (Archive) | Temporary (Blobs) | | Trust Assumption | Consensus-based | Sequencer/Upgrade Keys | | Throughput | Low (Gas limited) | High (Batch processing) |