Which L2 solution has more potential? Which ZK Rollup is more interesting?

Assessing the Potential of L2 Solutions Which ZK Rollup Stands Out?

Author: Starknet OG

Overview

It is now clear that Ethereum has emerged as the winner in the battle for an alternative L1. However, Ethereum itself faces limitations and scalability issues that hinder the widespread adoption of its network. Originally designed as a monolithic blockchain where everything must be executed on a single layer, its larger scale usage has shown that a monolithic blockchain cannot effectively achieve decentralization, security, and scalability all at once.

Therefore, Ethereum is now shifting towards a “Rollup-centric” approach. In this approach, Ethereum is seen as the settlement layer while transaction execution happens only on L2 (Layer 2). This shift allows Ethereum to move from a monolithic logic to modular logic.

Assuming Ethereum has already won the battle for an alternative L1, and the new focus area is L2, then it is necessary to ask:

Which L2 solution seems more promising, why, and what is its ecosystem like?

To answer this question, I have decided to divide my work into three articles.

The first article will focus on the first part of the question, covering the following:

  • I/ Why L2?

    A. Basics: L1, L2, and the Blockchain Trilemma

    B. What are Ethereum’s scalability issues and why do they occur?

    C. Why can Ethereum win the battle for an alternative L1?

    D. What are the scalability solutions for Ethereum?

  • II/ The L2 Landscape

    A. Different types of L2 solutions

    B. Optimistic Rollups vs ZK Rollups

    C. Which solution is better: Optimistic or ZK?

  • III/ ZK Rollups and Different Types

    A. What is ZK proof? (ELI5)

    B. What is the connection between ETH and ZK?

    C. What are the different types of zkEVM?

    D. In the long run, which ZK Rollup is more interesting and promising?

This will allow me to explain the thought process behind my conclusion and introduce my second article, which will focus on explaining what Starknet is (yes, I spoiled my conclusion in the introduction).

Of course, this conclusion represents only my personal opinion. This article does not constitute any financial advice. It is crucial for you to always question the content you read and conduct your own research!

With that in mind, let’s dive deep into the first article!

I/ Why L2?

A. Basics: L1, L2, and the Blockchain Trilemma

Before we begin, let’s briefly explain what Layer 1 (L1) and Layer 2 (L2) are.

The term L1 refers to the primary architecture of a blockchain that supports block creation, validation, consensus, execution, and data storage. On the other hand, the L2 network is built on top of L1 and overlays it. In simple terms, L2 represents the scalability extension of Ethereum, providing greater scalability through faster and more cost-effective transactions without compromising the security of the main chain. This is because L2 inherits the security and consensus of L1.

Therefore, as explained in the introduction, we quickly find that a monolithic blockchain cannot effectively scale while prioritizing scalability, security, and decentralization.

Scalability refers to the ability of an IT system to adapt to demand fluctuations while retaining its different functionalities. In the context of blockchain, this means that it must be able to accommodate an increasing number of users on the network without sacrificing speed or transaction efficiency. In other words, scalability represents the ability of a blockchain to scale rapidly and inexpensively, regardless of the transaction volume on the network.

In my view, decentralization consists of four elements: infrastructure, nodes, developers, and token holders. To achieve true decentralization in a blockchain, all four elements must be considered. A decentralized blockchain operates in these four aspects without relying on the trust of a centralized group of participants, making it censorship-resistant.

Security is the ability of a network to withstand attacks from malicious entities. Specifically, a blockchain must be able to withstand a high proportion of nodes attempting to attack it. Vitalik suggested that 50% is perfect, 25% is acceptable, and 5% is not.

Therefore, the crypto ecosystem quickly realized that a blockchain can only satisfy two out of the three elements simultaneously. This problem is known as the blockchain trilemma, theorized by Vitalik.

https://vitalik.ca/general/2021/04/07/sharding.html

This trilemma emphasizes the need to make choices and sacrifice one element, as adding a variable comes at the expense of the other two variables. Considering the following scenarios, this is particularly detrimental:

  • Scalability is a fundamental element for mass adoption.

  • Decentralization is crucial in preventing the censorship that frequently occurs in traditional financial systems.

  • Security is the core element in preventing system failures; without it, the previous two elements lose their significance.

