Welcome, Crypto Dummies!
If you’re new here, this substack focuses on educating those that know nothing about crypto and blockchain technology. If that’s you, then you’re in the right place!
This week, we’re taking a look at ZKRollups, how they work, and what can be accomplished with this technology.
Let’s dive in!
Scalability
Scalability has been a persistent issue for public blockchains like Ethereum. Scalability refers to the ability of the blockchain to process and confirm transactions quickly. We have seen tremendous growth in the number of users in web3 with the current NFT mania, and people becoming more interested in the technology and trying to educate themselves. As a result of this congestion on the Ethereum network has reached all-time highs, resulting in triple-digit transaction fees at peak times. To solve this issue, the network needs to be scaled.
Scaling Solutions
So what scaling solutions are available? When it comes to scaling solutions we have 2 options available. We can scale via Layer 1( building sidechains to the Layer 1), and scaling via Layer 2 (building solutions on top of Layer 1). If layer 1 is the real estate, Layer 2 is the structure built on top of it.
To scale Layer 1, specialized nodes or bigger blocks would be required to handle the increased workload on the network. This can result in higher centralization and reduction of security. Layer 2 processes transactions off-chain and then submits the transaction data to Layer 1. This leverages the security and consensus model of the underlying Layer 1.
Rollups
Rollups process transactions outside of the underlying Layer 1 and ‘roll-up’ or bundle transactions into a batch. The data is then compressed and posted on the Ethereum Layer 1. By processing transactions off-chain, Rollups can reduce some of the pressure placed on the underlying network. As we look deeper into rollups we need to understand that there are two types: Optimistic Rollups and ZK Rollups.
Optimistic Rollups
How do Optimistic Rollups work?
OP(Optimistic) Rollups, use fraud proofs and make use of a dispute resolution system. This system validates fraud proofs and executes punishments. OP Rollups allow a batch to be posted, assuming it’s correct, if there is no fraud detected then the rollup has no work to do. If the batch is false, the system proceeds to identify the malicious node and punish them. Typically, there are two parties involved in a dispute resolution system; the node that submits the batch and a suspecting node that submits a fraud proof. Both nodes provide a bond in $ETH that is slashed in the event of any suspicious activity by either of them.
Let’s take a look at what this looks like. Let’s say a user submits a batch of transactions and the batch is posted, if another user suspects the batch of transactions to be false, they will submit a fraud proof. The system then will re-execute the transaction on Layer 1, while maintaining the current state of the network when the batch was initially posted. If the batch is found to be fraudulent, the user who submitted the batch will have their ETH slashed. If the batch is valid, the user providing a fraud proof will have their ETH slashed. This discourages users from spamming the network with false fraud proofs.
Ex of Optimistic Rollups: Optimisim, Arbitrum, Boba Network, etc.
ZK(Zero-Knowledge) Rollups
How do ZK Rollups work?
ZK Rollups use what’s known as validity proofs. Every batch of transactions includes a ZK-SNARK (Zero-Knowledge Succinct Non-Interactive Argument of Knowledge). A cryptographic proof that signifies transactions are legitimate and valid. ZK-SNARK allows users to send transactions across a blockchain entirely encrypted. These transactions cannot be read by anyone, and the ZK-SNARK functions as proof that the transactions are valid. They automatically prove that the submitted batch is valid as soon as it is submitted. Proof can be easily verified on the underlying Layer 1, regardless of computation size.
Imagine sharing your netflix account with someone without giving them your username and password. This is exactly how ZK-SNARKS work.
Ex of ZK Rollups: zkSync, Immutable X, Loopring, Aztec Network, etc.
Wrapping it up
As crypto continues to mature and bloom, the amount of users will continue to grow. Just as with the introduction of the internet, the introduction of blockchain technology has come to disrupt the technology sector. With more users familiarizing themselves with Ethereum and crypto technology, rollups will play a more pivotal role in handling transactions for Ethereum. Both Optimistic and ZK Rollups have their advantages and disadvantages.
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.
-Vitalik Buterin
That’s all for today, i’ll see all you crypto dummies next week!