Zero-knowledge proofing, or ZKP, is the method we use to prove transactions on DeversiFi and send the records to the main Ethereum blockchain.
It’s fast, safe and totally DeFi-friendly. But it’s really (like really, really) complicated. So let’s use a cheeky metaphor to explain it.
Imagine, first of all, that there’s a maze.
If you complete this maze, the maze-master will give you $1 billion.
However, there’s a catch: there are hundreds of different routes to the end, and only one is correct. To collect the reward, each challenger has to prove they’ve followed the right path. Every step of the way.
Now this sounds seriously time-consuming, right? To claim your reward, you have to go through this massive explanation of the route you’ve taken.
And it’s vulnerable, too. If someone’s listening in to the conversation, they could copy the route and then claim the reward themselves.
So the maze-master has come up with a deft little hack. They’ve installed a series of doors along the chosen route, and each door has a number above it. Together, these numbers form a code.
As you go along the maze, you have to collect all the numbers. Then, at the end, you give these numbers to the maze-master, in the right sequence.
This way, it’s super-fast and simple. When the master gets this magic code, they know, instantly, that the challenger has followed the right path. And the code doesn’t reveal anything about the route itself, so it’s worthless to anyone listening in.
This, in essence, is how zero-knowledge proofing works.
Zero-knowledge proofing, or ZKP, is based on the idea that transactions can be processed without the need to reveal any relevant information.
Instead, we can provide fragments of information based on the calculations we’ve already run, which allow faster verification and keep our users’ details safe.
How does ZKP work?
In essence, ZKP is based on a four-step process.
- When we process a series of transactions (like token swaps and transfers), we perform a series of rigorous calculations using powerful servers.
- Based on these calculations, we create a tiny digital record that represents all the data we’ve compiled from each user.
- Then, we send this final digital record over to the main Ethereum blockchain, so it can be verified. This record shows we’ve gone through all the right steps.
- Ethereum performs some quick calculations to check the record it receives, and then updates the blockchain.
There’s no need for Ethereum to repeat the full calculations our proving system has gone through. Simply by receiving this code, Ethereum knows we’ve followed the right steps.
And the information we provide is totally meaningless on its own, so hackers can’t use it to attack us, or spy on our user’s transactions.
In other words, it’s completely secure.
Why is ZKP so important?
To answer this question, we need to understand what platforms like DeversiFi are trying to achieve.
Put simply, we’re trying to lighten the load on the overworked Ethereum blockchain, which is weighed down with demand for both its flagship currency, Ether, and the decentralised applications it hosts.
Ethereum can be slow at peak times. Extremely slow, in fact. In fact, the main Ethereum blockchain can only process around 15 transactions per second – a tiny fraction of the number required.
As we’ve written in previous blog posts, this leads to lengthy transaction times and huge transaction (or ‘gas’) fees, as users have to outbid one another to get their transaction processed.
So, platforms like DeversiFi have sprung up on layer 2 – that is, on top of the main layer 1 Ethereum blockchain.
Because we’re not blockchains ourselves, we don’t have to go through some of the many steps that Ethereum faces when processing transactions.
This means that we can roll up transactions into bundles and process them in bulk (hence the name ‘rollup’ which is used to describe our project).
By doing so, we can remove much of the transaction burden away from the main Ethereum blockchain, and free up vital computing space.
ZKP is key to this process. It enables us to prove a whole bunch transactions at once and send a single record over to the verification engine on the main blockchain.
When it receives this record, all the verification engine has to do is run some tests, then validate the transaction. So Ethereum’s computing power is optimised.
All this means that transactions are faster and cheaper, without losing any of the usual security protections. So users get all the benefits of Ethereum, with none of the downsides.
As time goes by we expect the technology will improve still further. We’ll see ZK proving systems become even faster, even smarter, and even simpler in their requirements. They’ll require less data, but also become even more robust.
Above all, they’ll play an even bigger role in the future. Not just for Deversifi, but the whole of the DeFi ecosystem.
DeversiFi makes DeFi easy. Swap, Invest and Send without paying Ethereum network fees.