Therefore, ETH decided to focus on decentralization and security at the expense of scalability.

B. What are the scalability issues with ETH? Why do these problems arise?

Blockchain scalability refers to the ability of a network to accommodate more users and transactions without sacrificing speed or increasing costs.

ETH’s structure is limited and can only process about 30 transactions per second. A new ETH block is created approximately every 12 seconds, and each block has a size limit of 30 million Gas. Gas is the unit of measurement used to quantify the resources used in transactions and determine the ETH fees that need to be paid.

However, as the demand for the ETH network increases over time, users are competing to process transactions quickly and avoid long waiting times. This competition significantly increases transaction fees and wait times on the network.

Here are some numbers that help understand the issue:

  • Number of pending transactions on ETH:

https://etherscan.io/

  • Average fees on ETH:

https://bitinfocharts.com/comparison/ethereum-transactionfees.html#3y

During the NFT craze in 2021, transaction fees reached over $200. Currently, the average transaction fee is around $10, which is still too high.

https://etherscan.io/

Therefore, when the ETH blockchain becomes congested (i.e., demand for processing transactions exceeds network capacity), users have two choices: pay higher fees or wait longer by trying to submit transactions below the average fee or during non-peak times (which can be easily identified on the website: ultrasonic.money).

Scalability is one of the main reasons why many L1 blockchains (such as BSC, SOL, ELROND, etc.) have emerged to compete with ETH. However, several solutions have been developed to address ETH’s scalability issues in the long run. Soon, we will explore these solutions. First, let’s understand why ETH emerged as the winner in the battle against these competitive L1 blockchains.

C. Why ETH won the L1 war

First, I want to clarify that in this statement, I exclude BTC. I consider BTC to be a complement to ETH, not a competitor. They have fundamentally different value propositions: Bitcoin can be seen as decentralized digital gold, representing the hardest money ever, while Ethereum is a decentralized world computer. Similarly, I think of BTC as gold and ETH as the Nasdaq of cryptocurrencies. Now let’s refocus on our topic.

I believe ETH won the L1 war for three main reasons.

1) ETH ranks first in both user and developer metrics

When it comes to users, the situation is clear. Despite the emergence of many highly scalable L1 solutions, ETH still dominates, occupying over 58% of the total market value locked (TVL).

https://defillama.com/chains

In addition, four out of the six chains with high TVL belong to the ETH ecosystem:

https://defillama.com/chains

Arbitrum and Optimism are Optimistic Rollups based on Ethereum security, while Polygon is a sidechain. When Layer-2 solutions are added to the equation, the ETH ecosystem accounts for about 70% of TVL.

Similarly, in terms of developers, as proven by the Electric Capital report, Ethereum remains an ecosystem with a vast talent pool.

  • Number of full-time developers

  • Total number of developers

  • Growth of developers from 2018 to 2022

  • Standardized daily initial commits (full-time developers)

  • Growth of ETH and the ecosystem compared to other L1-L2 EVMs

  • Developers in the DeFi ecosystem

Therefore, in two important metrics, ETH remains a vast ecosystem so far: developers building the ecosystem and applications used by users, and users who demonstrate economic interests.

2) L1 solutions aiming to be “ETH killers” have made significant compromises in decentralization or security

(Data as of mid-2022)

For me, a non-decentralized blockchain doesn’t make sense because centralized blockchains have no benefits. Blockchain is a slow and expensive network, and its real advantage lies in decentralization and censorship resistance. If a centralized network is needed, it’s better to turn to traditional Web2 solutions that are more efficient.

Furthermore, it’s worth noting that many highly scalable blockchains have encountered issues when usage starts to increase. For example, Solana has faced numerous liveliness problems, while BSC and AVAX have encountered fee explosion issues.

On the other hand, sacrificing security backfires because without security, participants have no motivation to engage in the ecosystem when the sword of Damocles is constantly hanging over their heads. Moreover, if a blockchain can collapse and be compromised at any time, what’s the point of building a decentralized and scalable blockchain?

When considering the trade-offs in the trilemma of blockchain, decentralization and security are the only consistent choices. Bitcoin and Ethereum have both made this choice.

