
Original Author: Polynya
I never wrote an article about "Optimistic Rollups vs. ZK-Rollups". They are all great. My articles are all about fighting against horribly inefficient, unscalable, insecure, and inelastic monolithic L1 blockchains, and we've seen the ridiculous configuration of these L1 networks by capital. My sole purpose is to see blockchain scale to global ubiquity in a technologically, economically and socially sustainable manner. Not only are monolithic L1 blockchain networks unsustainable, they will in fact never be able to deliver the required throughput — and are orders of magnitude short of the target. But that's not a problem anymore -We need modular execution layer & data availability sampling to scale blockchain. This point has never been so clear. The sooner we recognize this and move to this approach, the better off the blockchain industry will be. Yes, this is just my opinion. As always, please consider this article an amateur stream-of-consciousness rambling rather than a professional research article.
Monolithic L1 blockchains are (still) extremely inefficient
I started writing a review on Rollups in 2020, and blogging at this time last year, the prevailing narrative at the time was that "Cardano/other L1 smart contract platforms are coming and users will migrate massively from Ethereum overnight." to other L1 networks.” The later statement is that “L2 networks are temporary stopgap measures, and the only way to achieve expansion is L1 networks.” However, even with the most modest tests in late 2021, the narrative of these alternative L1 networks is Disintegrates with astonishing speed:
Binance Smart Chain (BSC)Makes its system more demanding due to state bloat. As a result, the nodes start getting out of sync, causing many problems. The problem here is that they specified very low system requirements in the first place - but they didn't tell people,System requirements grow exponentially with state inflation. Now, they make reckless network changes without adequate auditing or testing. Of course, switching to Erigon and having multiple chains will provide incremental benefits, but there will always be serious limitations.
SolanaNo such mistake was made, they were very open to high system requirements from the start. Now, I'm definitely not going to criticize Solana for its various failures and problems, because that's largely because it's aEarly beta product. Bugs and issues due to missing features will always show up in beta projects, be it Rollups, dapps, or monolithic L1 networks, I just hope the developers fix them. But the problem is that over time, when Solana matures, has been tested to eliminate bugs, and implements a fee market, it will need to provide an incremental throughput, andGreat price to pay in terms of technical and economic sustainability. Solana is inherently non-scalable. Optimistic Rollups are a much better solution than Solana and will mature quickly.
Polygon PoS Arguably the most adopted chain after Ethereum. Now, Polygon PoS is indeed a "commit chain" (commit chain), not an alternative L1 chain, but it is still a monolithic chain, andSubject to the same inefficiency constraints as L1 networks. Polygon PoS reached it's limit and was affected by spam, raising their minimum gas price. But even after that, a lot of projects spammed it, causing the gas price to increase by more than $0.1. To be clear, this is a much better result than Solana or Cardano,In Solana or Cardano, 99% of transactions will fail during congestion, only tiny MEV bots will succeed.To their credit, unlike other monolithic blockchain projects, the Polygon team has very openly acknowledged these limitations andPut all your energy into ZK-Rollup- This will actually enable high scalability. Actions speak louder than words, and the Polygon team deserves credit for investing $1 billion in zero-knowledge technology.
Speaking ofCardano, they are also a very early beta product, like Solana, alsoA fee market must be implemented. Cardano's system requirements remain low. Recently, I've seen a growing interest in Rollups from the Cardano community, and it's great to see that happening! However,All of this will be for naught until Cardano itself implements data availability sampling.
We see that there are many other projects that do not live up to their hype. Whenever the block space is saturated,Avalanche C-Chaincosts would skyrocket -- I mean,This is an essential feature of monolithic blockchains.Subnets lead to fragmentation of security or decentralization and will be subject to equally severe limitations (i.e. skyrocketing fees). As for Avalanche's "online Purning" (online pruning, where "pruning" refers to nodes compressing past historical transactions): Let's wait and see, but this seems to implement Geth's "offline purning" and make it Prune at a higher frequency. This might be a good addition to Geth,But it definitely doesn't solve the fundamental limitation of state inflation. We've seen Harmony fail and more. But I also want to highlight these projects that are building scalability solutions for the next generation:Data availability sampling for Ethereum, Tezos, Celestia, and Polygon Avail; validity proofs for Mina and Aleo; and many more Rollups schemes, there seems to be a new Rollup every week now! It is clear that we have entered the era of "modular architecture" - few people will seriously build a new monolithic L1 blockchain. In a pinch,"Prototype modular" projects like Polkadot and NEAR are medium-term solutions that don't solve many of the problems above, but still maintain sustainability and security. If you don't care about sustainability and security, Dfinity/ICP is building interesting stuff。
I also want to be clear that there is a path forward for monolithic L1 blockchains:Upgrade to Next-Gen Technology. For example, Avalanche can implement a "data availability sampling subnetwork" under the ground, which is verified by the entire validator set, and introduce a modular execution layer. Unless it's a priority on their roadmap, I'm going to keep pushing the narrative until this shift is commonplace across the industry.
Now, not every chain has to be a Rollup or have some form of modular design.Sovereign L1 chains still have their place in situations where security is not important, and when you want to implement some new feature that is difficult or impossible to implement in Rollups.Granted, this is very much a niche market, but it's real.CosmosThe ecosystem does a great job of this,Polygon EdgeCompelling solutions are also being built, though I'd like to see these chains proven to be valid, and IBC (interchain communication) evolving to verify proof of validity.A "bridge" across L1 blockchainsis also like this. But even L1 cross-chain bridges that prove to be perfect in terms of effectiveness, such as the =nil; Foundation is building "Mina<>Ethereum Bridge",stillHowever, it needs to be assumed that this more vulnerable chain (i.e. the Mina chain) cannot be attacked; in contrast, the Rollups "bridge"Able to provide complete security assurance, even if the weaker Rollup chain is attacked, you can still inherit the security of the stronger chain.
Finally, the timing of the discussion is important. Currently, Optimistic Rollups are not ready, so it still makes sense to use these non-beta monolithic L1 blockchains. It should be noted that whether it is Optimistic Rollups or a monolithic L1 chain, there arevarying degrees of maturity/instability, so you have to evaluate on a case-by-case basis. But I won't discuss that in this article, my only interest isHow Blockchain Can Scale Massively and Sustainably in the Long Term. But Optimistic Rollups are rapidly maturing and have a clear path to becoming a sustainable solution. It just takes engineering work to make it happen - there's a good chance that at least one Optimistic Rollup will be fully decentralized, enable data compression, have a high-liquidity "bridge", and scale in a year's time.Once Optimistic Rollups are ready for their prime time, it's game over for all monolithic L1 blockchain networks.
In the past, I've taken a very long-term view, so I may have discussed ZK-Rollups in a more positive light.I always thought that ZK-Rollups would be the end game, and thought that all Optimistic Rollups would either convert to ZK-Rollups or use validity proofs to replace their fraud proof systems.But that may be 3 years away.
The conclusions of the first part above are:Monolithic L1 blockchains are a dead end, the evidence on this point is overwhelming, so I want to stress this point thoroughly. The following is the second part of this article, which will mainly focus on Ethereum, because Ethereum is where all the Rollups innovations are located, and Ethereum has the most ambitious scalability roadmap.
Optimistic Rollups vs. ZK-Rollups
proof of fraudproof of fraudValidity certificateValidity certificate(ZK-Rollups) Secure Rollups.
transaction fee
let's start withapplication-specific Rollups start: obviously,ZK-Rollups Lead in this regard.Loopring、zkSyncand other schemes are popular in the payment field, and the transfer fee of its ERC-20 Token is around $0.10. At the time of writing, a decentralized trading platform based on ZK-Rollup technology ZigZagThe flat fee on the platform is $0.28, which includes gas fees and transaction fees. At the same time, the decentralized derivatives trading platform dYdXThe platform does not have a gas fee for users, but we can calculate the transaction fee of the platform: when the transaction volume is high, they pay a gas fee of $0.08 to Ethereum for each transaction; It's around $0.10.
Optimistic Rollup is now likely to be able to offer fees in this range - in fact, the Worldcoin project plans to use Hubble(L2 network based on Optimistic Rollup) ERC-20 transfer fees are currentlyRange below $0.10. We continue to move to smart contract Rollups - why the currentOptimism and ArbitrumFees so high on the web? At the time of writing, according to Lefees.info, the token exchange fee on Optimism is $0.85, while on Arbitrum it is $1.35, which is ridiculously high!
The answer is simple:These Optimistic Rollups themselves have not been optimized, and most of the early dApps projects deployed on Optimistic Rollups are forked versions of original projects on Ethereum, which are not designed for Optimistic Rollups.Recently, by optimizing for Optimistic Rollups Aave V3 Successfully reduced costs by about 10 times!
But there will be more optimizations.Signature aggregation/compression will directly save about 1,000 Gas per transaction.The basic compression of call data (calldata) can save 2.5 times directly, and more and more advanced schemes will appear.As Optimistic Rollups and the dApps deployed on them optimize, Optimistic Rollups transaction fees will easily be in the $0.01-$0.10 range.
Wait, this is the situation before the arrival of The Surge stage in the development roadmap of Ethereum (that is, the scalability of Rollups is greatly improved through sharding)! If the Ethereum Shanghai hard fork upgrade in late 2022 (which will be the first upgrade after the merger of Ethereum) goes well, then the first step will likely be the introduction of "Transactions with blobs" (blob-carrying transactions, which is a new transaction format proposed by Vitalik),This will bring the cost of calldata down to roughly zero, and Optimistic Rollups will actually become cheaper!
Today, ZK-Rollups have high fixed costs. Currently, ZK-Rollups are cheaper because the cost of invoking data exceeds this fixed cost; however, as the cost of invoking data becomes negligible, transaction fees will be completely dominated by the fixed cost of ZK-Rollups.And ZK-Rollups are much more expensive to run.
Obviously, there are many different proof systems out there with different costs, butA common estimate is $0.01-$0.02. This will be a minimum cost of ZK-Rollups. However, if they wish,Optimistic Rollups are free to drop even lower: Since 99% of the cost of a mature Optimistic Rollups is the cost of invoking data, they can access a blobspace of ~5200 TPS at negligible cost.
By the way,Optimistic Rollups will also be cheaper than the Validiums scheme (which keeps its data availability off-chain), because this minimum cost also applies to Validiums! I believe zkPorter(This is a Validium solution) transaction costs are between $0.01-0.03, while Optimistic Rollups can cost much less than that. Personally, I wouldn't recommend this scenario for deal quality reasons, but in this case Optimistic Rollups will end up with higher "profits" that can be redistributed to stakeholders, or It is used for public goods financing, development, etc.
Of course, eventually, ~5200 TPS will saturate, and if there is a huge demand beyond that, the call data cost will start to rise again. But, by then,DankshardingWill roll out, first expanding this space to 125,000 TPS and then to millions of TPS over several years. (By the way, the "TPS" number is meaningless when discussing Rollups, but it is useful for illustrative purposes.) In the long run, the cost of invoking data will definitely not be a bottleneck -- the bottleneck will be Rollups themselves. To reiterate, the bottleneck will be Rollups itself, not Ethereum.
In the long run,As ZK-Rollups mature, we will have ASIC provers and the cost of ZK-Rollups will become trivial.At that point, the advantages of ZK-Rollups — most notably instant withdrawals (no waiting) — will win out. They can quickly become much cheaper than Optimistic Rollups for some use cases with highly compressed state deltas (like dYdX).
Finality
Speaking of which, a common misconception is that Optimistic Rollups have a 7-day strike period. But in fact, Optimistic Rollups will achieve the same finality as L1 faster than ZK-Rollups. We've seen Optimistic Rollups submit batches of transactions every 5 to 10 minutes, so that's the latency. These 7 days are to ensure that this finality is maintained and it is assumed that at least one entity will maintain this finality.As Optimistic Rollups scale, these transaction batches will be committed more frequently, and when reaching about 20 TPS, Optimistic Rollups can be submitted in each block, at this time the finality of Optimistic Rollups will be equal to the finality of L1. Since the fixed cost of ZK-Rollups is much higher, committing at each block will require more activity (>100 PTS) to achieve. However, with this blob transaction EIP (Ethereum Improvement Proposal) proposed by Vitallik, ZK-Rollups can be redesigned to commit some proofs to blobs, so this may not be an issue.
So, what are these 7 days of Optimistic Rollups? Because the challenge period is 7 days, there is a transaction that does have a 7-day finalization period, which is the withdrawal from Optimistic Rollups to the L1 chain. For some cases, such as cross-chain NFTs, this can be a challenge. However, we have seen many "bridges" live on Optimistic Rollups, and as Optimistic Rollups mature, activity & liquidity will increase,Then the 7-day challenge period will no longer be an issue. The bigger problem is that ZK-Rollups enable many new use cases and cross-Rollup activities that cannot be realized on Optimistic Rollups.
For example, with the help of Danksharding, ZK-Rollups can call L1 synchronously. I even speculate that if we implement L1 pre-confirmation through crLists, a certain degree of composability between different ZK-Rollups will be possible! Optimistic Rollups are excluded from these novel and innovative scenarios. appendix:While Optimistic Rollups enable private transactions, ZK-Rollups will enable such transactions at a much lower cost.
throughput
Application-specific Rollups are fairly lean and massively scalable. If I remember correctly, back in mid-2020, StarkEx demonstrated 9000 - 18000 TPS. However, for smart contract Rollups, the situation is more challenging. We have seen that StarkNet is only capable of lower throughput than dYdX or Immutable X, and makes throughput optimization a top priority. Because both Optimism and Arbitrum are based on EVM clients, they a) have battle-tested codebases and b) relatively optimized clients. A few days ago I asked how far the EVM could scale before requiring parallelism, and Alexey Sharp suggested that Erigon could scale to 500M Gas/sec. So there is a lot of room for optimized EVM-based Optimistic Rollups, and more room can be provided by multi-threaded clients or multiple instance/recursive Rollups.
This is our bone of contention: because Optimistic Rollups has an honest minority assumption, you can't push system requirements too hard. To be clear, because this is an honest minority assumption rather than the honest majority assumption of monolithic L1s, Optimistic Rollups can be more secure than any monolithic L1 blockchain. But you still need to have a limit, which needs to be lower than ZK-Rollups by default, because ZK-Rollups can be easily verified with validity proofs.
But Optimistic Rollups has a solution -stateless client. I saw this on Optimism's roadmap, but I can't remember where. Validating Optimistic Rollups is very easy with a stateless client, and validating transactions with the right tools will be very simple. Furthermore, Rollups are more aggressive than L1 by resorting to state expiration because the state of Rollups can be easily reconstructed directly from L1. Once statelessness and high-frequency state expiration are achieved, Rollups will have overcome the serious problem of state bloat! Also, you have newer solutions like Fuel V2 which parallelize through a UTXO (unspent transaction output) like system.
Summarize
Summarize
Ultimately, it's all about the timeline.
For application-specific chains, ZK-Rollups are already the best solution in most cases. This should be pretty obvious to anyone who has used dYdX, zkSync, Loopring or Immutable X. There will be some tradeoffs, but all of them will be ready by the end of the year (like dYdX V4).
Smart Contracts: The monolithic L1 chain has a year left to remain relevant.The omens are set for these monolithic L1 chains, and there is no other way but an urgent shift to using fraud proofs, validity proofs, and DA (data availability) proofs.
Optimistic Rollups will scale faster than ZK-Rollups.Much of the codebase for Optimistic Rollups has matured, and once ordering and upgradability are decentralized, Optimistic Rollups will be ready for mass adoption. By the end of 2022, Optimistic Rollups may usher in a Gas fee of less than one cent, fully decentralized, and essentially have the same security and finality as Ethereum L1, and have enough liquidity for fast withdraw money. andOptimistic Rollups will continue to improve with the implementation of statelessness and state expiration in 2023.
ZK-Rollups will continue to evolve, mature and well-tested, optimizing proof times, moving to GPU provers and eventually ASIC provers. Their novel virtual machines and sequencer nodes will also mature and expand over time.By the end of 2023, I expect ZK-Rollups to catch up and replace Optimistic Rollups. But Optimistic Rollups will continue to function until 2024/25, by which time I expect most Optimistic Rollups will become ZK-Rollups, or at least replace their fraud proof systems with proofs of validity.
As I've said many times, my time horizon is 5-10 years. But Rollups and DAS (Data Availability Sampling) are moving so fast that I now think its end is in sight and will happen in 5 years.
Thanks to Reddit user u/proof_of_lake for proofreading.