Exploring zkOracles

Exploring zkOracles

In this article, we will explore the current state of affairs in the zkOracles space. 


Blockchain technology has transformed various industries by providing secure and transparent transactions without intermediaries. However, incorporating real-world data into blockchain systems has remained challenging. To address this issue, oracles serve as intermediaries, connecting blockchains with external data sources. Recently, zkOracles have emerged as a promising solution, combining the power of zero knowledge proofs and oracles to provide data privacy. This comprehensive article explores zkOracles, its components, advantages, challenges, and ongoing development efforts.

What are Oracles and Why do we need zkOracles?

Oracles facilitate the integration of real-world data into blockchain applications by acting as intermediaries. They enable blockchain systems to access information outside the blockchain, bridging the gap between the digital and physical realms. However, traditional oracles rely on trusted third parties, posing challenges in terms of reliability and security.

This is where zkOracles come into play, aiming to enhance the efficiency and trustworthiness of oracles by leveraging zero knowledge proofs.

What are zkOracles?

zkOracles, or zero knowledge oracles, combine zero knowledge proofs and smart contracts to create an on-chain/off-chain solution. They improve the efficiency and security of oracles in the blockchain ecosystem by enabling cost-effective off-chain computing and storage.

Components of zkOracles

zkOracles work by proving the veracity of data from outside of a chain

The zk-Oracle architecture, according to Gu and Nawab,  comprises the following components:

  1. Sources – These entities collect or generate raw data from various sources, such as IoT devices. They serve as the starting point for the computation process.
  2. Off-chain provers – receive raw data from sources and perform computations. They utilize zk-SNARK (zero knowledge Succinct Non-Interactive Argument of Knowledge) computations to generate proofs of their computations.
  3. Consumers – interact with the blockchain through smart contracts, submitting read and write requests. They rely on the data and proofs generated by off-chain provers to make informed decisions.
  4. Smart contracts –  verify and maintain digests related to computation results and zk-proof data. They ensure the integrity of the zk-proofs and execute a punishment strategy if an invalid proof is detected.

Batching Algorithm for Efficient zk-Proof Generation

To accelerate zk-proof generation, a batching algorithm is proposed by Gu and Nawab. It utilizes horizontal and vertical batching techniques. Horizontal batching combines multiple proofs into a single proof, while vertical batching merges similar computations into a single proof. These techniques significantly improve the efficiency of zk-proof generation, achieving up to 550 times faster performance compared to baseline methods. 

Applications of zkOracles 

zkOracles offer a wide range of applications in the blockchain domain, including:

  1. Price Feeds: zkOracles enable efficient price feed operations in decentralized finance (DeFi) applications, eliminating the need for continuous updates and costly storage on the blockchain
  2. Trustworthy Data Feeds: zkOracles provide secure data feeds from uncooperative parties. As an example, users can obtain zero knowledge proof of a bank balance to prove something to a third party without revealing the contents of their account or transaction history of record. These proofs can be used as collateral for obtaining loans in decentralized finance.

Challenges and Future Directions

While zkOracles hold great promise, their development poses challenges. One of the key hurdles is the complexity of the three-party handshake involved in preserving privacy and securely obtaining data from external providers. Ongoing research and testing within the Mina ecosystem aim to address these challenges and ensure the security of the protocol.

Where are zkOracles being built? 

Ethereum Network: In the Ethereum network, zkOracles have the potential to enhance trust, privacy, and scalability.For example,  Hyper Oracle, a zkOracle network for Ethereum, retrieves and processes data from every blockchain block using zkPoS consensus and programmable zkGraphs running on zkWASM virtual machine. This approach facilitates trust-minimized off-chain computation secured by zk, which unlocks the potential for hyper-scaling Ethereum smart contracts to perform advanced computations, such as automation or machine learning.

zkOracle for Ethereum

Mina Protocol: a core contributor for the Mina Protocol, (0)1Labs, is currently building a zkOracle. What makes zkOracles in Mina stand out is their distinctive two-step execution model facilitated by zkApps. The initial step involves demonstrating off-chain that specific information exists, and that computations have been performed. This off-chain demonstration allows for local computation on individual machines. 

In the case of price feeds, for instance, users can query multiple trusted APIs, calculate average prices, and perform complex operations off-chain. zkOracles enable users to query prices without incurring costs until they obtain the desired result. Only then would the on-chain execution occur, resulting in a more efficient and cost-effective architecture. This unique two-step execution model provided by zkOracles on Mina offers a distinct and powerful approach to securely and efficiently interact with off-chain data.


zkOracles offer an innovative solution to enhance the efficiency and trustworthiness of oracles in the blockchain ecosystem. By combining zero knowledge proofs and off-chain computations, zkOracles enable secure interactions with real-world data. The proposed batching algorithm and ongoing development efforts address challenges and advance the protocol’s security. With their advantages and potential applications, zkOracles are poised to revolutionize blockchain systems by providing trustless and decentralized applications that rely on accurate and verifiable off-chain data.

receive the quarterly state of zk report