3_ ETH, like BTC, is a trusted settlement layer in the market because it meets all necessary prerequisites.

A robust settlement layer is an important component of L2. It should be decentralized, censorship-resistant, secure, powerful, and available 24/7. This ensures that transactions can be processed smoothly and uninterrupted. Currently, there are only two cryptocurrencies in the market that meet all these criteria: ETH and BTC.

Decentralization is particularly important, as it means no central authority controls the system, making it more difficult for any group to manipulate or censor transactions. Censorship resistance is also crucial, as it ensures that no one can halt the processing of transactions. Security and robustness are necessary to protect the system from attacks and ensure it can handle a large volume of transactions. Furthermore, 24/7 availability is important because transactions can occur at any time and the settlement layer must be able to process all of them.

Therefore, ETH fulfills all these requirements. However, to understand the importance of this, it is necessary to first explain what a settlement layer is and what the preferred solutions are for addressing ETH’s scalability issues.

D. What are the solutions to Ethereum’s scalability issues?

As mentioned earlier, ETH is addressing its scalability issues by transitioning from a single-layer approach to a modular approach.

A single blockchain is a blockchain that performs all blockchain functions on a single layer:

  • Execution: processing and executing transactions

  • Settlement: achieving consensus on the agreed state

  • Consensus: reaching agreement on the order of messages and transactions

  • Data validity: ensuring data that can be published, visible, and accessible by everyone

The overall approach of blockchain cannot solve the three variables of the trilemma. To address this problem, ETH proposes offloading transaction execution to other layers, known as L2 solutions. These solutions are built on top of ETH, leveraging its security and consensus while offering greater efficiency than ETH.

To achieve this goal, Ethereum is now focusing on a “Rollup-centric” approach. In this approach, all user transactions are processed on L2 series Rollups, while the ETH layer serves only L2. ETH’s aim is to ensure decentralization, security, and data availability, meeting L2’s requirements, while L2 ensures scalability and speed, meeting user demands.

Currently, L2 fees are much lower than ETH:

http://l2fees.info

This partially solves Ethereum’s scalability issues. However, Vitalik believes that these fees must be below $0.05 to truly be acceptable for ordinary users.

Currently, aggregating data through data calls consumes a large amount of data on L1, which makes the cost of solving these aggregations on Ethereum very high. These call data accounts for about 90% of L2 fees.

Proto Danksharding (EIP-4488) can help achieve Vitalik’s goal by introducing a new storage fee market. This can significantly reduce aggregation costs. To learn more about Proto Danksharding, I recommend reading this article.

In summary, this implementation will result in a significant reduction in costs.

This will allow ETH to provide a secure and decentralized environment for users, while also offering low-cost and fast transactions. The L2 environment is where most of the development, innovation, and utilization will likely take place in the near future.

In fact, the current situation is already such that the usage metrics in Coingecko’s analysis prove this point.

Compared to other L1 blockchains, this further strengthens ETH’s position.

Now let’s examine each type of L2 solution and determine which one has potential.

II/ L2 Landscape

A. Different Types of L2

1) Sidechains

Sidechains are parallel chains of Ethereum that operate independently with their own consensus, security, and bi-directional bridges to Ethereum. Sidechains are considered L2 rather than L1 because they regularly send activity reports to ETH. This design provides greater resilience in case of network issues.

https://www.coindesk.com/learn/an-introduction-to-sidechains/

Sidechains offer multiple advantages, including fast and low-cost transactions, as well as the ability to build complex DeFi applications. However, their main limitation is that they rely on their own security rather than ETH’s security.

Prominent sidechains include Polygon and Gnosis.

2) Plasma

Plasma chains are chains that use Merkle trees to create an infinite number of sub-chains, which are smaller replicas of the Ethereum parent blockchain.

In essence, plasma chains only handle a portion of the ETH Merkle tree, rather than the entire tree. This allows for faster transaction processing and reduces the processing costs on the Ethereum main chain. These chains use fraud proofs (which we will discuss further with Optimistic Rollups) to ensure their security.

https://changelly.com/blog/layer-2-in-crypto/

