Zk Proofs to Verify Off-chain Data

Proof of SQL is a novel SNARK-based cryptography.

Catherine Daly

Head of Product Marketing

When it comes to blockchain buzzwords, "zk proofs” might sit at the top of the list. A zero-knowledge proof (zk proof) is a mathematical method of proving the validity of a statement without revealing the statement itself. Zk proofs have gained traction in blockchain as a powerful tool for providing cryptographic assurance about the accuracy of off-chain data. By using zk proofs, oracle networks can verify the data they are providing to smart contracts, helping ensure the integrity and reliability of the entire blockchain ecosystem.‍

The main benefit of zk proofs is that they allow data to be verified without the underlying information being revealed. In the context of oracle networks, this means that data providers can prove the accuracy of their data without revealing the sensitive information that is used to generate it. 

Zk Proofs to Protect Personal Information

This is particularly important when the data is private in nature, such as patient health records. Consider a healthcare application that allows patients to access their personal records and share them with their healthcare providers. The data in these records is generated by a variety of off-chain sources, including medical devices, lab tests, and other specialized sensors. The developers of the healthcare application can leverage zk proofs to prove to the end user that the data is accurate and has not been tampered with, without revealing the data itself. Patients and healthcare providers receive assurance that the important data is reliable while protecting patient privacy and the confidentiality of personal health information.

Zk Proofs to Protect Intellectual Property

Zk proofs can also be used to ensure the accuracy of data generated by proprietary datasets. For example, a game developer might have a proprietary dataset used to generate in-game items or assets. Using zk proofs, the developer can prove to players that the data in this dataset is accurate and has not been tampered with, without having to reveal the underlying data or the algorithms used to generate it. This allows players to trust the game and the items they own within it without having to rely on the developer's word alone. It also allows the developer to protect their intellectual property and trade secrets, while still providing players with the assurance they need to trust the game.

Blockchain Scaling

Zk proofs can also be used to enhance the privacy and scalability of a blockchain network. For example, a zk proof could be used to create private transactions on a public blockchain, where the transaction details are only visible to the parties involved and are not recorded on the public ledger. This method preserves the privacy of individuals or organizations without breaking the zero-trust model. 

Zk proofs can also be used to improve the scalability of a network by allowing transactions to be verified without the need for all nodes on the network to process and validate them, which reduces strain on the network and can improve its overall performance. 

Building a Decentralized Database with Zk Proofs

This is a particularly important solution for a decentralized database network, when consensus-based validation isn’t scalable. If I run my own decentralized database node, how does the end user know the query result coming back from my database is actually accurate, and that I haven’t tampered with it? In the context of a blockchain, all nodes communicate and come to consensus on the result. But in the case of a database, every single database node in the entire network can’t run the same query a thousand times and come to consensus—that’s not a viable or scalable solution. A zk proof can be used to verify that the query results run in the network are accurate and haven’t been tampered with, without sacrificing efficiency or performance.

Zk-SNARKs and Proof of SQL

Zk-SNARKs, which are a form of zk proofs, are designed to be particularly efficient and compact. Unlike other proof mechanisms, which can require a large amount of computational resources and data to verify, zk-SNARKs are designed to be verified quickly and with a relatively small amount of data. These type of proofs are non-interactive, meaning that the prover and the verifier do not need to communicate with each other during the verification process, which makes them well suited for use in applications where efficiency and scalability are paramount.

Space and Time employs Proof of SQL™, novel cryptography that allows the data warehouse to generate a SNARK cryptographic proof of SQL query execution, proving that the query computation was done accurately and that both the query and the data are verifiably tamperpoof. Space and Time is the first decentralized data warehouse that supports SQL execution against both on-chain and off-chain data and cryptographically guarantees the results. This allows developers to connect the results of both transactional queries and scalable analytics directly to their smart contracts to enable trustless automation and the development of truly decentralized applications.  

You can read more about how Proof of SQL enables tamperproof queries in the Space and Time documentation.

This article is also available to read on Medium.

Catherine Daly

Head of Product Marketing

Catherine Daly is a creative marketing strategist with a passion for building community around leading-edge technology. Before making her Web3 debut with Space and Time, Catherine built a successful career in semiconductors and high tech by managing full-funnel marketing for both startups and established global organizations. She is experienced and accomplished in developing integrated communications to cultivate brand identity for a variety of enterprises across the technology ecosystem. At Space and Time, Catherine oversees all product marketing, messaging, and content strategy.