Introduction:
The emergence of rollups as layer 2 scaling solutions for Ethereum has opened up exciting possibilities for transaction optimization through shared sequencing. By bundling transaction batches across multiple rollup chains and submitting single aggregated proofs in the same sequencer slot, shared sequencing enables rollups to divide the expenses for data availability and dispute resolution on Ethereum L1. This unlocks considerable gas cost savings and promotes seamless interoperability between chains utilizing the same sequencer.
However, shared sequencing presently faces roadblocks to widespread adoption. Ethereum's current transaction fee scheme, EIP-1559, dynamically calibrates a base fee for transactions based on congestion. This unpredictability in L1 costs complicates efforts for rollup providers to reliably account for volatility and coordinate equitable divisions when sequencing across multiple chains. Absent better techniques to manage fee estimation and allocation, shared sequencing remains financially precarious compared to dedicated sequencers.
As we actively look to invest in solutions for shared sequencing and in shared sequencers as the infrastructure itself, we believe a comprehensive study is, therefore, imperative on the Ethereum Fee Markets before proposing or implementing improvements in the rapidly evolving rollup ecosystem.
What are EIP-1559 & Shared Sequencers?
EIP-1559 introduced a new transaction pricing scheme to Ethereum consisting of a dynamically adjusting base fee and an optional priority fee "tip". The base fee algorithmically scales based on the current level of network congestion and demand for block space. Specifically, it targets having average block usage around 50% by comparing the gas consumed in the previous block to the target gas usage.
Rollups are L2 scaling solutions that perform transactions off-chain and generate cryptographic proofs to verify those transactions on Ethereum's main chain (L1). These proofs need to be submitted or "sequenced" to the Ethereum blockchain in batches by special nodes called sequencers. Sequencing a batch of transactions requires paying gas fees on L1 to submit the batch proof data. Shared sequencing refers to when multiple rollup chains coordinate to sequence a combined batch of transactions from their individual chains in the same L1 sequencer slot.
For example, rollups A, B, and C could share a single sequencer slot and submit transactions from all three chains as a single batched proof to Ethereum L1 in that slot. This allows the gas cost of sequencing to be shared among the different rollup chains, instead of them having to sequence individually.
Batching transactions from multiple rollups provides economies of scale and reduces the L1 costs per rollup. It also facilitates interoperability and transfer of assets across the different chains sharing the sequencer. In essence, sharing a sequencer slot allows rollups to bundle their transaction batches into a single aggregated proof to lower sequencing costs for each chain.
Shared sequencing offers a few key benefits for rollups.
By aggregating transactions across multiple chains into a combined batch for sequencing, gas expenditures on submitting the proof to L1 Ethereum are divided.
This provides economies of scale and drastically reduces the layer 1 costs per rollup for sequencing.
The gas savings are particularly relevant for newer or smaller rollup systems that may initially lack capital for their own dedicated sequencer slots.
At present, the fees rollups pay are calculated as follows:
gas fees (G) * no. of transactions (T)
Through shared sequencers, Rollups share the cost of batching transactions through
Total Fees (F) / No. of rollups (n) = F/n
Additionally, shared sequencing enables seamless transferring of assets and data between the multiple chains leveraging the same sequencer.
Users can port tokens between rollups sharing sequencing without needing to go through L1.
Bundling transactions into a joint proof from several chains also minimizes duplicated messaging overhead.
Rollups can further coordinate on utilizing a collectively trusted and reputable sequencer rather than relying on separate entities.
However, shared sequencing also faces a few adoption challenges presently.
Problem Statement:
When a rollup or shared sequencer prepares a transaction batch, they are essentially reserving a certain amount of space in future Ethereum layer 1 blocks to post the cryptographic proof for that batch. The sequencer doesn't know precisely which future block their batch will be included in. There is uncertainty in terms of:
How soon a block with enough space will be produced? Block times fluctuate due to Ethereum's proof-of-work variance.
What the base fee will be when their block arrives? Base fee is driven by overall network demand, which is unpredictable.
How much priority fee will be needed to outcompete other transactions? Priority fee bidding is basically an auction environment.
So when generating a batch, the sequencer is essentially placing a bet that they will be able to secure sufficient blockspace in a future L1 block to post their batch proof - without overpaying too much in priority fees1.
If demand spikes suddenly due to a trending NFT drop, network upgrades, or higher DApp activity, the sequencer may end up paying much higher base and priority fees per gas than they budgeted for. This makes sequencing on Ethereum a probabilistic activity, where the sequencer is wagering they can win future blockspace at an acceptable price point. EIP-1559's volatile base fee just amplifies the financial uncertainty. Add this to multiple rollups using a common sequencer (Shared Sequencing); the same problem amplifies for each participating rollup.
As a retail user, you might say that the fees for using most rollups are minimal, but from an economic cost point of view, it is important to understand that rollups process hundreds of thousands of transactions every day, and even a slight volatility in fees for batching these transactions can add up a massive expenditure to their treasury.
Our thought process behind this:
We at L2IV feel that Ethereum's prevailing transaction fee mechanism, EIP-1559, is critical to examine to comprehend the challenges faced in implementing shared sequencing across multiple rollup chains.
Analyzing EIP-1559 reveals the precise limitations posed in designing mechanisms for fairly accounting and distributing sequencing costs across diverse rollup chains. More broadly, Ethereum's fee dynamics play an instrumental role in determining batch sizes, frequencies, and, ultimately, the viability of scaling solutions like shared sequencing for rollups.
We believe that examining EIP-1559's lack of differentiation between transaction types and urgency levels during congestion is an important context. This blanket approach amplifies issues for a heterogeneous shared sequencing system.
To understand it better, Let's see how Ethereum’s fee market & mechanisms have evolved over the years:
EIP-1559's dynamic fee model and how it complicates fee estimation:
With a target of having an average block usage of around 50%, If usage is above the target, the base fee increases for the next block. If below target, it decreases.
This adaptive mechanism leads to volatility in the base fee component of transaction costs. During periods of sustained high activity, the base fee can spike rapidly as the network becomes congested. When demand is lower, the base fee declines. This variability and unpredictability in the base fee makes it challenging for users and rollup providers to reliably estimate overall transaction costs into the future. The optional tip can also fluctuate dynamically based on users' urgency and willingness to pay extra for priority inclusion. The volatility in both base fees and tips adds significant uncertainty into fee forecasting.
Challenges EIP-1559's unpredictable fees create for shared sequencing across multiple rollups
Though EIP-1559's base fee aimed to increase predictability, rollups still confront volatility in Layer 1 expenditures stemming from fluctuating network activity. Reserves become necessary to buffer spikes, notwithstanding the base fee.
Additionally, predicting congestion and resultant gas fees grows increasingly complex as Ethereum gains traction. External events can prompt sudden surges, fueling innate unpredictability. For shared sequencers coordinating multiple rollups, each with unique traffic affecting variability, this compounds complexities exponentially.
As you can see above (oversimplified visual explanation),
In scenario 1, the rollups can reliably predict the L1 costs for a shared batch since the base fee is stable. Easy to coordinate fee splits.
In scenario 2, unpredictable spikes in base fees driven by one rollup can drastically exceed cost estimates for other rollups in the batch. Hard to coordinate equitable splits. Providers may need to over-budget L1 costs under fluctuating base fee model to hedge against volatility risk.
Dedicated sequencing in scenario 3 allows a single rollup to absorb fluctuations in base fee within its own transaction mix. More internal predictability. Drawbacks of dedicated sequencing include reduced interoperability and higher overall L1 costs vs sharing.
Mathematically, If we had to show how this works, this is how it would be.
Note: It's simplified:
The fee calculations are sound and illustrate the right incentives.
But real-world values would be different based on current network conditions and rollup operating parameters.
The overall economic effects and sequencing challenges remain the same.
For precise estimates, we'd need to plug in current gas prices, actual batch sizes, calldata costs, etc., which would make it more complicated.
Let's define the variables first:
B or B(t) is the base fee set by Ethereum based on congestion. It is burned under EIP-1559.
B(t+1) is the adjusted base fee for the next block, which changes dynamically.
n is the number of rollups sharing the L1 fee. Rollups batch transactions off-chain.
F or F(t) is the total L1 fee for the block that compensates for processing rollup data.
T is the number of transactions in a rollup batch.
G is the gas required per transaction in the batch.
P is the priority fee that users can pay miners to prioritize transactions.
1. Shared Sequencing without EIP-1559's Fluctuations:
Formulas:
1. Total gas for the rollup's batch: Total Gas = G * T
2. Gas fee for the rollup's batch: Gas Fee = Total Gas * B
3. L1 Fee contribution per rollup: L1 Fee = (F/n) * T
4. Total fee for the rollup's batch: Total Fee = Gas Fee + L1 Fee
Explanation:
( G * T ) gives the total gas used by all transactions in the rollup.
Multiplying the total gas by the base fee ( B ) provides the total fee just from gas usage.
The L1 fee is shared equally among the rollups, hence (F/n). This is multiplied by the number of transactions to get the total L1 fee for the rollup.
Finally, the gas fee and the L1 fee are added together to get the total fee for the rollup.
Calculations:
1. Total Gas = 21,000 * 1,000 = 21,000,000 gas (Note: 21,000 is standard gas used in a tx)
2. Gas Fee = 21,000,000 * 20 = 420,000,000 Gwei
3. L1 Fee = (90/3) * 1,000 = 30,000 Gwei
4. Total Fee = 420,000,000 + 30,000 = 420,030,000 Gwei or 0.42003 ETH (1 ETH = 10^9 gwei)
2. Shared Sequencing with EIP-1559's Fluctuations:
Formulas:
(Same as above)
Gas fee for the rollup causing the spike: Gas Fee (Spike) = Total Gas * B(t+1)
Priority Fee for the rollup causing the spike: Priority Fee = P * T
Total fee for the rollup causing the spike: Total Fee (Spike) = Gas Fee (Spike) + Priority Fee
Gas fee for other rollups: Same as Gas Fee (Spike)
Total fee for other rollups: Total Fee (Other) = Gas Fee (Spike) + L1 Fee
Explanation:
The gas fee for the rollup causing the spike uses the new base fee ( B(t+1) ) because we assume it influenced the next base fee.
The priority fee is added due to the spike in gas price.
The other rollups pay the same gas fee but don't have the additional priority fee.
Calculations:
(Same as scenario 1)
Gas Fee (Spike) = 21,000,000 * 25 = 525,000,000 Gwei
Priority Fee = 10 x 1,000 = 10,000 Gwei
Total Fee (Spike) = 525,000,000 + 10,000 = 525,010,000 Gwei or 0.52501 ETH
(Same as above)
Total Fee (Other) = 525,000,000 + 30,000 = 525,030,000 Gwei or 0.52503 ETH
3. Dedicated Sequencing with EIP-1559's Fluctuations:
Formulas:
(Same as above)
Gas fee for the rollup: Gas Fee = Total Gas x B(t+1)
Priority Fee = P x T
Total Fee = Gas Fee + Priority Fee
Explanation: Similar to the second scenario but without the need to consider multiple rollups. The gas fee uses the new base fee B(t+1).
Calculations:
(Same as above)
Gas Fee = 21,000,000 x 24 = 504,000,000 Gwei
Priority Fee = 5 x 1,000 = 5,000 Gwei
Total Fee = 504,000,000 + 5,000 = 504,005,000 Gwei or 0.504005 ETH
Based on these sample scenarios, we can make a few key inferences:
EIP-1559's unpredictable base fee spikes increase costs for rollups sharing a sequencer. When one causes a spike, others pay more too.
Dedicated sequencing isolates a rollup from spikes by others. Their costs follow base fee changes caused by their own load.
In times of high demand, sequencing batches requires overpaying. Forecasting precise fees is difficult.
Real-world conditions like current gas prices and rollup parameters would change the numbers. But the overall effects remain.
The calculations demonstrate the economic incentives and tradeoffs for rollups under volatile base fees.
The primary mechanism for this adjustment in EIP-1559 is:
But we’ve simplified it for better understanding. (check appendix)
The financial uncertainties introduced by EIP-1559's fluctuating base fee and tips, therefore serve as a key deterrent to sharing sequencer slots across rollup chains. Dedicated sequencers with more predictable L1 costs become attractive compared to the risks of variability exceeding budgets mid-sequencing in a shared batch.
For example:
In May 2022, a spike in Ethereum L1 base fee led to a rise in Optimism gas fees by 3-5x for several days. Average L2 fees rose from $0.2 to $1 per transaction due to congestion on L1. Optimism charges a flat fee per transaction, regardless of the gas usage or complexity. Optimism also uses sequencer batching, which allows the sequencer to batch multiple transactions into a single L1 transaction, reducing the L1 costs per transaction. However, this mechanism still depends on the base fee and tips on L1. This caused concerns about the impacts of L1 base fee variability on predictable L2 costs.
This was before the Optimism Bedrock upgrade, which introduced base fees and priority fees and Optimized the data compression strategy, which reduced the L1 data fees by 40% and removed all mainnet execution gas.After the Ethereum merge in September 2022, zkSync fees rose 60-100% for several weeks due to increased activity and base fee on L1. Average L2 fees increased from $0.02 to $0.04 per transfer and from $1.59 to $3.18 per withdrawal. zkSync charges a variable fee per transaction, depending on the gas usage, complexity, and data availability. zkSync also uses fee smoothing, which allows users to pay a fixed fee in advance for a certain number of transactions, reducing the fee volatility for users. However, this mechanism still requires users to pay an activation fee on L1 for each token they want to use on L2. This led to zkSync having to subsidize fees for users to offset the unexpected spike. This demonstrated the effects of EIP-1559’s dynamic base fee on sequencing expenses.
Formalizing EIP-1559's Lack of Differentiation
To further complement what we've explained so far, a recent paper by Kiayias et al. titled “Tiered Mechanisms for Blockchain Transaction Fees” highlighted fundamental limitations in Ethereum's prevailing EIP-1559 transaction fee mechanism when it comes to accommodating diverse transaction types and priorities during periods of sustained congestion.
The paper makes the case that EIP-1559 has shortcomings in accommodating diverse types of transactions and controlling gas costs. This also connects to difficulties for shared sequencing across rollups in a few ways. The authors also introduced a tiered pricing mechanism proposed with multiple tiers, each with a different delay and price. Users select which tier to submit their transaction based on their urgency.
According to the research, during congestion, EIP-1559 prioritizes high-fee urgent transactions by pricing out lower-value transactions through substantial base fee hikes. However, this does not actually assist in reducing overall gas expenditures, since costs can still spike erratically based on shifting network demand. In prolonged periods of heavy usage, the base fee will persistently rise to exclude transactions, even low-urgency use cases.
Therefore, EIP-1559 fails to address the core driver of spiking gas fees - limited throughput. It takes a blanket one-size-fits-all approach. For shared sequencing systems, this implies rollup providers still encounter unpredictable spikes in Layer 1 expenses when demand escalates, even after EIP-1559's introduction. The volatility in base fees amplifies risks of overestimating sequencing overheads across multiple rollups.
EIP-1559's uncertain fee dynamics thus do not offer the L1 cost predictability essential for dependable shared sequencing. In essence, the paper contends EIP-1559 has not reliably curbed mounting gas costs. Its unpredictability and lack of differentiation between transaction types also impede cross-rollup solutions. Rethinking fee designs could potentially address both constraints.
To support this, the paper provides both theoretical proof and an experimental demonstration that EIP-1559 cannot accommodate diverse transaction types and priorities
To keep things simple, here is a simpler explanation of Proposition 2 (pg 7) and the experiments (pg 19) showing EIP-1559's limitations:
Proposition 2 Proof:
Imagine there are two main transaction types on Ethereum:
Urgent transactions that need to go in the next block. Worth $2 to users.
Less urgent transactions okay waiting a bit. Worth $1.50 next block or $1 if delayed.
Say we want 20% of space for less urgent type 2 transactions. Can EIP-1559 do this?
No, because EIP-1559 always prioritizes transactions that pay more fees for fastest inclusion.
The urgent transactions will pay more to get in the next block. So they will crowd out all the less urgent transactions during congestion.
This formally proves EIP-1559 can't reserve space for less urgent transaction types. It always prioritizes those paying immediate high fees.
Experiments:
The researchers simulated a mix of urgent, medium urgent and less urgent transactions.
When congestion spiked, EIP-1559 raised fees similarly for all transaction types. Less urgent were priced out.
Their proposed tiered pricing kept fees lower for less urgent transactions during congestion.
The simulations show EIP-1559 can't implement differential pricing based on urgency. All transactions see similar fee spikes. The tiered pricing could keep fees lower for less urgent transactions, accommodating diversity.
So, what are the proposed solutions?
Potential solutions like EIP-4844 could enhance predictability of data availability costs for shared sequencing across rollups. Cheaper blob transactions facilitate estimating total L1 expenses.
Exploring alternative L1 pricing models like the paper's proposed tiered approach is also worthwhile. Tiered pricing provides stability by separating transactions into predefined urgency tiers with policies to accommodate diversity. This predictable segmented pricing simplifies estimating cost splits for batches across chains.
Formal mechanisms for allocating fees per rollup in a shared batch will provide needed certainty. Strategies like redistribution based on tiers and fixed pricing enable viable batch cost splitting.
Using Solana as an execution layer reduces computing costs and adds predictability within batches. By offloading execution off Ethereum, variability stems only from data availability. However, Solana does not eliminate volatile L1 base fees.
Conclusion:
In closing, this analysis highlights tangible roadblocks EIP-1559 creates for shared sequencing, with its volatile and hard-to-predict fees. Estimating and dividing sequencing costs across diverse rollup chains becomes highly impractical. Realizing shared sequencing's full potential in gas savings and interoperability requires rethinking fee designs for stability.
Encouragingly, innovations like EIP-4844, tiered pricing, and batch fee distributions offer paths to smooth volatility enabling equitable rollup coordination. As Ethereum evolves, balancing predictability, efficiency and inclusion is key to unlock innovations like shared sequencing. With focused improvements, shared sequencers can become viable - unleashing immense collaborative value across Ethereum's scaling ecosystem.
The synergies of collaboration outweigh isolated progress. Resolving EIP-1559's limitations is instrumental to unleash shared sequencing's possibilities. With enhancements, Ethereum can smoothly traverse volatility into a future of cross-chain cooperation and collective growth.
Next week, we will dive deep into the next proposed and updated fee mechanism EIP-4844 in detail.
If you are building in this space, please reach out to us.
Appendix:
The primary mechanism for this adjustment in EIP-1559 is:
Where:
B(t) is the base fee of the current block.
B(t+1) is the base fee for the next block.
Gas Used is the total gas used in the current block.
Target Gas is the target gas for the block, often set at 50% of the block gas limit.
BASE_FEE_MAX_CHANGE is a constant that determines the maximum percentage change allowed from one block to the next (to prevent overly drastic changes).
This formula is not explicitly mentioned in the EIP-1559 document. However, it provides a common representation of the base fee adjustment mechanism in EIP-1559, which automatically adjusts the base fee based on demand.
If a block is 100% full, the base fee will rise by a percentage specified by BASE_FEE_MAX_CHANGE.
If a block is only 50% full (hitting the target exactly), the base fee remains unchanged.
If the block is less full than the target, the base fee will decrease.
It's important to note that while this mechanism helps make gas fees more predictable, it doesn't guarantee cheaper fees. During times of high demand, fees can still rise significantly.
However, with EIP-1559, users can better anticipate what the correct fee should be, reducing the previous uncertainties and often high overpayments seen in the auction-based fee system that Ethereum used before EIP-1559. But as we explained earlier, the lack of differentiation in EIP-1559's fee mechanism during congestion exacerbates the issues, as it spikes fees similarly for all transaction types regardless of urgency or priority.
Find L2IV at l2iterative.com and on Twitter l2iterative
Author: Arhat Bhagwatkar, Research Analyst, L2IV (@0xArhat)
Additional Reads
Disclaimer: This content is provided for informational purposes only and should not be relied upon as legal, business, investment, or tax advice. You should consult your own advisers as to those matters. References to any securities or digital assets are for illustrative purposes only, and do not constitute an investment recommendation or offer to provide investment advisory services.
the aggregate revenue for the shared sequencer batch is the total fees collected from all transactions across the different rollup chains in that batch, which includes
tx fees paid by users within each rollup
L2 computation fees charged by the individual rollups
the aggregate cost paid by the sequencer is what must be paid to post the batch proof and data to Ethereum L1, which primarily includes:
DA gas fees for submitting the proof
any dispute resolution fees if needed (fraud proofs for optimistic rollups)
so essentially, the shared sequencer is betting that the total revenue collected from the transactions in the batch will exceed the costs of posting the batch to L1.
their "profit" is the revenue minus the L1 costs. the more chains that share the sequencer, the more revenue is aggregated and the lower the average L1 cost per transaction.