The advantages of plasma chains are speed, low cost, and the ability to handle transactions between arbitrary participants. However, their main drawback is that this solution is only suitable for simple use cases like asset transfers and not well-suited for complex DeFi applications. Additionally, the network requires ongoing monitoring, and users have to wait several days for fund withdrawals due to the operations of fraud proofs.

The well-known Plasma Chain is the OMG Network.

3) State Channels

A state channel is a network that allows the creation of multiple channels for executing transactions outside of Layer 1 (L1). The principle is that two participants open a channel, conduct multiple transactions within the channel, update the balance state, and then close the channel when the transactions are completed. This allows for multiple transactions with only two transactions on L1: the channel opening transaction, indicating the balance of each participant, and the channel closing transaction, indicating the exchanged balance of each participant.

Blockchain Scalability: State Channels, Sidechains & more…

This enables the execution of a large number of transactions quickly and at a very low cost. However, the structure of channels is limited, as opening new channels is required each time there is an exchange with a new party. There are solutions that allow for indirect connections and transactions between channels, but there are still many limitations. Furthermore, state channels are only suitable for simple transfers and cannot be used for complex DeFi operations.

The well-known state channel is the Lightning Network for Bitcoin.

4) Rollups

Rollup is a chain connected to ETH on Layer 1 through a smart contract that maintains the state root of what happens on the Rollup. The idea is to move some transactions off of Layer 1 and send only the essential information about those transactions in a compact form on this Layer 1 smart contract.

In a simplified manner, a large number of transactions occur on Layer 2 (L2), and then these transactions are batched and sent as a single transaction to the Layer 1 smart contract. The smart contract then verifies the validity of the state.

Rollups are more attractive compared to the previously mentioned L2 solutions because they combine the advantages of all previous L2 categories and address their drawbacks. In fact, Rollups enable fast and low-cost transactions, relying on the security of ETH, both for simple transactions like exchanges and transfers, as well as for complex transactions to build a complete DeFi ecosystem.

The answer to our question (which L2 solution has potential) lies in Rollups, as they surpass all other categories of L2. This is why ETH is focusing on adopting Rollups.

B. Optimistic Rollups and ZK Rollups

Rollups are divided into two types based on the proofs submitted to Layer 1: Optimistic Rollups, which use fraud proofs, and ZK Rollups, which use validity proofs.

1) Optimistic Rollups:

Optimistic Rollups are named so because they adopt an optimistic approach, assuming all transactions are valid unless proven otherwise. To ensure the security of these transactions, a dispute period is implemented, typically lasting 7 days (for Arbitrum and Optimism). During this period, anyone on the network can submit fraud proofs to cancel any changes made within a block, proving that a participant cheated on the network. The actor will be penalized by losing the assets they staked (slashing). On the other hand, if there is no response after the 7-day dispute period, the block is considered validated, and this validation is irreversible.

This system operates under the assumption that at least one person will detect and report fraudulent behavior. Therefore, optimistic rollups can be protected by a single honest participant on the network.

Compared to ZK rollups, optimistic rollups have several advantages. They have a simpler architecture, making them easier to implement, and they are compatible with the Ethereum Virtual Machine (EVM).

However, the controversial dispute period caused by fraud proofs is a significant drawback for many use cases. In practice, users usually do not want to wait 7 days to transfer assets between L2 and L1. Third-party bridges like Hop can provide liquidity and bypass the dispute period at the cost of fees. However, certain applications (such as NFTs) cannot bypass the dispute period.

Arbitrum, Optimism, Base (by Coinbase), and Metis are among the well-known optimistic rollups.

2) ZK Rollups

Rollups use mathematically based validity proofs to ensure network security. Transactions are executed on L2 and then batched together (i.e., compressed grouping). The aggregator then executes and generates an irrefutable mathematical proof of that execution. This proof is sent to the L1 contract, where Ethereum can instantly verify its mathematical validity and determine the validity and honesty of the computation.

Therefore, each batch sent to the main chain contains a cryptographic proof that can verify and validate the accuracy of the final state within the batch without leaking any detailed transaction information. As a result, smart contracts on L1 only need to validate this proof.

The beauty of ZK rollups lies in the ability to verify computations without re-executing them. Instead of having all nodes execute the computation, there is a very powerful entity that performs the transactions, and the nodes only verify the validity of the proofs sent by that entity. Similarly, it functions like solving puzzles or Sudoku: it takes time to complete but is quick to verify.

