- Starknet research hub
- Posts
- Starknet part 1: L2 landscape
Starknet part 1: L2 landscape
Which L2 solution seems the most promising ?
Overview
It is now clear that Ethereum has emerged as the victor in the alt L1 war. However, Ethereum itself is facing limitations and scalability issues that hinder mass adoption of its network. Initially designed as a monolithic blockchain, where everything must be executed on a single layer, its use at a larger scale has revealed that monolithic blockchains cannot effectively achieve decentralization, security, and scalability simultaneously.
Therefore, Ethereum is now shifting towards a "rollup-centric" approach. In this approach, Ethereum is considered as a settlement layer, while transaction execution takes place exclusively on L2 (Layer 2). This transition allows Ethereum to move from a monolithic logic to a modular one.
Assuming that Ethereum has emerged as the winner in the alt L1 war and that the new focus area is L2, it is necessary to ask:
Which L2 solution seems the most promising, why, and what is its ecosystem?
To answer this question, I have decided to divide my work into three articles.
This first article will focus on the first part of the question, covering the following points:
I/ Why L2?
A. Basics: Layer 1, Layer 2, and the blockchain trilemma
B. What are Ethereum's scalability issues, and why do they occur?
C. Why did Ethereum win the alt L1 war?
D. What are the solutions to Ethereum's scalability issues?
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 a ZK Proof? (ELI5)
B. What is the link between ETH and ZK?
C. What are the different types of zkEVM?
D. Which ZK Rollup is the most interesting and promising in the long run?
This will allow me to explain the thought process that led to my conclusion and introduce my second article, which will focus on explaining what Starknet is (yes, I'm spoiling my conclusion in the introduction).
Of course, this conclusion is solely my own opinion. This article does not constitute financial advice in any way. It is important for you to always question what you read and conduct your own research!
With this in mind, let's dive into this first article!
I/ Why Layer 2
A. Basics: Layer 1, Layer 2, and the Blockchain Trilemma
Before we begin, let's briefly explain what a Layer 1 (L1) and a 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. L2 networks, on the other hand, are built on top of the L1 and overlay it. In simple terms, L2 represent an extension of Ethereum that offers 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 the L1.
Thus, as explained in the introduction, it quickly became clear that monolithic blockchains cannot scale effectively while prioritizing scalability, security, and decentralization.
Scalability refers to the ability of an IT system to adapt to fluctuations in demand while retaining its different functionalities. In the case of a blockchain, this means that it must be able to accommodate an increasing number of users on its network without sacrificing speed or transaction efficiency. In other words, scalability represents the ability of a blockchain to expand quickly and inexpensively, regardless of the transaction volume on the network.
Decentralization, in my view, consists of four elements: infrastructure, node, developer, and token holder decentralization. To achieve true decentralization in a blockchain, all four elements must be considered. A decentralized blockchain operates without relying on the trust of a centralized group of actors in these four aspects, making it uncensorable.
Finally, security refers to the network's ability to resist attacks from malicious entities. Specifically, the blockchain must be able to withstand a high percentage of nodes attempting to attack it. Vitalik suggests that 50% is perfect, 25% is acceptable, and 5% is not.
Thus, the crypto ecosystem quickly realized that a blockchain can only simultaneously satisfy two out of three elements. This problem is known as the blockchain trilemma, theorized by Vitalik.
This trilemma highlights that a choice must be made, sacrificing one of these elements because increasing one variable comes at the cost of the other two. This is particularly detrimental considering that:
Scalability is a fundamental element for mass adoption.
Decentralization is crucial for preventing the censorship that is often observed in traditional financial systems.
Security is the central element that prevents a system from collapsing, and without it, the two previous elements lose their meaning.
Therefore, ETH has decided to focus on decentralization and security at the cost of scalability.
B. What are the scalability issues of ETH and why do they occur?
Blockchain scalability refers to the ability of the network to accommodate more users and transactions without sacrificing speed or increasing costs.
The structure of ETH is limited, allowing it to process only 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 by transactions and determines the ETH fees to be paid.
However, as the demand for using the ETH network keeps increasing over time, users are competing to have their transactions processed quickly and avoid long waiting times. This competition is significantly increasing the network's transaction fees and waiting times.
Here are some figures to help understand the problem.
The number of pending transactions on ETH:
Average fees on ETH:
During the NFT boom in 2021, transaction fees reached over $200. Currently, the average transaction fee is around $10, which is still too expensive.
Therefore, when the ETH blockchain becomes congested (i.e., demand to process transactions exceeds network capacity), users have two options: pay higher fees or wait longer by attempting to submit transactions with lower-than-average fees or during off-peak hours (which can be easily identified on the following website ultrasound.money).
The scalability problem is the main reason why numerous L1 blockchains, such as BSC, SOL, ELROND, and others, have emerged to compete with ETH. However, several solutions have been developed to address ETH's scalability issues in the long term. Shortly, we will explore these solutions. First, let's understand why ETH has emerged as the winner in the battle against these competing L1 blockchains.
C. Why ETH Won the L1 War
Firstly, I want to clarify that in this statement, I am excluding BTC, which I consider to be complementary to ETH rather than a competitor. Both have inherently different value propositions: Bitcoin can be seen as decentralized digital gold and represents the hardest money ever created, while Ethereum is the decentralized world computer. Analogously, I view BTC as gold and ETH as the Nasdaq of crypto. Let's now refocus on our topic.
I believe ETH has won the L1 war for three main reasons.
1) ETH ranks first in the two main metrics: users and developers
When it comes to users, the situation is clear. Despite the emergence of many highly scalable L1 solutions, ETH still dominates, accounting for over 58% of the total value locked (TVL) in the market.
Furthermore, among the top six chains with the highest TVL, four belong to the ETH ecosystem:
Arbitrum and Optimism are Optimistic Rollups based on Ethereum's security, while Polygon is a Sidechain. When adding Layer-2 solutions to the equation, the ETH ecosystem accounts for around 70% of the TVL.
Similarly, when it comes to developers, Ethereum remains the ecosystem with the largest talent pool, as demonstrated by the Electric Capital report.
Number of full-time developers
Total number of developers
Developer growth between 2018 and 2022
Normalized first commit per day (full-time developers)
ETH and ecosystem growth compared to other L1-L2 EVMs
Developers in the DeFi ecosystem
Therefore, ETH remains by far the largest ecosystem in the two most important metrics: developers who build the ecosystem and applications used by users, and users who indicate the economic interest of participants.
2) L1 solutions that aim to be “ETH killers” make significant compromises on decentralization or security
(mid-2022 data)
To me, a non-decentralized blockchain doesn't make sense because a centralized blockchain is not beneficial. Blockchains are slow and costly networks, and their true advantage lies in decentralization and resistance to censorship. If a centralized network is desired, it is better to turn to traditional Web2 solutions, which are much more efficient.
Furthermore, it is important to note that many highly scalable blockchains encountered problems as soon as usage started to increase. For instance, Solana faced numerous liveness issues, while BSC and AVAX experienced fee explosion problems.
On the other hand, compromising on security is counterproductive because without security, there is no incentive for participants to engage with an ecosystem when a sword of Damocles is constantly hanging overhead. Moreover, what is the point of building a decentralized and scalable blockchain if it can collapse at any moment and be compromised?
Decentralization and security are the only coherent choices when making the trade-off in the blockchain trilemma. Bitcoin and Ethereum have both made this choice.
3_ ETH, alongside BTC, is the most credible settlement layer in the market as it fulfills all necessary prerequisites
A good settlement layer is a crucial component for L2. It should be decentralized, censorship-resistant, secure, robust, and available 24/7. This ensures that transactions can be processed smoothly and without interruption. Currently, there are only two cryptocurrencies that meet all of these criteria acceptably in the market - ETH and BTC.
Decentralization is particularly important so there is no central authority controlling the system, which makes it harder for any one group to manipulate or censor transactions. Censorship-resistance is also crucial, as it ensures that no one can prevent transactions from being processed. Security and robustness are necessary to protect the system from attacks and ensure that it can handle a large volume of transactions. Finally, availability 24/7 is important because transactions can occur at any time, and the settlement layer must be able to process them all.
Thus, ETH meets these conditions perfectly. However, to understand the importance of this, it is necessary to first explain what a settlement layer is and what the preferred solution is for solving ETH's scalability issue.
D. What are the solutions to Ethereum's scalability issues?
As previously mentioned, ETH is addressing its scalability issues by transitioning from a monolithic to a modular approach.
A monolithic blockchain is one that performs all blockchain functions on a single layer:
Execution: processing and executing transactions
Settlement: achieving consensus on the agreed-upon state
Consensus: agreeing on the order of messages and transactions
Data validity: ensuring published, visible, and accessible data for all
The monolithic approach of a blockchain cannot address the three variables of the blockchain trilemma. To solve this issue, ETH proposes offloading transaction execution to other layers, known as L2 solutions. These solutions are built as an overlay on top of ETH and leverage its security and consensus, while providing much more efficient transaction finality than ETH.
To achieve this, Ethereum is now focusing on a "Rollup-centric" approach. In this approach, all user transactions are ultimately processed on Rollups, a L2 family, and the ETH layer only serves L2. The goal is for ETH to ensure decentralization, security and data availability, catering to the L2 needs, while L2 ensure scalability and speed, addressing the users needs.
The fees on L2s are currently much lower than those on ETH:
This partially solves Ethereum's scalability problem. However, Vitalik believes that these fees must be below $0.05 to be truly acceptable for regular users.
Currently, rollups consume a significant amount of data on L1 through call data, which makes settling these rollups on Ethereum expensive. These call data account for approximately 90% of L2 fees.
The Proto Danksharding (EIP-4488) could help achieve Vitalik's goal by introducing a new storage fee market. This could significantly reduce rollup fees. To learn more about the Proto Danksharding, I recommend reading this article.
In summary, this implementation would lead to a significant reduction in fees.
This will enable ETH to provide users with a secure and decentralized environment, while also offering low-cost and fast transactions. The L2 environment is where most development, innovation, and utilization is likely to occur in the near future.
In fact, this is already the case currently, as evidenced by usage metrics in this analysis by Coingecko.
This further strengthens ETH's position compared to other L1 blockchains.
Let's now examine each category of L2 solutions and identify which one seems most promising.
II/ The L2 Landscape
A. Different Types of L2
1) Sidechain
A sidechain is a parallel chain to Ethereum that operates independently with its own consensus, security, and a bidirectional bridge that connects it to ETH. Sidechains are considered L2 rather than L1 because they regularly send activity reports to ETH. This design provides greater resilience in case of issues on their network.
Sidechains offer several 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 on the ETH one.
The most well-known sidechains are Polygon and Gnosis.
2) Plasma
A plasma chain is a chain that uses Merkle trees to enable the creation of an unlimited number of child chains, which are smaller copies of the Ethereum parent blockchain.
In summary, a plasma chain processes only a portion of ETH's Merkle tree, rather than the entire tree. This enables faster transaction processing and reduces processing costs on the main Ethereum chain. These chains use fraud proofs (which we will discuss further with Optimistic Rollups) to ensure their security.
The advantages of plasma chains are their speed, low cost, and ability to handle transactions between arbitrary actors. However, the main drawback is that this solution is only suitable for simple use cases such as asset transfers, and not complex DeFi applications. Additionally, the network needs to be constantly monitored, and users have to wait a few days before being able to withdraw their funds due to the operation of fraud proofs.
The most well-known plasma chain is OMG Network.
3) State channels
A state channel is a network that allows multiple channels to be created for performing transactions outside the L1. The principle is that two participants open a channel, conduct multiple transactions within that channel, then update the balance state and close the channel once the exchanges are completed. This allows for multiple transactions at the cost of only two transactions on L1: the channel opening transaction, indicating the balance of each participant, and the channel closing transaction, indicating the balance of each participant after exchanges.
This enables the execution of numerous transactions quickly and at a very low cost. However, the structure of channels is limiting because new channels need to be opened each time there is an exchange with a new party. There are solutions that allow transactions between indirectly connected 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 most well-known state channel is the Lightning Network of Bitcoin.
4) Rollups
A Rollup is a chain that connects to ETH through a smart contract on the L1 that maintains the state root of what happens on the Rollup. The idea is to move a portion of the transactions off the L1 and only send essential information about these transactions in a compact form on this L1.
In a simplified manner, numerous transactions are conducted on L2, which are then batched and sent as a single transaction to the L1 smart contract. The smart contract then verifies the validity of the state.
Rollups are more appealing than the previously mentioned L2 solutions because they combine the advantages of all previous L2 categories and address their disadvantages. Indeed, Rollups enable fast and low-cost transactions, rely on ETH's security, and are efficient for both simple transactions like exchanges and transfers, and complex transactions that enable the construction of a complete DeFi ecosystem.
The answer to our question (as a reminder: which L2 solution is the most promising) lies in Rollups, as they surpass all other categories of L2. That's why ETH is focusing on Rollups adoption.
B. Optimistic Rollups vs ZK Rollups
There are two categories of Rollups that differ based on the proofs they send to the L1: Optimistic Rollups, which use fraud proofs, and ZK Rollups, which use validity proofs.
1) Optimistic Rollups:
Optimistic Rollups are named as such because they take an optimistic approach, assuming that all transactions are valid unless proven otherwise. To ensure the security of these transactions, a dispute period is implemented, which typically lasts for 7 days (for Arbitrum and Optimism). During this period, anyone on the network can submit a fraud proof that cancels all changes made within a block, demonstrating that an actor cheated on the network. The actor will be penalized by losing the assets he staked (slash). On the other hand, if nothing happens after the 7-day dispute period, the blocks are considered validated, and this validation is irreversible.
The system operates on the assumption that fraud will be detected and reported by at least one person. Therefore, Optimistic Rollups can be secured by a single honest actor on the network.
Optimistic Rollups offer several advantages over ZK Rollups. They have a simpler architecture, which makes them easier to implement, and they are natively compatible with the EVM.
However, the Dispute period caused by fraud proofs is a significant disadvantage for many use cases. In practice, users typically do not want to wait seven days to move their assets between L2 and L1. Third-party bridges like Hop can provide liquidity and bypass the Dispute period in exchange for fees. However, some applications, such as NFTs, cannot bypass the Dispute period.
Arbitrum, Optimism, Base (by Coinbase), and Metis are among the most well-known Optimistic Rollups.
2) ZK Rollups
Rollups use validity proof based solely on mathematics to ensure network security. Transactions are performed on L2 and then batched (i.e., grouped together through compression). The prover then executes and generates an irrefutable mathematical proof of this execution. This proof is sent to the L1 contract, and ETH is capable of instantly verifying its mathematical validity and determining if the computation is valid and honest.
As a result, each batch sent to the main chain contains a cryptographic proof that authenticates and verifies the accuracy of the post-state within the batch without revealing any detailed transaction information. Therefore, the smart contract on the L1 only needs to verify this proof.
The beauty of ZK Rollups lies in the fact that calculations can be verified without having to re-execute them. Instead of having all nodes perform the calculations, there is a highly powerful entity that executes the transactions, and the nodes simply verify that the proof sent by this entity is valid. Analogously, it functions similarly to solving a puzzle or Sudoku: it takes time to do, but it is quick to verify.
The main advantage of ZK Rollups is that they rely solely on mathematics and not on market actors, which brings more security. Additionally, there is no need to wait for a Dispute period to execute transactions. However, implementing ZK Rollups is much more challenging, and it is difficult to make them compatible with the EVM since ETH was not originally built to natively support zero-knowledge proof generation.
The most well-known ZK Rollups include Starknet, StarkEx, zkSync, Scroll, Linea, and Taiko.
It should be clarified at this point that L2 "ZK" are actually Validity Rollups and not ZK, as they prove the execution of transactions, but do not introduce the zero-knowledge aspect. However, it is planned to add this layer of privacy later on.
Rollups are currently the best L2 solution, but which family of rollups is the most effective?
C. Best Solution: Optimistic or ZK?
According to Vitalik's own words, ZK Rollups are better suited and will prevail in the long term over Optimistic Rollups:
My opinion is that in the long run, ZK-Rollup will eventually beat Optimistic Rollup because they have basic advantages like users don't need to wait 7 days for a withdrawal.
In general, my own view is that in the short term, optimistic rollups are likely to win out for general-purpose EVM computation and ZK rollups are likely to win out for simple payments, exchange, and other application-specific use cases, but in the medium to long term ZK rollups will win out in all use cases as ZK-SNARK technology improves.
Currently, Optimistic Rollups are the most widely adopted and used L2 solutions. Their architecture is simpler and easier to implement than ZK Rollups, and they don't have compatibility issues with the EVM like ZK Rollups do. Consequently, it takes longer to build efficient, ready-to-use, and scalable L2 solutions using ZK Rollups.
Optimistic Rollups have taken advantage of this and gained a privileged position in the market. This position is well-deserved since they are currently the most effective general-purpose L2 solutions for scalability. However, many believe that in the long run, Optimistic Rollups will migrate to become ZK Rollups or simply replace their fraud proofs with validity proofs.
Source: Twitter
Why? Simply put, ZK Rollups offer numerous advantages over Optimistic Rollups.
First and foremost, ZK Rollups do not rely on the assumption that at least one honest actor is needed on the network to be secure. Instead, ZK Rollups rely only on mathematics, making the network objectively more secure.
Furthermore, ZK Rollups do not require a dispute period to ensure network security. As a result, the withdrawal period on a ZK Rollup is very fast, while on an Optimistic Rollup it currently takes about 1 week (and the shorter the period, the less secure the network becomes).
Lastly, ZK Rollups have a much higher theoretical throughput than Optimistic Rollups. Transactions are faster and less expensive because less data needs to be sent to L1. Additionally, the on-chain cost of Optimistic Rollups is linear with the number of transactions, whereas the on-chain cost of ZK Rollups is linear with the number of users, providing a significant advantage to ZK Rollups.
When considering the main advantages of Optimistic Rollups, it is important to note that they only offer short-term benefits. Currently, Optimistic Rollups are easier to build. However, as time passes, and discoveries and research on ZK Rollups intensify, building ZK Rollups becomes less difficult. Secondly, Optimistic Rollups are easily compatible with the Ethereum Virtual Machine, but zkEVM is currently working on achieving EVM compatibility with ZK Rollups.
Finally, unlike Optimistic Rollups, ZK Rollups introduce privacy through the concept of zero-knowledge proofs. However, as previously mentioned, ZK Rollups currently do not provide privacy and should be considered as Validity Rollups at the time of writing this article. Nonetheless, there are plans to implement true ZK in the future.
Therefore, ZK Rollups are objectively more promising and effective than Optimistic Rollups. Let's focus on them.
III/ ZK Rollups and Different Types
A. What is a ZK Proof? (ELI5)
To better understand ZK Rollup, it is important to know what Zero Knowledge Proof (ZK Proof) means.
The concept of ZK Proof refers to an encryption scheme based on cryptographic algorithms that enables one person to prove the truth of information to another person without explaining why that information is true. This is done by producing a proof without directly revealing the knowledge that justifies the validity of that proof. For example, a person can prove that they have the solution to a puzzle without showing the final result.
In computer science, specifically in cryptography, ZK Proofs enable a "prover" to mathematically demonstrate to a "verifier" that a computer state is correct, without revealing the data that proves that state.
But how can we prove something without explicitly demonstrating it?
To understand the logic behind ZK Proofs, let's take the "Ali Baba's Cave" example.
Imagine that Alice and Bob are standing in front of a circular cave with a door that can only be opened with a password ("Open Sesame!"). Bob knows the password and wants to prove to Alice that he knows it 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 the entrance. Then, Alice asks Bob to exit from a different side.
By coming out, Bob demonstrates to Alice that he knows the password. However, this could be a lucky coincidence. Bob could have entered from side A, and if Alice asks him to come out from the same side, it does not 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 is not a lucky situationn, Alice asks Bob to repeat the operation several times (10-20-50...). This way, he proves to Alice that he indeed knows the password without having to reveal it to her.
This is how ZK Proofs work. Although the context in computer science is much more complex and requires significant computational power, the principle remains the same - proving that something is true without demonstrating why it is true. ZK Rollups are based on this principle.
B. What is the link between ETH and ZK?
As previously mentioned, ZK Rollups are considered the ultimate scalability solution for Ethereum. There are even rumors that ZK could eventually be implemented directly on the L1. However, it is clear that the Ethereum protocol was not originally designed to natively support zero-knowledge proof generation, so Ethereum is not optimized to accommodate ZK in the short term. As a result, ZK is not native to the EVM, and making them compatible with it is challenging, unlike Optimistics.
The reason for this is that the EVM operates on binary logic, while ZK operates on polynomial logic, and what may be efficient in a binary context may not be efficient in a polynomial context, and vice versa. Therefore, ZK builders must choose between performance and EVM compatibility. The more compatible they are, the less performant they are. Conversely, the less compatible they are, the more performant they are.
The main advantage of EVM compatibility is that it allows to benefit from the network effect of ETH and everything built on the EVM, including the pool of developers, tools, software, etc. However, by not being compatible with the EVM, ZK becomes much more performant and is no longer limited by the Ethereum Virtual Machine. This opens up new possibilities for developing applications that were previously impossible on ETH and the EVM.
StarkWare made the choice to prioritize performance over EVM compatibility with StarkEx and Starknet. We will revisit this point in the article dedicated to 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 more compatible it is with ETH, but also the more limited it is in terms of performance and capabilities. Conversely, the further away from type 1 a zkEVM implementation is, the more performant it becomes, but the less compatible it is with the EVM. These types are distinguished by the way 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 of its features, including the EVM and Ethereum-specific mechanisms like block management and consensus. This compatibility allows type 1 zkEVM to benefit fully from the existing infrastructure. However, generating proofs requires substantial computational power and can take several hours, leading to lower performance compared to other types.
Currently, there is no type 1 zkEVMs available.
Summary: Type 1 zkEVMs are perfectly compatible but very slow.
2) Type 2 - 2.5 zkEVM
Type 2 zkEVMs are fully compatible with the EVM, meaning that all opcodes function exactly the same way, but they modify Ethereum to some extent. This can involve changes in data structures or the state tree:
That is, they look exactly like Ethereum "from within," but they have some differences on the outside, particularly in data structures like the block structure and state tree.
Type 2 zkEVMs offer two main advantages: compatibility with the majority of ETH applications and tools, and faster processing than type 1. However, they still fall behind other types in terms of speed.
While Scroll and Polygon zkEVM are building type 2 zkEVMs, they are currently classified as type 3.
On the other hand, Type 2.5 zkEVMs are compatible with the EVM but differ in their gas policy. In the EVM, each opcode has an associated gas cost based on the complexity of the resource required to execute a specific opcode on an ETH node. However, some opcodes require more work for ZK than for the EVM, which requires a modification of their gas cost. Type 2.5 zkEVMs address this issue by adjusting the gas policy.
Kakarot, the Cairo language-based zkEVM, is an example of a type 2.5 zkEVM.
Summary, type 2 zkEVMs are fully compatible with the EVM and faster than type 1, but still less performant.
3) zkEVM Type 3
Type 3 zkEVMs are similar to the EVM, but they sacrifice certain elements that are costly and complicated to implement in a ZK environment, particularly precompilation.
Compared to Type 1 and Type 2, Type 3 zkEVMs are easier to implement and have significantly shorter proof generation times. However, some dApps may need to be partially or completely rewritten to be deployed on these networks as they are not perfectly compatible with the EVM.
According to Vitalik, Type 3 zkEVMs are just a transitional phase in which zkEVM lay the foundations of their ZK before undertaking the necessary work to become Type 2 zkEVMs.
Today, no ZK-EVM team wants to be a Type 3; Type 3 is simply a transitional stage until the complicated work of adding precompiles is finished and the project can move to Type 2.5.
Currently, Scroll and Polygon are Type 3 zkEVMs, but they aim to become Type 2.
Summary: Type 3 zkEVMs are almost compatible with the EVM and faster than the previous types, but they suffer from some compatibility issues.
4) zkEVM Type 4
Type 4 zkEVMs do not aim to be compatible with the EVM. Instead, they aim to make a high-level language compatible with another high-level language that is optimized for ZK proofs. To achieve this, the source code of the smart contract in Solidity is taken and compiled into a ZK-friendly language (such as Cairo for Starknet). As a result, the executed smart contract is not written in Solidity but is a representation that can be interpreted by the EVM.
The advantage of Type 4 zkEVMs is that the proof generation time is much faster than for the previous types, which has a positive impact on finality and decentralization. However, they suffer from major incompatibility in many cases. Therefore, it is not always easy to deploy an EVM dApp on this type of ZK.
To date, there are two examples of Type 4: WARP for Starknet (but limited to 'simplistic' dApps) and zkSync, which uses an intermediate language.
Summary: Type 4 zkEVMs aim to make a high-level language compatible with another ZK-friendly high-level language, optimizing performance but suffering from major incompatibility
Now that we have an overview of zk-Rollups, which one shows the most promise?
D. Which zk Rollup is the most interesting and promising in the long run?
In my opinion, the most promising L2 Rollup is one that combines performance and UX innovations. The main function of Rollups is to scale and attract a large number of users to the Ethereum ecosystem and the broader crypto universe. Other functions, such as security, data availability, and settlement, are ensured by ETH.
zkSync appears to be the most promising solution, as it prioritizes performance over compatibility. However, Starknet goes even further by not promising any EVM compatibility. This allows it to optimize performance to the maximum and explore new horizons and use cases that are not possible with the EVM. To achieve this, Starknet has created Cairo, its own ultra-optimized programming language for ZK, and has invented STARK proofs, which are more promising than the SNARK proofs used by other zkEVMs. We will discuss these points in more detail in an upcoming article dedicated to Starknet.
However, by making this choice of ultimate non-compatibility, Starknet faces two challenges:
1) Attracting developers to learn a new programming language.
2) Building an ecosystem from scratch, including all the necessary tools, infrastructure, and dApps.
To address the first challenge, StarkWare (the company behind StarkEx and Starknet) consistently supports new developers and provides numerous resources. Starknet has a dedicated team of "Dev advocates" 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, @DrSpacemn, @gyanlakshmi, or the ecosystem lead of 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 gaming project incubator
@StarkNetAfrica, which organizes in-person events and provides specific educational content for developers
Many others (@ClassLambda, @0xSpaceShard…)
Developers in the community also build and publish numerous open-source tools and resources, such as the Cairo book. These resources help both new and experienced developers establish themselves in the ecosystem.
Currently, this strategy is highly successful. Despite its significant entry barrier, Starknet is among the ecosystems that have experienced the highest growth in the number of developers. Several figures from the excellent analysis by Electric Capital support this claim.
36 full-time developers at the end of 2021 compared to 120 at the end of 2022.
160 developers in 2021 compared to 390 in 2022 (total number of developers).
Additionally, StarkNet is the ecosystem under 2 years old with the highest number of developers.
And also the highest number of full-time developers.
StarkWare's current support strategy is yielding great results. Moreover, learning Cairo presents a tremendous opportunity for developers:
Developers enter an ecosystem where the demand for devs far exceeds the supply, leading to significant economic incentives.
They compete against Cairo developers who have a maximum of two years of experience (compared to longer periods for Solidity and other languages), and this competition is relatively scarce compared to other ecosystems.
Developers can contribute to building an ecosystem from scratch and have the chance to make a lasting name for themselves in its history.
It is important to note that building an ecosystem from scratch with a new programming language brings both advantages and disadvantages, particularly in terms of security. The tools, software, and dApps created in Cairo have not been battle-tested for many years, unlike those on the EVM environment. Consequently, it is objectively more likely to see vulnerabilities appear in them compared to tools, software, and dApps that have been running on Ethereum for over six years.
Two main factors help mitigate these security risks. First, quality auditing and security firms monitor and conduct code reviews for projects and tools built on Starknet, such as @nethermindeth, @FuzzingLabs and @ginger_security.
The second thing to note is that StarkWare has a team named "Team Exploration," led by @dimahledba. Their objective is to create open-source products and collaborate directly with developers from 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 this team's guidance, which includes best security practices and coding standards to follow on Starknet.
In addition, the entire technological stack of Starknet will be open-sourced, which will enhance overall security.
Therefore, StarkWare has effectively addressed the two main challenges it has faced so far.
Conclusion
One of the biggest challenges for cryptocurrencies in the years to come will be to attract a sufficient number of users to ensure global adoption. This adoption is crucial for the cryptocurrency market to be large enough and resilient against state-level attacks.
However, after years of observing the significant scalability issues Ethereum faces, the conclusion is now clear: the current method is not working. The monolithic approach of blockchains fails to satisfy the three elements of the blockchain trilemma. Yet, these three elements are of utmost importance, as explained throughout this article.
While some blockchains choose to sacrifice decentralization or security to prioritize scalability (which is nonsensical), Ethereum has taken a new approach that allows it to offer a simple solution to this trilemma: focusing on security and decentralization while offloading execution (and thus scalability) to new layers that directly benefit from the security and decentralization of ETH.
This is where L2 solutions come in, representing the new cryptocurrency environment where everything will unfold in the coming years. Among these L2 solutions, Starknet emerges as the most promising. In this article, I have described why Starknet stands out as the best L2 technology currently available:
Rollups represent the best L2 technology currently available.
The advantages of Optimistic Rollups over ZK Rollups are only short-term advantages, and ZK Rollups mitigate the disadvantages of Optimistic Rollups.
Within ZK Rollups, Starknet stands out the most with its inventiveness (Stark), its choice not to be EVM-compatible, and its track record.
Starknet is the L2 solution that focuses the most on performance and user experience (hello Account Abstraction).
StarkWare perfectly addresses the two main challenges of non-compatibility with the EVM.
In an upcoming article, I will explain in detail what Starknet is, its ecosystem, and how you can position yourself within it. Stay tuned in a few weeks!
I hope you enjoyed this article and learned something new! If so, please feel free to share it and follow me on Twitter. Following me on Twitter is the best way to support and encourage me to continue creating content like this. You can also subscribe to this newsletter for free!
Reply