Glossário

zkOracle

Moderate

zkOracles utilize Zero Knowledge Proofs (ZKPs) as a trustless medium through which data can pass freely whilst retaining a robust standard of security, privacy and cost-efficiency.

An Oracle in the context of blockchain smart contracts refers to a trusted third-party information source that supplies the chain with information derived from off-chain sources and queries. The data queried can include token prices, transaction activity and wallet balances, among others. Additionally, oracles act as intermediaries, connecting the highly fragmented blockchain world by analysing vast datasets and providing an application programming interface (API) which enables them to execute computations based on real-world events and data. In a nutshell, oracles collect, query, verify and validate data from different sources and deliver them to smart contracts.This is functionally different from zkOracles. 

What About zkOracle?

zkOracles utilize Zero Knowledge Proofs (ZKPs) as a trustless medium through which data can pass freely whilst retaining a robust standard of security, privacy and cost-efficiency.

The "zk" in zkOracle stands for "zero-knowledge". A zkOracle is an advanced type of oracle that incorporates zero-knowledge proofs, a cryptographic method that allows one party to prove to another that a statement is true without revealing other information. By integrating zero-knowledge proofs, zkOracles can provide data to smart contracts in a way that is both private and verifiable.

The process for data proving in zkOracles begins off-chain, where off-chain provers (nodes) utilize zk-SNARKs to prove that they possess specific information and have executed computations based on source information. 

Consumers will then interact with the blockchain via smart contracts, submitting requests which will then allow them to rely on data and proofs generated by these off-chain provers to make an informed decision. Smart contracts then have to process this data and make a decision on this data’s validity and whether it can be trusted. The fact that initial data computation and zkProof generation over it happens off-chain enables users to run computations locally with the flexibility to perform customized operations as many times as required, without incurring high additional costs. The off-chain data and zkProof are then presented on-chain for verification to ensure the accuracy and security of the data provided. 

Zero-knowledge proof generation is used to ensure the integrity of the computation by the Oracle node. This trustless approach enhances the security of a zkOracle as currently traditional Oracle data can be more easily exploited which can harm stakers. This harm mainly stems from the relatively small number of data sets that an Oracle may rely on; the economic penalty of having staked tokens forfeited for malicious activity may also be an insufficient deterrent and transactions broadcasting data can still theoretically be front-run as this information is publicly viewable, possibly undermining the integrity of said data.

Advantages of ZKOracles

The primary advantage of zkOracles is their ability to maintain data privacy while still ensuring the integrity and authenticity of the information that is being passed along. 

Traditional oracles broadcast data publicly or transparently to the blockchain, which can be a concern when dealing with sensitive or private information. zkOracles, on the other hand, can provide proof of data without revealing the data itself, making them ideal for applications that require both transparency and privacy. 

Real World Applications

Unique applications of zkOracles include confidential voting systems where the outcome can be verified without revealing individual votes, financial systems that require transaction privacy while maintaining regulatory compliance, and supply chain systems that need to validate product authenticity without disclosing proprietary information. 

Additionally, in sectors like identity verification, where user data privacy is paramount, zkOracles can be used to verify a user’s authenticity without exposing the details of their records. Overall, zkOracles offer an optimal solution for many industries, balancing the need for transparency with the demand for data privacy.

The Problem ZKOracles Are Solving

Data availability on Ethereum faces a roadblock: Only the most recent 256 blocks on the Ethereum blockchain can be queried on-chain, necessitating third-party applications like Etherscan to provide additional data. Less than an hour of Ethereum data is easily accessible, making third-party apps essential for filling this data gap, which users have to trust. 

Off-chain data is at risk of tampering, requiring users otherwise to build their own database management systems (DBMS). However, managing petabytes of data locally is costly and inefficient.

zkOracles overcome these issues, eliminating the need for third-party indexing or local storage. Through Zero-Knowledge Proofs (ZKPs), data integrity is upheld, allowing developers trustless access to data, without relying on a third-party provider.

Author: Misha Komarov, founder of =nil; Foundation

Misha is a leading developer of infrastructure for effective zero-knowledge proof (ZKP) generation. He is a researcher and developer in the fields of cryptography and database management systems (DBMS). His journey in technology began in 2013 when he began contributing to BitMessage, a peer-to-peer encrypted communications protocol. He then worked with the blockchain network BitShares, and Steemit, the first application built on the Steem blockchain. Misha worked on a fork of Steem from 2017 to 2018, before founding =nil; Foundation in April 2018