The main advantages of ZK rollups are that they rely entirely on mathematics rather than market participants, which brings more security. Additionally, transactions can be executed without waiting for a dispute period. However, implementing ZK rollups is more challenging, and it is difficult to make them compatible with EVM since Ethereum was not originally built to natively support zero-knowledge proof generation.

Some well-known ZK rollups include Starknet, StarkEx, zkSync, Scroll, Linea, and Taiko.

It should be clarified that L2 “ZK” is actually Validity Rollups instead of ZK, as they prove the execution of transactions without introducing zero-knowledge aspects. However, plans are in place to add this privacy layer later on.

Rollup is currently the better L2 solution, but which rollup series is more effective?

C. Optimization: Optimistic or ZK?

According to Vitalik himself, ZK rollups are better suited than optimistic rollups and are expected to prevail in the long run:

My point is, in the long run, ZK-Rollup will eventually beat Optimistic Rollup because they have fundamental advantages, such as not requiring users to wait 7 days for withdrawals.

Vitalik Buterin, https://www.bsc.news/post/vitalik-zk-rollup-will-beat-optimistic-in-ethereum-scaling-war

In general, my own opinion is that in the short term, Optimistic Rollup may win in general EVM computation, while ZK-Rollup may win in simple payments, exchanges, and other application-specific use cases. However, with the improvement of ZK-SNARK technology, ZK rollups will win in all use cases in the medium to long term.

Vitalik Buterin, https://vitalik.ca/general/2021/01/05/rollup.html

Currently, Optimistic Rollups are widely adopted and used L2 solutions. Their architecture is simpler and easier to implement compared to ZK Rollups, and they do not have compatibility issues with the EVM like ZK Rollups do. Therefore, it takes longer to build efficient, ready-to-use, and scalable L2 solutions using ZK Rollups.

Optimistic Rollups have taken advantage of this and have gained a privileged position in the market. This position is well-deserved as they are currently the effective and scalable general L2 solution. However, many believe that in the long run, Optimistic Rollups will migrate to ZK Rollups or simply be replaced by validity proofs instead of fraud proofs.

Source:

Why? In short, ZK Rollups have many advantages over Optimistic Rollups.

First and foremost, ZK Rollups do not rely on the assumption that there needs to be at least one honest participant on the network to ensure security. Instead, ZK Rollups rely solely on mathematics, making the network objectively more secure.

In addition, ZK Rollups do not require a dispute period to guarantee network security. Therefore, the withdrawal period for ZK Rollups is very fast, while Optimistic Rollup currently takes about 1 week (the shorter the period, the lower the network security).

ZK Rollups have a much higher theoretical throughput than Optimistic Rollups. Due to fewer data needing to be sent to L1, transaction speeds are faster and costs are lower. Additionally, the on-chain costs of Optimistic Rollups are linearly related to the number of transactions, while the on-chain costs of ZK Rollups are linearly related to the number of users, giving ZK Rollups a significant advantage.

When considering the main advantages of Optimistic Rollup, it is important to note that they only provide short-term gains. Currently, Optimistic Rollups are easier to build. However, over time, with further discoveries and research on ZK Rollups, building ZK Rollups becomes less challenging. Secondly, Optimistic Rollups are easily compatible with the Ethereum Virtual Machine, but zkEVM is currently working on achieving compatibility between EVM and ZK Rollups.

Unlike Optimistic Rollups, ZK Rollups introduce privacy through the concept of zero-knowledge proofs. However, as mentioned earlier, ZK Rollups currently do not provide privacy and should be regarded as Validity Rollups at the time of writing this article. Nevertheless, there are plans to achieve true ZK in the future.

Therefore, ZK Rollups objectively have more prospects and are more efficient than Optimistic Rollups. Let’s pay attention to them.

III/ ZK Rollups and Different Types

A. What is ZK proof? (ELI5)

In order to better understand ZK Rollup, it is important to understand the meaning of Zero Knowledge Proof (ZK Proof).

