The multiple L1 drops, such as -100% in LUNA or -90% in FTM, added to the drops in the Solana network, show a very favorable path for Ethereum as the winner of the L1 battle.
If this is right, people who understand the different Ethereum scalability solutions have the opportunity to be early investors in projects with great potential, so in this article I will explain everything about the possible solutions, and then speculate on what the most likely long-term scenario is.
The scalability trilemma
Before seeing the possible solutions, you have to understand the problem, surely many already know this famous trilemma, which tries to optimize three points: security, decentralization and scalability, which are very difficult to achieve within the same blockchain and generally one is always left out.
Ethereum has prioritized decentralization and security, leaving scalability aside. This is because, to achieve decentralization, small size/power nodes are required (so most users can run their own node), which limits TPS (transactions per second).
Most of the L1 alternatives, like the ones mentioned above, took the easy path in order to scale, leaving decentralization aside, as in order to get more TPS, they increased the size/power of the nodes, making the required hardware high and few people can run a node..
Possible solutions
There are two main paths to achieve scaling in a secure and decentralized way:
The first: scale horizontally, through sharding.
The second: scale vertically, through the L2 (layer 2).
Sharding
Sharding is a common concept in computer science that refers to the process of dividing a database horizontally to distribute the load. On Ethereum, sharding will reduce network congestion and increase TPS by creating new chains, known as shards.
With this update, nodes only need to store or execute data for the shard they are validating, not for the entire network.
At the beginning it was proposed that each fragment could store/execute code and transactions, but after the arrival of L2, and given the complexity of this feat, it is probable that the fragments only serve for data availability.
L2
Layer 2 is a collective term for Ethereum scaling solutions that handle transactions outside of Layer 1, while also taking advantage of Layer 1 security and decentralization.
There are two parameters that are used to categorize L2s. The first is the type of cryptographic proof used (validity or fraud), and the second is the data availability (on-chain or off-chain).
Without going into technical issues, what is relevant here is:
- Validity proofs are more secure and scalable than fraud proofs, although they are based on very complex maths, making them more difficult to develop.
- On-chain data provides more security and decentralization than off-chain data, although having the data off-chain allows grup more transactions, scaling faster.
Rollups
Rollups bundle hundreds of transactions and publish it in one L1 transaction. This distributes the L1 fee among everyone in the rollup, so the more transactions in the rollup, the lower the fees (until a certain point).
Transactions are executed outside of L1, but data is posted in L1. By publishing the data in L1, rollups inherit the security of Ethereum.
As you can see in the image above, there are two different approaches to rollups: Optimistic Rollups and ZK Rollups. They differ in how the data is published in L1 (the type of cryptographic proof used).
Optimistic Rollups: these are “optimistic” in the sense that transactions are assumed to be valid, but can be challenged. If an invalid transaction is suspected, a fraud test is run.
ZK Rollups: zero-knowledge rollups use zero-knowledge proofs as proofs of validity, which are based on cryptography and complex maths.
Zero knowledge proofs allow you to demonstrate the possession of certain knowledge without revealing any information about it, if you want to understand how it works with simple examples, I recommend this article.
Within zero knowledge proofs, there are two main standards: SNARK and STARK, it is useful to understand the difference between these two, especially when comparing different ZK Rollups, here are some key points:
- SNARKs were discovered years before STARKs, so it has an advantage in terms of adoption (it has the most developer libraries and published code).
- SNARKs require a trusted setup, as long as at least one of the participats of this event be honest, the parameters are safely generated. STARKs do not require a trusted setup, hence the letter “T” in their name, for trustless.
- STARKs are resistant to quantum computing, SNARKs are not.
- STARKs spawn faster, but take up more space and take longer to verify. However, the cost is lower for large group of transactions, allowing them to be more scalable.
If you are interested in delving into the differences between SNARK and STARK, I recommend this article.
Optimistic Rollups vs ZK Rollups
ZK Rollups are superior to Optimistic Rollups in terms of security and scalability, since as we saw earlier, proofs of validity are superior to proofs of fraud.
*TPS: transactions per second.
Why is a ZK Rollup more secure than an Optimistic Rollup? This is because Optimistic Rollups use fraud proofs, which is less effective than validity proofs.
If an attack occurs in an Optimistic Rollup, in the worst case, the attacker could introduce a fraudulent state into the chain and steal the funds. Instead, if an attack occurs on a ZK Rollup, in the worst case, the attacker could only slow down the production of blocks, freezing the network, but even in this situation, users could withdraw their funds back to L1, therefore, there are no economic motivations to do an attack.
The zero-knowledge technology of ZK Rollups is based on complex mathematics, making it more difficult to build an EVM (a blockchain like Ethereum) on top of it. Creating an EVM allows projects built on Ethereum to easily migrate to L2. This complexity means that they are still in development, while Optimistic Rollups are already out and wining market share.
Due to fraud proofs, Optimistic Rollups have a 7 day waiting period when transferring funds from L2 to L1. With ZK Rollups, there are no delays, because a proof of validity has already verified the funds.
Plasma
Plasma uses fraud proofs (like Optimistic Rollups), but the data isn’t stored in L1, so it doesn’t provide the same security. It also doesn’t support general calculation, so it only supports basic token transfers and swaps. For all this, I rule it out as a long-term solution.
Validium
This solution uses validity proofs (such as ZK Rollups), but the data is not stored on L1, so it does not provide the same security as Ethereum, although it is not vulnerable to certain economic attacks and by not storing the data on-chain, they can achieve higher scalability.
Why is a ZK Rollup more secure than a Validium? We already saw that if an attack occurs on a ZK Rollup, the attacker could only stop the production of blocks, freezing the network, but even in this situation, users could withdraw their funds back to L1.
On the other hand, if an attack occurs in a Validium, in the worst case, the attacker could stop the production of blocks, freezing the network, and although the attacker could not steal the funds (as happens in an Optimistic Rollup) , users would not be able to withdraw the funds to L1.
Some applications like games might consider it acceptable to take this risk, to gain greater scalability and almost zero fees.
If you want to go deeper into the differences between ZK Rollup and Validium, I recommend this article.
Volition
Volition is an architecture (promoted by StarkWare) that fusion ZK Rollups with Validium, giving the user the freedom to choose to have the data on-chain (greater security) or off-chain (greater scalability and very low fees), being able to easily change between one and another.
Out of everything seen before, this architecture is the newest, is getting a lot of traction, and will be part of the overall design for StarkNet and zkSync 2.0 (more on that later).
The current battlefield
Below I will make a list of the main layer 2 projects.
Arbitrum
Arbitrum is an L2 built by the Offchain Labs team. The network is called Arbitrum One and it is an Optimistic Rollup.
Arbitrum One is currently the L2 with the highest TVL, since being an Optimistic Rollup, it was able to hit the market earlier, with a user experience equal to Ethereum, but with low fees.
Arbitrum is not just an Optimistic Rollup, as the team has announced that it will release other scalability solutions based on ZK proofs.
Optimism
Optimism is a Public Benefit Corporation that created Optimistic Ethereum, an Optimistic Rollup. It is very similar to Arbitrum, since both are Optimistic Rollups.
They recently announced the launch of their $OP token.
Polygon
Polygon started with a sidechain called Polygon PoS (a sidechain is an independent blockchain that runs parallel to Ethereum, it has its own consensus mechanism, it is not secured by L1, so it is not considered an L2).
With the funds obtained thanks to the popularity of their product, they began to develop different L2 solutions:
- Polygon Hermez: It’s a ZK Rollup that use SNARK, it’s already live, it’s only optimized for token transfers (scalable payments).
- Polygon Nightfall: It’s a privacy-focused Optimistic Rollup for businesses.
- Polygon Zero: It’s a ZK Rollup that uses the speed of Plonky2 to be more scalable and decentralized. Plonky2 is a recursive SNARK that is 100 times faster than existing alternatives and don’
- t need a trust configuration.
- Polygon Miden: is a general purpose ZK Rollup based on STARK.
zkSync
zkSync is a ZK Rollup created by Matter Labs, in its first version it doesn’t support EVM.
zkSync 2.0 is the name of the update that brings the zkEVM functionality, in which it will become compatible with EVM, also, despite being based on SNARK, it doesn’t require a trusted configuration. The public testnet is now live.
Finally, they have also announced zkPorter, a Validium that will allow more than 20,000 TPS. In zkSync 2.0 the state will be split into two sides: ZK Rollup with on-chain data availability and zkPorter with off-chain data availability, so it will be a Volition. Both parts will be composable and interoperable, from the user’s perspective the only noticeable difference will be a 100x reduction in fees for zkPorter accounts.
The data availability of zkPorter accounts will be ensured by zkSync token holders, called Guardians. It is important to know that PoS in zkSync is more secure than PoS in other systems, since the guards cannot steal funds. They can only freeze the zkPorter state (freezing their own share).
The data availability of zkPorter accounts will be ensured by zkSync token holders, called Guardians. It is important to know that PoS in zkSync is more secure than PoS in other systems, since the guards cannot steal funds. They can only freeze the zkPorter state (freezing their own share).
StarkWare
StarkWare is a company that develops scalability solutions based on STARK (they were the creators of this type of technology).
They created Cairo, their own smart contract language optimized for the development of their STARK-based products.
They developed StarkEx, a L2 scalability engine with which multiple applications (ZK Rollups/Validiums optimized for specific use cases) like dYdX, Immutable X, DeversiFi and Sorare.
Also, with Loopring they developed dAMM, a cross-L2 AMM design that allows liquidity to be shared between different ZK solutions, exposing LPs to more trades, giving more capital efficiency and solving liquidity fragmentation.
Lastly, they also created StarkNet, a general-purpose Volition based on STARK, will feature a range of data availability solutions, meaning users will be able to switch between a ZK Rollup and Validium with ease. StarkNet Alpha is now live.
The most probable future (personal opinion)
Rollups + data sharding is likely to be the winning solution for high scalability in the long run, if you want to understand why in depth I recommend this article.
Why? It turns out that sharding could push Ethereum up to ~5,000 TPS in the base layer, which in the long run is not enough and would bring us back to square one. But if the sharding is focused on data availability for rollups, they could achieve +100,000 TPS.
So it’s not a battle between sharding and L2, they will work together!
This leads us to a conclusion:
In the long term, all Ethereum activity will take place on L2, while the Ethereum base layer will be optimized to provide security and data availability to L2, being the best option thanks to its decentralization.
Among the L2s, ZK Rollups are likely to be the winners as they are the safest. Validiums can also capture some of the retail users and specific use cases (such as gaming or high-frequency exchanges), thanks to their scalability and near-zero fees.
I also believe that in the long term, most of the activity will be carried out from phones, where the user experience in Web3 applications will have all the complexities abstracted, the protocols will be integrated in the interface of the wallets and not in individual websites.
There will be multiple mobile wallets/apps based on ZK Rollups and Validiums, both general purpose and optimized for specific use cases. Liquidity will be shared between them, and users will have all the complexities abstracted away.
My two favorite candidates are StarkWare and zkSync.
StarkWare has the best team and the best technological developments, its general purpose Voliton StarkNet and all the apps created with StarkEx are the future, here is a video of the dYdX app for reference:
zkSync is not far behind, their general purpose Volition zkSync 2.0 is most innovative, and it seems that they will give their token great utility/value. They also have better marketing, which is not to be taken lightly, here is a GIF of the Argent wallet on the zkSync network for reference:
If you want to dig deeper into the differences between StarkWare and zkSync, I recommend this article.
I’m not ruling out Arbitrum either, good marketing and the network effect is not something to be taken lightly, so if he manages to successfully pivot into a ZK Rollup, he’ll be an interesting candidate.
There are many possible solutions/scenarios and seeing its evolution in the coming years will be very exciting.
Some tools
Lastly, I would like to include a list of tools to track L2 development/adoption:
- L2BEAT: the best tool.
- L2Fees.info: allows you to see the fees for each L2.
- ETHTPS.info: allows you to see the TPS for each L2.
As people to follow on twitter, I recommend @VitalikButerin, @sassal0x, @EliBenSasson, @gluk64, @Swagtimus y @aliatiia_.
If you liked the article, you can follow me on Twitter: @0ctoshi.