What are zero-knowledge proofs?

Rhinolearn: ZK rollups 101. What are zero-knowledge (ZK) proofs and why do we need them?

Zero-knowledge (ZK) proofs can prove the legitimacy of a transaction without revealing sensitive details from either party. The technology is fast, secure and is popular among several ‘rollup’ projects on Ethereum layer 2, including rhino.fi. We’re known as ‘ZK rollups’ for this reason.

In fact, ZK proofs are fundamental to rhino.fi: we built our platform using ZK technology from our partner, StarkWare. This enables us to update users’ balances without posting every single one of their transactions on the blockchain (as would be the case with other technologies), so we can minimise on-chain computation and bring true scalability, as well as privacy, to our users.

Even though more and more ZK rollup projects are entering the space, we see ourselves as pioneers and evangelists for the technology. In this blog post we’re going to explain it to you as simply as we can, so you get a better understanding of how rhino.fi works and what it means for your transactions.

First, what is the point of zk and zk rollups?

 

 Let’s say you want to make a sequence of transactions on rhino.fi. For example you may want to swap Bitcoin for Matic using our cross-chain feature. Then you want to buy some USDT and finally sell some Avax. 

A normal ‘proving engine’ (usually a smart contract) would have to prove each of these transactions separately and post an individual record on the main Ethereum blockchain to demonstrate your updated balance, and thus your ability to make the next trade. That not only takes time, it drains your funds because you need to pay gas fees each time the blockchain updates itself.

However, zk rollups provide a solution.

A zk rollup gets its name because it ‘rolls up’ transactions into a bundle, proves them off-chain, and then provides a single proof of all the activity to the layer 1 Ethereum blockchain. Ethereum performs some quick calculations, and then updates the chain.

This means that, with zk rollups, the amount of work required on layer 1 is kept to an absolute minimum, and thus the amount of gas that users have to pay is reduced dramatically.

Ok, that’s great. But how does ZK rollup technology actually work?

 

This is a crucial question, because the technology needs to be both reliable and scalable. On-chain computation provides transparency and proven security, so our off-chain engine needs to be able to deliver the correct results, no matter the pressure it is subjected to.

Not only that, but one of the main USPs of ZK technology is that it can validate a trade or swap without requiring any actual information about the transaction itself. In other words, it doesn’t need to reveal the individual transaction details, or any details about the people making them. This makes the technology extremely private, but it also requires some complex engineering at the back end.

So ZK rollup leaders, like StarkWare have created an engine with two separate parts:

  • A prover, which goes through all the transactions, performs rigorous computation to ensure they’re correct, and generates a proof – essentially, a stamp of approval which confirms that all the transactions happened in the right order, and according to the rules of the blockchain.
  • A verifier, an on-chain contract which checks the proof and commits a state change (updates the blockchain with the user’s new balance) if the proof is valid.

And here’s the critical bit: When checking the ZK proofs, the verifier challenges the prover to complete a series of complex calculations, using information that it could not possess unless it had done the correct computation when generating the proofs in the first place.

A good way to think of this is like a maze, which offers a reward for anyone who follows the correct route. A series of doors have been placed along this route, with a number above each one.

Upon completion of the route, the challenger (or the prover) has to provide all the numbers to the maze-master in the correct sequence. By doing so, they prove that they have followed the correct path without revealing any essential details, so their disclosure is useless to anyone who may be listening in. 

It would, theoretically, be possible for the prover to ‘guess’ the correct information, so to minimise this risk, the verifier sets a large number of challenges – so large, in fact, that the chances of inaccuracy are miniscule.

When the engine submits a proof and the on-chain verifier recognises it as valid, there’s no need to then repeat the full calculations on layer 1. Simply by verifying the proof, Ethereum knows we’ve followed the right steps. 

The StarkWare verifier is open-source and is deployed to the main Ethereum chain, therefore its correctness can be confirmed by any interested third parties. 

And as time goes by, we expect the technology will improve still further. 

We’ll see ZK proving systems become even faster, even more flexible, and even easier for developers to build on top of. We’ll see more and more ZK rollup projects emerge, and we’ll even see entire blockchains being built using ZK technology.

Digital finance is supposed to be fast, discreet and universal. ZK tech holds the key to achieving all three aims.

 

Ok, so now you know how ZK rollups work under the hood, how about giving ours a try? You can enjoy super-fast swaps, trades and investment opportunities through the power of ZK tech. Check out our app here.

Share this post

Latest Posts

Sign up now!Sign up to our newsletter now to hear all about rhino.fi’s upcoming mystery airdrop, new chain launches and yield opportunities and be in with a chance of winning $5000.
Sign up now!Sign up to our newsletter now to hear all about rhino.fi’s upcoming mystery airdrop, new chain launches and yield opportunities and be in with a chance of winning $5000.
Sign up now!Sign up to our newsletter now to hear all about rhino.fi’s upcoming mystery airdrop, new chain launches and yield opportunities and be in with a chance of winning $5000.
Sign up now!Sign up to our newsletter now to hear all about rhino.fi’s upcoming mystery airdrop, new chain launches and yield opportunities and be in with a chance of winning $5000.
Sign up now!Sign up to our newsletter now to hear all about rhino.fi’s upcoming mystery airdrop, new chain launches and yield opportunities and be in with a chance of winning $5000.
Sign up now!Sign up to our newsletter now to hear all about rhino.fi’s upcoming mystery airdrop, new chain launches and yield opportunities and be in with a chance of winning $5000.

Earn 19% APY on your stablecoins