The concept of ZK Proof refers to an encryption scheme based on cryptographic algorithms that allows one person to prove the authenticity of information to another person without explaining why the information is true. This is done by providing proof without directly revealing the knowledge that proves the validity of the proof. For example, a person can prove that they have a solution to a problem without revealing the result.

In computer science, especially in cryptography, ZK Proofs allow the “prover” to mathematically prove to the “verifier” that the computer state is correct without disclosing the data that proves that state.

But how do we prove something without explicit proof?

To understand the logic behind ZK Proofs, let’s use the example of “Ali Baba’s Cave.”

Imagine Alice and Bob standing in front of a circular cave, and the cave’s door can only be opened with a password (“Open Sesame!”). Bob knows the password and wants to prove to Alice that he knows the password without revealing it to her. In this scenario, Bob is the prover and Alice is the verifier.

Bob enters the cave from one side, while Alice waits outside at the entrance. Then, Alice asks Bob to exit from the other side.

Data source: https://www.bbva.com/en/zero-knowledge-proof-how-to-maintain-privacy-in-a-data-based-world/

By coming out, Bob proves to Alice that he knows the password. However, this could be a lucky coincidence. Bob can enter from side A, and if Alice asks him to exit from the same side, he cannot prove that he knows the password. To prove that he knows it, Bob should enter from side A and exit from side B, or vice versa.

To ensure that it’s not a lucky occurrence, Alice asks Bob to repeat this operation several times (10-20-50…). This way, he proves to Alice that he indeed knows the password without revealing it to her.

This is how ZK proof works. Although the background of computer science is much more complex and requires significant computational power, the principle remains the same – proving something is true without proving why it is true. ZK Rollups are based on this principle.

B. Connection between ETH and ZK

As mentioned earlier, ZK Rollups are considered the ultimate scalability solution for Ethereum. There are even rumors that ZK could be implemented directly on L1. However, it is apparent that the Ethereum protocol was not designed to natively support the generation of zero-knowledge proofs. Therefore, Ethereum does not optimize for accommodating ZK in the short term. So, ZK is not native to the EVM and is challenging to make it compatible with Optimistics.

The reason is that EVM operates on binary logic, while ZK operates on polynomial logic. Something that is effective in a binary context may be ineffective in a polynomial context, and vice versa. Therefore, ZK builders must make choices between performance and EVM compatibility. The stronger their compatibility, the poorer their performance. Conversely, the weaker their compatibility, the higher their performance.

The main advantage of EVM compatibility is that it can benefit from the network effect of ETH and everything built on EVM, including developer pools, tools, software, etc. However, ZK becomes more difficult due to its incompatibility with EVM. It performs better and is no longer limited by the Ethereum Virtual Machine. This opens up new possibilities for applications that were previously impossible to implement on ETH and EVM.

StarkWare prioritizes performance over EVM compatibility with StarkEx and Starknet. We will discuss this in more detail in an article specifically for Starknet. But before that, let’s explore the different types of zkEVM that exist.

C. Different Types of zkEVM

In general, the closer a zkEVM implementation is to Type 1, the stronger its compatibility with ETH, but it is also more limited in terms of performance and functionality. Conversely, the further a zkEVM implementation is from Type 1, the higher its performance, but its compatibility with EVM diminishes. These types differ in how they modify ETH to facilitate proof generation. Currently, according to Vitalik’s classification, there are four types of zkEVM.

1) Type 1 zkEVM

Type 1 zkEVM is fully compatible with ETH and all its functionalities, including EVM and Ethereum-specific mechanisms like block management and consensus. This compatibility allows Type 1 zkEVM to fully leverage existing infrastructure. However, proof generation requires a significant amount of computing power and may take several hours, resulting in lower performance compared to other types.

Currently, there are no available Type 1 zkEVMs.

Summary: Type 1 zkEVM is fully compatible but very slow.

2) Type 2 – 2.5 zkEVM

Type 2 zkEVM is fully compatible with EVM, meaning all opcode functionalities are exactly the same, but they modify Ethereum to some extent. This may involve changes in data structures or state trees.

In other words, they look the same “from the inside” as Ethereum, but they have some differences on the outside, especially in data structures like block structure and state tree.

Vitalik Buterin, https://vitalik.ca/general/2022/08/04/zkevm.html

