Quick Memory Tour

Vitalik introduced the scalability trilemma, highlighting the challenge of balancing three key aspects: security, scalability, and decentralization.

This trilemma matters because a blockchain can't excel in all three areas at the same time. Improve one, and you're likely compromising another.

Ethereum L1 offers robust decentralization and security guarantees. Once data is finalized on L1, it is essentially immutable due to consensus mechanisms that prevent unauthorized changes. However, this security comes with limitations in speed and cost—Ethereum L1 is relatively slow and can be expensive to use.

Many scaling solutions, such as state channels, side chains, or alternative blockchains, were introduced to solve the scalability problem. However, these often compromise some level of security and decentralization to achieve scalability. Some solutions are application-specific, while others have validator centralization or security risks.

L2s tackle this problem by processing transactions off-chain but still relying on Ethereum L1 for final settlement and security. Transactions are bundled together on L2 and posted to L1, ensuring that the security of Ethereum’s Proof of Stake consensus is preserved while reducing the computational and financial load on L1. This enables Ethereum to remain scalable while still being secure.

Memory tour over, back to our question

If L2s can use Ethereum for security, why aren’t all of them using it?

Well, because Ethereum’s security isn’t free.

Here’s how it works: Ethereum ensures security for rollups by making data available and enforcing finality through its L1 consensus mechanism. But L2s have to pay for it:

  • Data Availability: Rollups (optimistic or zk-rollups) post transaction data to Ethereum L1. This guarantees that anyone can check the data to verify the rollup’s state. Optimistic rollups rely on Ethereum to provide fraud-proof data if there’s a dispute, while zk-rollups let Ethereum validate zk-proofs to ensure transactions are correct.
  • Finality and Proofs: Once a transaction or batch hits Ethereum L1, it's final. Optimistic rollups count on Ethereum for fraud proofs, while zk-rollups submit validity proofs that Ethereum verifies before finalizing transactions.

The Costs of Using Ethereum

To use Ethereum's security, rollups have to pay fees—calldata costs (posting data), proof verification fees (for fraud or zk-proofs), and gas fees to settle transactions. These costs ensure data availability and finality on Ethereum’s L1.

90% of Rollup Costs Go to Publishing Data on Ethereum L1

Posting and settling on Ethereum is significantly more expensive compared to alternative data availability (DA) layers and sovereign rollups. When the Dencun upgrade was introduced to reduce data availability costs, it helped initially, but now blob fees are increasing as usage approaches the target of 3 blobs per block.

Here’s the breakdown:

Blobs (introduced with EIP-4844) are a type of data storage designed to settle transactions on Layer 1 (L1) more cost-efficiently. Ethereum has set a target of 3 blobs per block:

  • More than 3 blobs: If a block exceeds 3 blobs, the blob base fee increases to manage demand and prevent overuse.
  • Blob Base Fee: Similar to EIP-1559, it adjusts based on supply and demand:
    • More than 3 blobs: Blob base fee increases.
    • Fewer than 3 blobs: Blob base fee decreases.

The increase in blob fees would occur if L2 usage and demand for blockspace grow significantly. As more applications and users migrate to L2s, the demand for data availability (DA) on Ethereum would rise, driving blob prices up naturally due to the higher competition for Ethereum's secure DA. This, in turn, would lead to increased ETH burn through higher fees.

The graph shows the average blob count trending toward the target of 3. If it consistently exceeds this target, users and L2 networks could face higher costs due to increasing blob base fees.

Is There a Solution to Ethereum security costs?

There are different variants of Layer 2s based on data availability approaches and settlement, ranging from rollups to plasma, validiums, Layer 3 (App-chains), and sovereign rollups.

1. Alternative Data Availability:

Alternative data availability blockchains can help reduce the cost of publishing data on a blockchain by storing data off-chain, which can improve throughput and scalability.

2. Layer3:

Layer3 can settle on L2(like Arbitum L2, Optimism L2 ) instead of directly settling to L1 makes transaction cost very less and avoid paying operating on top of Ethereum for settlement and DA cost.

3. Sovereign rollups:

A sovereign rollup is a type of blockchain that publishes its transactions to another blockchain, typically for ordering and data availability, but handles its own settlement.

Risks of Alternative Solutions

Using external data availability, sovereign rollups, or Layer 3 instead of Ethereum for settlement comes with several risks:

Centralization Concerns:

Some external data availability solutions, like Data Availability Committees (DACs), rely on a small group of pre-selected participants to guarantee data availability. This introduces trust assumptions and the risk of collusion, as these members could censor or withhold data.

Sovereignty: Rollups using external settlement may have their own validators or sequencers, which could centralize control, leading to weaker decentralization compared to Ethereum's open and permissionless network.

Liveness Failures:

Unavailable Data: If external data availability layers fail, users might not be able to access the data required for withdrawals, executing transactions, or generating proofs. In zk-rollups, this can result in a loss of liveness, meaning that transactions may not be processed in a timely manner, or users may be unable to withdraw funds.

Should We Compromise Security for Scaling?

The short answer is yes, because not all chains need the same level of security.

As Vitalik said, “Social media and gaming do not require the same security model as L1. It’s ok if someone can pay a million dollars to revert a record of them losing a chess game, or make one of your Twitter posts look like it was published three days after it actually was. And so these applications should not have to pay for the same security costs.”

When to Choose Security vs Scale?

As Layer 2 (L2) solutions evolve, developers and projects face an important tradeoff between security and scalability. Choosing one over the other depends largely on the specific needs of the application. Here's how you can navigate these choices:

Different types of layer 2s(https://vitalik.eth.limo/general/2023/10/31/l2types.html)

When to Prioritize Security

Security should be prioritized in applications where the integrity of assets or sensitive data is paramount. High-value financial applications or systems with sensitive information, such as asset management platforms, decentralized exchanges, and identity management systems, should aim for the highest level of security. This can be achieved by leveraging Ethereum’s robust Layer 1 (L1) consensus through rollups.

Key Scenarios:

  • Financial transactions: If a failure leads to significant monetary loss, a higher security level is non-negotiable.
  • Data immutability: Applications that require finality and trustless verification of state transitions (e.g., identity or legal contracts) should choose rollups that ensure secure withdrawal of assets to L1.
  • Compliance and governance-heavy applications: Ensuring transparency and immutability of data for audits or legal compliance mandates high security.

Rollups provide high security by using Ethereum’s L1 for data availability and settlement, ensuring that assets can always be returned to L1 if needed.

When to Prioritize Scalability

On the other hand, scalability becomes more important when applications need to handle large volumes of transactions with minimal latency and low fees, but without the strict need for maximal security. Non-financial applications, such as social media platforms or gaming, can afford to use less secure but faster systems to deliver a smooth user experience.

Key Scenarios:

  • Gaming and social applications: These frequently involve high-volume, low-value transactions (like in-game moves or social interactions). A chain failure might be an acceptable risk if the result is lower fees and faster interactions.
  • Social media: Posting and voting can tolerate lower security, but critical actions (e.g., username registration) may require stronger guarantees. Using a hybrid solution where some operations are secure while others prioritize speed may work well here.
  • High-throughput applications: Projects that prioritize fast, cheap interactions over financial guarantees will lean towards Alt DA or even separate chains. These systems reduce costs by storing data off-chain and provide security for only the most critical components.

Balancing Act: Choosing the Right Approach

Most applications won't fit perfectly into one category, and hybrid approaches can help balance the tradeoffs. For example:

  • Hybrid solutions: Combining elements of rollups and Alt DA can give applications the flexibility to choose security for high-value transactions and scalability for less critical ones.

Ultimately, the decision hinges on the consequences of failure. If mistakes or attacks can be catastrophic for users, security must come first. But if performance and cost are the priority, with minimal damage in the event of failure, scaling solutions are more appropriate.

By weighing the application's risk profile and user needs, projects can find the right balance between Ethereum's security and Layer 2 scalability.

References:

https://ethereum2077.substack.com/p/data-availability-in-ethereum-rollups

https://vitalik.eth.limo/general/2023/10/31/l2types.html