Rollups Operational Costs

Rollups Operational Costs

From the user perspective, every optimistic rollup transaction has two cost components: an L2 (execution) fee and an L1 (data) fee. At a high level, the L2 fee is the cost to execute the transactions on the L2, and the L1 fee is the estimated cost to publish transactions on L1 (in a rollup batch). While the L2 execution fee resembles the traditional fees on Ethereum (gas cost * gas price), the L1 data fee is unique to optimistic rollups because the transaction data for all rollup transactions must be published to Ethereum (or, in the future, other Data Availability layers, possibly making this fee component cheaper).

  • L2 execution fee. This is the amount paid to the rollup nodes as compensation for computational and storage costs incurred in processing transactions, much like gas fees on Ethereum. Currently, the node (Sequencer) is a single, centralized entity in most rollups, run by OP Foundation on Optimism and Offchain Labs on Arbitrum. Rollup nodes charge lower transaction fees since L2s have higher processing capacities and aren't faced with network congestions that force validators on Ethereum to prioritize transactions with higher fees. Importantly, in Optimism, the Sequencer only gets the priority fees, while the base fee is burned due to EIP-1559 implementation. On the contrary, Arbitrum currently implements a first-come-first-served policy and doesn’t have a public mempool, meaning there is no priority fee.

  • The L1 data fee covers the expense of publishing transaction data on L1, essentially representing the cost of ensuring Ethereum-equivalent security. Optimistic rollups publish transaction data and block headers (consisting of the previous block header hash, state root, batch root) to Ethereum as calldata. Optimistic rollups can mitigate the cost of writing data to L1 by consolidating multiple transactions into a single batch, thereby spreading the gas costs across multiple transactions. The L1 security fee is directed towards Ethereum block producers. Overall, the L1 fee depends on the size of the transaction in bytes, the current gas price on Ethereum, and several small parameters. Publishing data is expensive and makes up 80-90% of L2 users' transaction fees. In the case of Arbitrum, ArbOS dynamically adjusts the pricing of L1 gas to ensure that the amount collected in L1 gas fees closely aligns with the long-term costs that need to be covered.

L1 Fees Formulas

L1 fee formula for Optimism

L1 fee formula for Arbitrum

Tx Data Gas Cost in Optimism is the gas cost of the transaction given its size after compression. Fixed Overhead cost in Optimism is similar to Rewards in Arbitrum, and Dynamic Overhead is similar to Dynamic Adjustments.

It’s important to highlight that while L2 execution fees are a cost for users, they can be considered revenue for the L2 since the Sequencer is currently a single identity managed by the rollup itself, meaning the entirety of the L2 execution fees accrues to the L2’s treasury (Optimism uses these funds to support public goods). Therefore, when analyzing the cost structures and dynamics from the L2 perspective, only L1 data fees are considered.

The scatter plots below represent the relationship between the number of transactions versus the cost per transaction and the amount of posted calldata in Mb versus the cost per Mb.