Welcome, subscribers! Thank you for subscribing. What will be shared today and the days ahead are alpha from our Economics Design's researchers.
Please keep these mails secret and do not share them with any one because these alpha are confidential. Enjoy your reading.
Introduction
In this article we take a look at a layer 2 scalability solution called ZK-Rollups. ZK-rollups send transactions using a cryptographic verification method called Zero-Knowledge Proof.
What is Zero-Knowledge Proof?
ZKP means zero-knowledge proof. This is something that is in cryptography and has been in place since the 1980s. Specifically, 1985 in the paper titled “The Knowledge Complexity of Interactive Proof-Systems” by 3 researchers, including Silvio Micali. Yes, the Algorand guy.
ELI5 How it works: you are in a lift. If it is just you and I, and it smells like fart, and I didn’t do it, it means you did it. But if there are 25 people in the lift, you can’t tell who did it. In the same way, ZKP is a type of technology that masks identity. With math.
It's just a form of cryptography that's very important and we use them in different ways. Now zero-knowledge has two applications in the crypto space, one is called ZK-Snarks and one is called ZK-Rollups. These two have some very different functions. The main function of ZK-Snark is privacy. However, ZK-Rollups is for scalability. The ZK-Snarks is usually used in the layer 1 solutions whereas ZK-Rollups is used in layer 2 solutions.
What is Layer 1 vs Layer 2
Layer one is really the base layer and layer two is the scalability layer. Let’s take the analogy of transportation. Layer 1 is a bicycle driving 1 person (you) from A to B. Layer 2 is a bus, that consolidates 20 people and drive everyone from A to B. It is more efficient.
What are ZK Roll-ups?
ZK-rollups send transactions using a cryptographic verification method called Zero-Knowledge Proof. It is a way for different parties to prove to each other that they have specific information without having to disclose the details of what it is. A great advantage of this is that this process can happen almost instantly, and there is virtually no chance for corrupted state submissions.
Let's go back to the example of roads and cars. We have two different time period. State 1 includes all existing transactions and State 2 is the time period where new transactions are being approved.
How do we get from State 1 to State 2?
We have each road leading from state one to state two. On each road you have a bicycle and each bicycle has these little transaction data packets that they are sending. You have to pay transaction fees to go to state two so you get to state one, get verified, and then you go to state two and this is the existing layer one solution.
Bicycles are inefficient. If I want to go from point A to point B then yes, I can ride the bicycle. But if I am going to be delivering a bigger package (bigger data packets) or more lots of people are going to the same place, it might be more efficient to use a bus or car instead. The roads are not cogged up and it is a more efficient way of transportation.
So, I will have a bus that is scheduled to leave State 2 (current transactions) to State 1 (all existing transactions). Now I just have to send one transaction to the bus. The bus will bring everyone’s transaction together to State 1.
so instead of having one passenger in each bicycle, the bus will have a lot of different passengers and now I'm only paying a fixed fee of let’s say $ to be on the bus. Instead of a $$$ for each individual to be cycling (including the cost of buying the bicycle, time and energy spent for cycling). In the end, the price becomes cheaper for transaction, and this is basically the mechanism of scalability.
ZK-Rollups come in the technology aspect to aggregate these transactions into a plane and allow the plane to be sending the transactions to state 2.
How does that look like in a smart contract application?
Instead of having small little transactions going up to block two directly, you could go via a third party which will be layer two. Basically, all the transactions on block one go-to layer two which aggregates all the transactions and then populates block two. It's the same concept but instead of little bicycles going from A to B, they go to layer two which will collect all the information and propagate in block two.
Value Add
The cool thing is that layer 2 does computation off-chain which means within layer 2 itself you can have plenty of transactions for free. The only time you have to pay is when you are populating and updating these blocks onchain. And you have to pay because these blocks are done by validators and you have to reward them for their hard work. If you exist only on layer 2 and make a transaction on layer 2 then that transaction is free.
Conclusion
ZK-rollups are used for scalability. They send transactions using a cryptographic verification method called Zero-Knowledge Proof. It is a way for different parties to prove to each other that they have specific information without having to disclose the details of what it is.