Type 2 zkEVM has two main advantages: compatibility with most ETH applications and tools, and faster processing speed compared to Type 1. However, they still lag behind in terms of speed compared to other types.

Although Scroll and Polygon zkEVM are building Type 2 zkEVM, they are currently classified as Type 3.

On the other hand, Type 2.5 zkEVM is compatible with EVM, but the Gas strategy is different. In EVM, each opcode has an associated Gas cost, depending on the complexity of the resources needed to execute that specific opcode on an ETH node. However, some opcodes require ZK to do more work than EVM, which requires modifying their Gas cost. Type 2.5 zkEVM solves this problem by adjusting the Gas strategy.

Kakarot is an example of Type 2.5 zkEVM based on the Cairo language.

In summary, Type 2 zkEVM is fully compatible with EVM and faster than Type 1, but performance is still inferior.

3) Type 3 zkEVM

Type 3 zkEVM is similar to EVM, but sacrifices certain elements that are costly and complex to implement in a ZK environment, especially precompiles.

Compared to Type 1 and Type 2, Type 3 zkEVM is easier to implement and has significantly reduced proof generation time. However, some dApps may need to be partially or completely rewritten to be deployed on these networks, as they are not fully compatible with EVM.

According to Vitalik, Type 3 zkEVM is just a transitional phase, laying the foundation for zkEVM to become Type 2 zkEVM.

Currently, there are no ZK-EVM teams aiming to be Type 3; Type 3 is only a transitional phase until the complex work of adding precompiles is completed and the project can transition to Type 2.5.

Vitalik Buterin: https://vitalik.ca/general/2022/08/04/zkevm.html

Currently, Scroll and Polygon are Type 3 zkEVM, but their goal is to become Type 2.

Summary: Type 3 zkEVM is almost compatible with EVM and faster than previous types, but there are some compatibility issues.

4) Type 4 zkEVM

Type 4 zkEVM is not intended to be compatible with EVM. Instead, their goal is to make one high-level language compatible with another high-level language optimized for ZK proofs. To achieve this, we compile smart contract source code in Solidity to a ZK-friendly language (such as Cairo in Starknet). Therefore, the executed smart contract is not written in Solidity but in a representation that can be interpreted by EVM.

The advantages of Type 4 zkEVM are much faster proof generation time compared to previous types, which positively impacts decentralization. However, they often have severe incompatibilities in many cases. Therefore, deploying EVM dApps on such ZKs is not always easy.

So far, there are two examples of Type 4: Starknet’s WARP (limited to “simple” dApps) and zkSync using an intermediate language.

Summary: Type 4 zkEVM aims to make one high-level language compatible with another ZK-friendly high-level language for performance optimization but has severe incompatibilities.

Now that we have an overview of zk-Rollups, which one holds the most promise?

D. Which zk Rollup is more powerful in the long run?

In my opinion, a promising L2 Rollup is one that combines performance and UX innovation. The main function of Rollups is to scale and attract a large number of users to the Ethereum ecosystem and the broader crypto world. Other features such as security, data availability, settlement, etc. are guaranteed by ETH.

zkSync seems to be a promising solution as it prioritizes performance over compatibility. However, Starknet goes further by not committing to any EVM compatibility. This allows it to optimize performance and explore new visions and use cases that the EVM cannot achieve. To achieve this goal, Starknet has created its own ZK super-optimized programming language Cairo and invented STARK proofs, which are more promising than the SNARK proofs used by other zkEVMs. We will discuss these points in more detail in the upcoming Starknet article.

However, by making this incompatible choice, Starknet faces two challenges:

1) Attracting developers to learn a new programming language.

2) Building an ecosystem from scratch, including all necessary tools, infrastructure, and dApps.

To address the first challenge, StarkWare (the company behind StarkEx and Starknet) consistently supports new developers and provides abundant resources. Starknet has a dedicated “developer advocacy” team whose mission is to guide and support new developers. If you are a new Cairo developer, feel free to contact them directly on Twitter: @henrlihenrli, @DrSLianGuaicemn, @gyanlakshmi, or the ecosystem lead for Starknet: @GuthL.

