What are zk rollups?

By Anycoin Direct

Today we are going to talk about zk rollups. It's not one of the easiest topics, so brace yourself!

Key indicators

✔️ Zk Rollup is a layer 2 solution that increases the speed of a blockchain by aggregating and processing multiple transactions in a single block.

✔️ Zero knowledge proof involves proving that one knows a particular thing, such as a hash (code) of a block, without revealing more information.

✔️ A zk rollup is often used when the main network becomes too slow and expensive, This relieves the network making it faster and cheaper.

✔️ Zk Rollups will become more common because of their scalability and cost-saving benefits, although they are still difficult to implement.

What is a zk rollup?

There are two parts to a zk rollup. Zk is the abbreviation for zero knowledge. Zero knowledge proof involves proving that you know a particular thing, such as a hash (code) of a block, without knowing more information, such as name, address, and so on.

The part rollup means to roll up. In this context, it means that multiple transactions are bundled together and processed in one block.

Both parts are about speed. With zk rollups, the speed of a blockchain is increased quite a bit.

A zk rollup is a layer 2 solution. It is often implemented when the main network becomes too slow and expensive, as is the case with Ethereum. The blockchain's main network, layer 1, is then supported by zk rollup, thereby offloading it and making it faster and cheaper. 

How do zk rollups work?

Imagine you are a developer at Ethereum. You need to make the network faster and less expensive to work with. You decide to implement zk rollups to offload the main chain.

Now when transactions are done they will be bundled off-chain into a rollup on a sub-chain. On this sub-chain, the new state of the network will then be communicated to the main chain (Ethereum) plus some more data (zero knowledge proof) to prove that it is correct.

As a result, the main chain will only have the rollup and zk proof to process and not thousands of transactions. So you can scale Ethereum from 10-15 transactions to thousands per second.

So the transaction data will still be stored on the main chain, so the state of the blockchain will still be correct and communicated to everyone who keeps track of the network. Thus, every validator will still know how much ETH everyone has.

The zk rollup status is maintained on the Ethereum network by a smart contract. To prove this status, they have to provide cryptographic proof that they also made all these transactions. Zk rollups also use compressing data, such as addresses, to make it all even faster and cheaper. Once the proof is provided, the bundle of transactions collected will be instantly executed on the main chain.

Since security status updates are performed on the main chain (Ethereum), zk rollups are a lot more secure than side chains.

Most zk rollups use a supernode, a kind of superuser that aggregates all transactions. There is a risk of someone being censored, which in this case means that the superuser does not want to validate your transactions. If that happens, someone can send their transactions directly to the roll up contract on Mainnet.

Users can sign up for inclusion in the next roll up and thus be cheaper this way.

The operators or superusers check a transaction and see if a user is part of the status of the network. Furthermore, they check if there are enough funds in an account. The transaction must be correct and the public key must match that of the sender in the roll up. The nonce (to avoid double spending) is also included in the roll up.

When the roll up has collected enough transactions it bundles them. A zk SNARK is used to provide a proof that the data is correct.

After this, a "proving circuit" goes to work on this data and checks that everything is correct. Once this is done, the operator sends the data to the verification smart contract on layer 1 of the blockchain. Here everything is tested again for correctness, after which the transactions are put into the ledger and the new state of the blockchain is known.

It is even possible that proof of proof will be created. These so-called recursive proofs bundle zk proofs together on layer 2, after which all proofs are accepted together on layer 1, after which a battery of blocks are instantaneously accepted, which adds further scalability to a roll up network.

If you also want to join a roll up as a user to reduce your transaction costs, you must put funds into a roll up smart contract at layer 1. Once the operator has accepted your funds, you can perform cheaper transactions in this roll up.

The future of zk roll ups

Zk roll ups therefore increase scalability and reduce user costs. However, they are quite difficult to implement, which is why they are still little used. The chances of rogue superusers threatening the network are also higher. As developers become more skilled at it, the zk roll up will certainly become more common, as many users of certain networks find the transaction costs and speed unacceptable.

Test your knowledge

Question: 1/5What does zero knowledge mean in relation to blockchains?
AHaving no information
BNot having access to the blockchain
CA secret ledger
DA private blockchain