Want to go full-time DAO but need health benefits? Opolis provides benefits to DAO workers.
Dear Bankless Nation,
Don’t believe the FUD.
Ethereum is scaling today.
In it, he explained why Ethereum is moving from a monolithic design, in which consensus, execution, and data availability happen all in one place, to a modular design that compartmentalizes and optimizes these functions.
Today we’re going deep on the execution layer. The execution layer is where most of us do DeFi today. But tomorrow the execution layer will be rollups.
Rollups are how modular chains like Ethereum scale. As you learn more about rollups, you’ll begin to realize that not all rollups are the same.
At the highest level, two types are important: zkRollups and optimistic rollups.
Today, we’re focusing on zkRollups—a rollup design that uses zero-knowledge cryptographic proofs to validate transactions.
Instead of getting into the technical details, today we’re looking at the implementation of zkRollups by comparing Matter Labs and Starkware—both have functioning zkRollups with money flowing through them!
Zero-knowledge cryptography is the cutting edge of the cutting edge. And general purpose zkRollups are the holy grail for Ethereum scalability.
So when zkRollups?
Alex Beckett introduces us to two of the best zkRollup projects today.
🙏 Sponsor: Lido—simplified and secure liquid staking for digital assets.
Guest Writer: Alex Beckett, a zkStudent writing about crypto.
zkRollups: Matter Labs and Starkware Comparison
Ethereum has long faced challenges in implementing scaling solutions. After many years of research and development, the Ethereum developer community has shifted towards a rollup-centric roadmap.
However, not all rollups are the same. Today, we’ll discuss zkRollups.
Two of the leading teams competing in the zkRollup space are Matter Labs and Starkware. Matter labs with zkSync 1 and 2, and StarkWare with StarkEx and StarkNet.
Let’s dive into these projects. But first, a quick primer on what Rollups are.
⚠️ Note! Information about each network will be subject to change as they continue development and receive further usage.
A Background on Rollups
Rollups are a scaling solution that works by bundling transactions together, compressing them, and sending them to a consensus layer to be verified. This increases efficiency by verifying multiple transactions at once while also scaling by increasing the number of transactions that can be executed.
Suddenly, Ethereum can go from 15 to 3000+ TPS without sacrificing security.
In particular, zkRollups are unique to optimistic rollups because they have the ability to integrate privacy into the rollup using zero-knowledge technology. Zero-knowledge achieves privacy by allowing one party to prove something to another party without disclosing the information necessary to prove it. However, not all zkRollups utilize the privacy properties of zero-knowledge technology.
zkRollups work off economies of scale, where more users transacting makes the network cheaper to use. This is the opposite of a typical blockchain, which gets more expensive as network usage increases.
This new innovative dynamic between rollups and Ethereum is labeled a “modular blockchain.”
zkRollups on Mainnet
StarkEx is a zkRollup by StarkWare that launched in June 2020 with support for general smart contracts (general here refers to the ability for smart contracts to have the functionality to run any arbitrary logic.) Applications can deploy on StarkEx and harness the scalability of a zkRollup while providing similar, if not better, user experiences than that of Ethereum.
To date, StarkEx has processed 42M transactions and a cumulative trading volume of $185B across the four protocols it hosts—those being dYdX, ImmutableX, DeversiFi, and Sorare.
Through the significant usage StarkEx applications have facilitated, the network has demonstrated a rate of over 9,000 TPS for trades and 18,000 TPS for transfers. With Ethereum’s ~15 TPS for trades, it is a ~600x increase in scalability. On top of that, StarkEx has also reached a peak batch size of 13.5k transactions.
While rollups deploy on Ethereum, they are constrained by its limitations. StarkEx has introduced a new system termed validium to offer a cheaper option to apps and users.
Validium’s mechanism is very similar to a zkRollup, the only difference being that data-availability in a zkRollup is on-chain, while Validium keeps it off-chain. This permits Validium to achieve considerably higher throughput
Eli Ben-Sasson @EliBenSasson@avihu28 @VitalikButerin @StarkWareLtd @reddit @ethereum @fuellabs_ Suggest *Validia* for this class of protocols, like plasma in having data offchain, like zk-rollups in being validity proofs. (Thanks, @VitalikButerin for Latin spelling help :-)
Validium transaction fees are inexpensive to the point where, in practice, they have been abstracted away by protocols on StarkEx. ImmutableX is one such example, with $0 gas fees for both minting and trading NFTs, compared to that of Ethereum where an NFT trade can cost anywhere from $20 - $250. DiversiFi also features $0 gas fees, allowing it to follow a similar fee structure to centralized exchanges, which are tiered based on trading size.
StarkEx also features SHARP, a service that allows rollup batches from multiple apps to be aggregated into a single batch and published to Ethereum at once. It is currently operational with DeversiFi and Sorare, allowing them to provide further cost reductions for their users.
zkSync is a zkRollup by Matter Labs that is built for scalable payments, where users can deposit onto the network and transfer between other zkSync accounts at a fraction of the costs on Ethereum. Since mainnet launch in June 2020, it has processed 4M transactions with transfers fees as low as $0.20.
Transactions can be paid for with any supported token (e.g. ETH, DAI, RAI) as well as the token that is being transferred—removing the need to hold a token specifically for paying transaction fees. TVL of all the deposits made to zkSync total $24M.
The highest capacity measured so far was during a Gitcoin grants round that saw a peak load of 20,000 transactions per hour—5.6 TPS. Though it is a significant amount less than the 18,000 transfers demonstrated by StarkEx, it was sustained for an entire hour.
While zkSync can theoretically process significantly more, the low capacity can likely be attributed to the lack of volume. For example, professional traders on dYdX (on StarkEx) net a lot more transactions than value transfers, like on Gitcoin.
In July, zkSync also added functionality for NFTs. This includes minting, swapping, transferring, and withdrawing to Ethereum.
ZKNFT is a proof-of-concept NFT marketplace built to demonstrate zkSync’s NFT functionality. All NFTs are pinned to IPFS with minting/trading costs of approximately $0.25.
While zkRollups aren’t required to have a waiting period for withdrawals, like optimistic rollups, zkRollups do have to wait for blocks to be filled before they are sent to L1. In practice, this means withdrawals could take several hours if the volume is low.
💡 Alex G, co-founder of zkSync notes that StarkWare and zkSync, in their current forms, are designed for different user groups. For example, zkSync has permissive licensing (Apache/MIT) whereas StarkWare is proprietary.
Deployed on Testnet
StarkNet is StarkWare’s next iteration of a zkRollup, with a planned alpha mainnet launch this month. Doing so will make it the first zkRollup to feature general smart contracts on a fully composable network—a feat thought to be years away.
Composability refers to the ability for applications to coordinate, build on top of one another, and interconnect. So far, zkRollups with smart contract functionality, like StarkEx, have not had the ability for applications to be composable.
StarkNet’s testnet has been live with general smart contracts since June, and composability since August. Application deployment is permissionless, so anybody can write smart contracts and publish them on the testnet using Cairo, the native programming language. StarkWare has provided a simple DEX to demonstrate StarkNet functionality in collaboration with dOrg.
In the hopes of providing a similar developer experience to Ethereum, the Warp team demonstrated the ability to compile Ethereum EVM code into StarkNet contracts.
Having a permissionless environment has allowed for fruitful experimentation. Twitter user Guiltygyoza has also demonstrated physics simulations on the StarkNet testnet, opening the door for primitives to be built to support gaming.
zkSync 2 is the next version of the initial zkSync network, aiming to also feature fully composable smart contracts on a zkRollup. The testnet for zkSync 2 launched in October with Curve Finance as the initial testnet application.
ZkSync 2 has also introduced a zkEVM testnet—the first of its kind. A zkEVM is a virtual machine that simulates an environment like Ethereum, allowing Ethereum smart contracts to be deployed on a zkRollup. The zkEVM testnet was first introduced with UniSync, a fork of Uniswap V2, to demonstrate its functionality.
Since its launch in October, UniSync has handled over 3,000,000 transactions on its testnet. Although, all of zkSync’s testnets are currently in closed beta, allowing only whitelisted access for application deployment.
Roadmaps are important in defining future objectives and simplifying the goals of a complicated journey. Both StarkNet and zkSync 2 have visions of a roadmap that display their goals, with each converging towards an end goal of security and stability for users with a fully decentralized system.
The StarkNet roadmap has four steps:
Step 0 – Foundations ✅
Step 1 – Planets: Single-app rollups ✅
Step 2 – Constellations: Multi-app rollups
Step 3 – Universe: A decentralized rollup
The initial step provided the foundations upon which StarkNet was built. This included the Cairo programming language and SHARP, allowing developers to build smart contracts in a language that is optimized for a zkRollup while sharing costs.
Step 2 is the current phase of the roadmap StarkWare is building towards, which will be completed with the release of mainnet in November - marking the release of StarkNet as a fully composable zkRollup that supports general smart contracts.
The final step is when StarkNet transitions into a fully decentralized, permissionless rollup. This won't be completed at the same time as the initial mainnet release because the system will still be in alpha testing to ensure that any bugs can be mitigated without causing damage to the system. StarkNet is cutting-edge technology and will need time to be battle-tested for security. With the initial mainnet release, StarkNet will operate the only sequencer and have permissioned smart contract deployment. Once StarkWare anticipates StarkNet’s security is sufficient, it will decentralize so that any parts run solely by StarkWare will be made available for permissionless entry.
The first phase of zkSync’s roadmap started with the deployment of zkSync - a zkRollup focused on scalable payments.
Phase 2 plans for composable smart contracts on a new network called zkSync 2, which is expected to release on mainnet sometime in the next few months. Alongside it, a new programming language, Zinc, will be natively supported, as will Solidity.
zkSync 2 will also introduce zkPorter, a PoS chain that will allow zkSync 2 users to publish transaction data on zkPorter instead of Ethereum, enabling higher transaction throughput. Because zkPorter transactions aren’t limited by Ethereum transaction fees, it is expected to be an even cheaper alternative.
Phase 3 introduces privacy, unlocking the other notable feature of zkRollups. This will be done at a time when zk proofs won’t add significant overhead to the system. The final phase involves transitioning zkSync 2 towards censorship resistance - requiring the system to decentralize and become permissionless by removing any complete control the Matter Labs team has over the network.
Both StarkWare and Matter Labs feature networks with cutting-edge technology in the form of zkRollups, that are pushing the boundaries on blockchain scaling, privacy, and efficient cryptography.
For networks that you can play with right now, StarkEx is live with four applications, DyDx and DiversiFi for trading, and ImmutableX and Sorare for NFTs. zkSync is live for payments with primitive NFT functionality featured with ZKNFT.
Although, of the two it is clear that StarkEx has demonstrated usage and performance that is far above that of zkSync. With metrics such as $185B in cumulative trading volume and a verifiable capacity of 9,000 TPS for trades, it stands not only as the most used zkRollup but the most used rollup overall when measured by total transaction volume – beating the likes of zkSync, Optimism, and Arbitrum by over 10x. With the launch of StarkNet this month, StarkWare will have produced a zkRollup that features full composability with general smart contracts – thought of by many to be years away from happening.
Ultimately, be on the lookout for the mainnet releases of both StarkNet and zkSync 2 as this is the future of blockchain scaling as we know it.
🙏Thanks to our sponsor
Lido lets users stake their assets and receive a tokenized derivative that automatically earns daily rewards. With Lido, your staked assets can be used across the DeFi ecosystem. You can lend, borrow, and more with your assets while maximizing your yield. Stake with Lido.
Want to get featured on Bankless? Send your article to firstname.lastname@example.org
Not financial or tax advice. This newsletter is strictly educational and is not investment advice or a solicitation to buy or sell any assets or to make any financial decisions. This newsletter is not tax advice. Talk to your accountant. Do your own research.
Disclosure. From time-to-time I may add links in this newsletter to products I use. I may receive commission if you make a purchase through one of these links. Additionally, the Bankless writers hold crypto assets. See our investment disclosures here.