There are also independent communities and projects that provide resources to help developers, including:

  • @OnlyDust_xyz, which connects developers with projects and funds open-source contributions

  • @matchbox_dao, a game project incubator

  • @StarkNetAfrica, organizing events and providing specific educational content for developers

  • Many others (@ClassLambda, @0xSLianGuaiceShard…)

Developers in the community have also built and released numerous open-source tools and resources, such as the Cairo book. These resources can help both beginners and experienced developers establish their position in the ecosystem.

Currently, this strategy is highly successful. Despite the high entry barrier, Starknet remains one of the fastest-growing ecosystems in terms of developer numbers. Several data points from Electric Capital’s excellent analysis support this claim.

  • There were 36 full-time developers by the end of 2021 and 120 by the end of 2022.

  • The number of developers in 2021 was 160, and it increased to 390 in 2022 (total number of developers).

  • In addition, StarkNet is an ecosystem that has been established for less than 2 years and has a large number of developers.

  • Moreover, there is also a large number of full-time developers.

StarkWare’s current support strategy is achieving great success. Furthermore, learning Cairo provides great opportunities for developers:

  • Developers enter an ecosystem where there is a much higher demand for developers than supply, resulting in significant economic incentives.

  • They compete with Cairo developers who have two years of experience (compared to longer experience with Solidity and other languages), making this competition relatively scarce compared to other ecosystems.

  • Developers can contribute to building the ecosystem from scratch and have the opportunity to leave a lasting reputation in the ecosystem’s history.

It is worth noting that building an ecosystem from scratch using a new programming language has advantages and disadvantages, especially in terms of security. Unlike tools, software, and dApps created in the EVM environment, those created in Cairo have not been tested in real-world scenarios over the years. Therefore, compared to the tools, software, and dApps that have been running on Ethereum for over six years, it is objectively more likely to see vulnerabilities in them.

Two main factors help mitigate these security risks. First, quality audits and security companies monitor and review projects and tools built on StarkNet, such as @nethermindeth, @FuzzingLabs, and @ginger_security.

The second point to note is that StarkWare has a team called “Team Exploration,” led by @dimahledba. Their goal is to create open-source products and collaborate directly with developers in the Starknet community on these projects. By doing so, StarkWare can train new developers and provide them with direct support in creating tools and projects. Community developers can benefit from the guidance of this team, including security practices and coding standards to follow on Starknet.

In addition, the entire technology stack of Starknet will be open source, which will enhance overall security.

Therefore, StarkWare effectively addresses the two main challenges faced so far.

Conclusion

One of the challenges that cryptocurrencies will face in the coming years is attracting a sufficient number of users to ensure global adoption. This adoption is crucial for the cryptocurrency market to be large enough and resilient against nation-level attacks.

We will continue to update Blocking; if you have any questions or suggestions, please contact us!

Share:

Was this article helpful?

93 out of 132 found this helpful

Discover more

Bitcoin

Bitcoin: Riding High and Making a Splash in the Digital Ocean

Bitcoin (BTC) starts the week with a slight surge in trading while there has been a rise in activity on L1 chains.

Blockchain

πŸš€ Moon App Launches $APP Staking for $INJ Ecosystem IDOs! Stake Your Tokens and Secure Your Allocation!

The Moon App, acting as the Layer0 and Launchpad for Injective, offers an opportunity for users to stake $APP and par...

Market

Hit the Jackpot! Marathon Digital sees Revenue Soar by 670% in Q3 2023

Fashionista Marathon Digital's revenue for Q3 2023 skyrockets thanks to a boost in Bitcoin production and other contr...

Market

Stifel recommends keeping Galaxy Digital as a core asset in your digital investment portfolio.

Stifel recommends that investors looking to invest in the crypto industry should consider keeping Galaxy Digital as a...

Market

The Rise and Fall of DeSantis: A Bitcoin Lover’s Political Journey

Former CBDC opponent Ron DeSantis has gracefully concluded his presidential campaign and is now enthusiastically back...

Blockchain

Revolut Partners with MetaMask to Simplify Crypto Purchase through Revolut Ramp πŸ’ΈπŸ€

Exciting news from Revolut! They just announced the launch of their latest product, Revolut Ramp. With this new featu...