Checkout our latest Litepaper here:
https://mirror.xyz/hyperoracleblog.eth/FKvpIGI7fiuNr5rnTlFWAdxk4QCNFIR9rmqDPxWLc2w
Written by @msfew
Zero-knowledge proof technology is disrupting and redefining blockchain and Web3.
Zero-knowledge proof technology solves various problems that have been inherent in blockchains since their inception through cryptography and different complex Moon Maths:
A side note is that Hyper Oracle will achieve all four usages of ZK in the future.
Since a ZK-powered application, protocol or network is so robust, how do you develop it? Just like any software development field, you need to code, depending on the programming language and toolbox of it.
In short, there are two different main directions for a ZK application developer:
We believe zkVM will be the holy grail of ZK development since it will help quickly onboard all the developers into the ZK space.
Developers don’t need to learn new languages and hardcore cryptography or worry about the new toolchains, proving systems, and algebraic object but utilize their expertise in Solidity, Rust, C++, and all the toolings.
zkVM is a virtual machine that guarantees secure and verifiable trustworthiness by zero-knowledge proofs. zkVM outputs the new state and the proof in a trustless manner.
It allows all applications that run in the VM to be given the superpower of zero-knowledge proofs. Developers only need a program that can be run in the zkVM, and the zkVM will take care of all the rest.
If illustrated by a simple and possibly inexact example. The construction of zkVM is a three-step process in essence:
Make a virtual machine (implement all the instruction sets of the VM)
Add SNARK/STARK engine (add proving system)
Add zk to SNARK/STARK engine (enable privacy)
Probably the most well-known zkVMs at the moment are zkEVMs of Ethereum Layer2.
Remember the first step of building a zkVM? There’re plenty of choices of instruction sets.
I concluded in zk, zkEVM, and zkVM that “General zkVM is the future of Web3.” which is what the mainstream instruction set represents.
The reason for the popularity of zkEVM is that the teams are leveraging EVM’s importance in the blockchain developer community.
However, when we look at the bigger picture, we see that general zkVM can do not only what zkEVM can do (easy for Web3 developers to get started) but can also gain power from all of Web2’s mature ecosystem and toolchain.
WASM is essentially a binary instruction format for a stack-based VM. What makes it different from others are:
1. Embraced by Web:
WASM is one of the only 4 languages of the Web. The other 3 are HTML, CSS, and JavaScript.
WASM enables any programming language to be run in the browser context.
2. Universal format:
WASM is a compilation target for any programming language. WASM ecosystem has compilers like emscripten (LLVM-to-WASM).
WASM is a virtualization container that runs code in a standardized way. The founder of Docker even says he wouldn’t create Docker if WASM existed then.
WASM is a universal binary format. It means it can create native executables for any platform.
WASM is benefiting the Web, cloud, programming language, and gaming by:
Accelerating media decoding with ogv.js or any other performance-sensitive modules
Creating Rust and Go Web frameworks of yew, seed, vecty, and many more
Shifting cloud-native and serverless application paradigms with wasmer, Wasmtime, WasmEdge, and many more
Creating new programming languages of AssemblyScript, walt, grain, and many more
In addition, WASM is widely adopted in the blockchain space:
Polkadot believes Wasm to be the foundation of decentralized systems development. They are all in WASM, and consider it lesser evil than EVM.
Cosmos visions CosmWasm as the main engine for building robust dApps on secure, multi-chain smart contracts.
Near sees WebAssembly is at the core of the decentralized Web. Near uses AssemblyScript as its language of choice for smart contracts.
Even though Ethereum is not using WASM, Solang can compile Solidity code into WASM (EVM → WASM).
zkWASM is a zkVM its whole virtual machine of WASM is written in zkSNARK circuits.
zkWASM will give WASM runtime the ability to provide trustless computation for any program running in it. Simply put, zkWASM combines the best advantages of trustless computation and the rich ecosystem of zkVM and WASM.
In recent years, WASM has been moving beyond the browser to cloud and blockchain. Now, zkWASM is bringing a new paradigm of zkVM + WASM to the blockchain context, solving crypto-native security, trust, and privacy issues.
The reason why zkEVM will gain a massive advantage in the ZK war because EVM is the most commonly used distributed runtime environment for smart contracts.
EVM and Solidity are significantly well documented, with a vast ecosystem of tools, tutorials, and open-source projects accessible to anyone. Other solutions unmatch the dominance of EVM. Therefore, such adoption makes zkEVM the crown of Ethereum scaling.
I mentioned in a previous post that Polygon zkEVM is the zkEVM solution I’m most excited about. It’s also due to adoption.
Polygon zkEVM may not be the most “Type-1” and native and may not have the best performance. Still, Polygon has the advantage of having a vast first-mover advantage with its PoS chain, with a loyal developer community, eco-partners, and various hackathon resources. On top of the zkEVM layer of adoption, Polygon zkEVM has an additional layer of adoption.
Well, the potential adoption that zkWASM has will be unprecedented.
It has a much larger WASM ecosystem than the entire Web3 ecosystem, and much of the Web3 ecosystem is a direct extension of the WASM ecosystem. The ecosystem that zkWASM has will make it a mature application since its inception.
In the Web3 world, composability pairs with open source, allowing for exponential increases in productivity and innovation. Composability is to software as compounding interest is to finance.
In the Cairo VM environment, we see the Kakarot zkEVM being built; in the RISC0 RISC-V zkVM, we see Sovereign Labs trying to build a zkEVM for the Rust language EVM implementation with RISC0’s zkVM; in the EVM, we also see many EVM in the EVM, such as evm2 and HyVM, even Python Interpreter in EVM.
As a Turing-complete virtual machine, zkWASM can do anything above and beyond, and WASM will make these things more possible and easier to implement.
These are just a few things you can build on zkWASM but they are enough to open up new narratives and possibilities for Layer 3.
We are excited to see how developers can build exciting and creative new applications on zkWASM, and to upgrade existing mature applications into the new era of zk with the zkWASM runtime.
Remember zk is about four usages of security, scalability, interoperability, and privacy.
Remember Crypto-Native DApp Architecture.
Remember how zkWASM’s WASM runtime is a huge part of Web.
Hyper Oracle’s priority is to enable end-to-end decentralization for all DApps. We will also make our protocols maximally decentralized.
Remember when WASM was the only runnable language on the Web? zkWASM has the potential to run in the browser, and in the future, Hyper Oracle will explore the possibility of running ZK Prover on the Web. Like mina-rs, you can click on a link and become a node to participate in the network and mining.
Why is this important?
Permissionless: Anyone can be a node. There’s no centralized sequencer or beefy server requirement for the node.
Sovereignty: Anyone can run their own node. It helps privacy and prevents censorship.
Diversity: Anyone can contribute to the client and geography diversity of the network. This is a problem that even Ethereum is trying to fix.
Performance: Anyone can boost the performance of the network.
Also, maybe run zkWASM in your washing machine?
There have been voices suggesting that general zkVMs may have worse performance than purpose-built zkVMs. But this is not true.
The better practice is to build a generic solution like zkWASM first and then optimize it. We should not use tactical diligence to cover up strategic compromises.
It’s a simple choice between giving up the enormous benefits of WASM, or saving the additional performance optimization.
For optimization, there are very many angles to cut through, and each point can lead to huge levels of optimization mentioned by Taiko and ZKonduit:
Prover-level optimizations like Hyperplonk and Caulk
ZKP-specific hardware (FPGA/ASIC)
Composition of proof systems
Programming-wise tuning
Aggregation and recursion
Fusion and abstraction
Hyper Oracle is partnering with Delphinus Lab to explore the cutting edge of zkWASM in indexing and automation middleware protocols.
The generality and WASM ecosystem that zkWASM brings allows developers to give zero-knowledge proof superpowers to programs with 100% of their custom logic without requiring any modifications.
zkWASM is completing full support for some of Hyper Oracle’s infrastructure components. Later, Hyper Oracle will make these infrastructure components fully open source as Public Goods.
Finally, let’s summarize what zkWASM is.
Architecture-wise, zkWASM is:
zk virtual machine
WASM emulator
Feature-wise, zkWASM means:
Adoption
Composability
All-around
Decentralization
Performance
Vision-wise, zkWASM is The Next Chapter of ZK and zkVM.
Hyper Oracle is building programmable zkOracle protocol.
LinkTree: https://linktr.ee/hyperoracle
Website: https://www.hyperoracle.io/
Demo: http://demo.hyperoracle.io/
Twitter: https://twitter.com/hyperoracle
Discord: https://discord.gg/MgyYbW9dQj
Medium: https://hyperoracle.medium.com/
GitHub: https://github.com/hyperoracle