Zero Knowledge Decentralized Oracle Network (ZK-DON)

mozaik lightpaper15th June 2024

The need for reliable and secure off-chain computation in blockchain has never been more critical. Traditional oracles, which bring off-chain data on-chain, have been essential in enabling smart contracts to interact with real-world events. However, these current systems often face challenges related to trust, security, and scalability.

Mozaik is a next-gen oracle protocol designed to address these challenges by leveraging the power of zero knowledge proofs (ZKPs). Mozaik provides a secure and efficient mechanism for verifying off-chain computation, including data feeds, verifiable randomness (VRF), automation, cross-chain messaging, and real-life data integration. By ensuring the integrity and correctness of these computations in a trustless manner, Mozaik unlocks an endless scale against the current bottleneck of sudo decentralized operator networks providing these services.

Current oracle solutions cannot scale with demand. New blockchains and protocols are put on waiting lists to get integrated with major oracles, which hinders development and innovation in the space. Mozaik looks to create a more open market of supply and demand for off-chain computation that is trustless by design.

Unlike traditional optimistic oracles, which rely on user-supplied answers and dispute periods, and oracle networks utilizing white-listed node operators, Mozaik's next-gen oracle solution utilizes ZKPs to verify computation of data feeds, VRF, automation tasks, cross-chain messages, and other types of off-chain data in a trustless and decentralized manner that can be run by anyone. This approach not only eliminates the need for lengthy dispute periods for optimistic oracles but also reduces the reliance on more centralized oracles that must incorporate white-listed node operators.

With Mozaik, developers and users can confidently integrate off-chain computations into their decentralized applications, knowing that the information and processes are accurate, secure, and verified.

The Oracle Problem

With a current total market cap of oracle solutions reaching over $12 Billion with over $84 Billion of total value secured (TVS), creating a secure, trustless system is paramount. One of the fundamental challenges is the secure and reliable integration of external, real-world data into blockchain ecosystems. This challenge is commonly referred to as the "oracle problem." The oracle problem encompasses several key aspects, including trust and security, data authenticity and integrity, centralization, and scale.

1. Trust and Security

Ensuring that the data provided by the oracle is accurate and has not been manipulated is crucial. Users need confidence that the data reflects real-world events or values correctly. It is essential to prevent malicious actors from altering data during its transmission from the source to the blockchain. Traditional oracles are restricted to trust-less aggregation and "trusted" computation by a smart contract's limited computing capability. Relying on a single data source or provider introduces risks if that source fails or is compromised.

2. Data Authenticity and Integrity

The ability to verify that the data received on-chain is authentic and has not been tampered with is vital for maintaining trust in the system. Currently, data is being authenticated with a couple of different mechanisms. The first are optimistic oracles where data is sent on-chain by an individual who puts a stake up to say the data they are providing is correct, which then can be disputed by other individuals if they believe the data is incorrect. The primary issues with this approach are possible lengthy dispute periods for correct data and the need to have enough capital to either provide or dispute given answers. Creating ongoing price feeds and providing other types of off-chain data also becomes difficult with this approach.

The second is through more of a whitelisted network of operators who aggregate their answers to then be put on-chain. Once again, operators need to stake enough capital to secure that they are providing correct data. The issue here being the more centralized effect of oracle protocols choosing who will be able to provide such data and also the barrier to entry of capital.

3. Centralization

Traditional oracles are often more centralized due to the inherent challenges of providing accurate and reliable data. This centralization contradicts the decentralized nature of blockchain technology and introduces several significant risks. Central points of failure can lead to data manipulation, corruption, or unavailability, which undermines the integrity of the entire system. If a centralized oracle is compromised, the data it provides can be tampered with, leading to incorrect outcomes in smart contracts and potentially resulting in financial loss or systemic vulnerabilities. Additionally, relying on a single or limited number of data providers increases the risk of service outages, which can disrupt the operations of decentralized applications that depend on timely and accurate data.

4. Scale

Over the past 5+ years, the rise of DeFi applications and need for off-chain data has exploded. More and more blockchains are being created with even more decentralized applications to a point where current oracles cannot scale with demand. Protocols are resorting to using unsafe measures to acquire needed data resulting in over $300 Million in exploited funds. Waiting lists and exorbitant fees to integrate into leading oracles hinder innovation in the space and slow the entrance of traditional consumers.

Mozaik: Next Gen Oracle

Mozaik leverages zero knowledge proofs to provide a secure and efficient oracle solution for blockchain applications. By using ZKPs, Mozaik ensures that the data provided is both accurate and tamper-proof before being sent on-chain. This approach addresses the trust and security issues associated with traditional oracles and eliminates the need for lengthy dispute periods by providing verifiable proofs of data authenticity and correctness.

1. Tessera Client

As a tessera is an individual piece used to form a mosaic, the tessera client is run by operators to form the Mozaik oracle network. The client can be broken down into a couple of high-level parts.

Fig 1. Tessera Client Flow Diagram

1.1 Publisher

The publisher is the main entry point of the tessera client and handles proof processing and initiating the transfer of data to the blockchain. The publisher listens to the runner which gets updates from the Mozaik P2P network on jobs that need to be done. For example, a feed has deviated over a certain percentage from current on-chain data, so an updated price needs to be computed. Once the publisher gets the journal and seal from the zkVM, the process of STARK to SNARK proof processing can begin. The subsequent SNARK proof along with journal and ELF binary can be sent on-chain for verification and publishing.

Fig 2. Publisher

1.2 zkVM

A Zero Knowledge Virtual Machine (zkVM) is an advanced computational model designed to securely and privately execute jobs using zero knowledge proofs. The zkVM ensures that the results of computations are correct without revealing any sensitive information about the inputs or the internal state of the computation. The zkVM creates a STARK (Scalable Transparent Argument of Knowledge) proof along with the journal back to the publisher. At this point, we have a way to verifiably know computation has taken place.

1.3 Runner

The runner acts as a monitoring service to manage which jobs the client needs to run and alerts from current active jobs. When operators opt in and out of jobs, the runner is updated to reflect these changes.

2. Node Operators

Trusting operators to provide the correct data has always been the main concern in any oracle network. Staking/slashing mechanisms have been put in place to help solve this but alienate certain individuals who do not have the resources to provide the needed capital, cutting down the possibility of a larger, more decentralized network.

With Mozaik's next-gen oracles, anyone can participate in the network by providing ZK proofs of their computation without releasing any sensitive data. This allows for cryptographic certainty that the data provided is correct, eliminating the need for multiple nodes to reach a consensus through aggregation. Instead, a single node can generate a ZK proof that others can independently verify, ensuring data integrity and correctness. This effectively changes the requirement from needing multiple (n) nodes to just one (n-1), significantly simplifying the trust model.

This approach not only democratizes participation by removing financial barriers but also enhances the efficiency and security of the oracle network. With cryptographic proofs, we achieve a trustless system where the correctness of data is ensured by mathematical guarantees rather than the aggregation of multiple sources.

3. The MZK Token

The MZK token is central to the Mozaik ecosystem, serving multiple critical functions. It facilitates payment streams to active operators who respond to jobs, ensuring they are compensated for their contributions. Additionally, the MZK token is the primary currency for on-chain subscriptions, allowing users to integrate Mozaik feeds and other forms of off-chain computation into their smart contracts. Ongoing research is being conducted to expand the utility of the token further.

4. Mozaik Marketplace

A new marketplace model of feeds and off-chain compute is now open to anyone willing to run computations. Operators are able to opt in and out of certain 'jobs' available in the marketplace. These jobs consist of data feeds, off-chain computation, and other custom integrations. The marketplace gives the ability for operators to plug and play which forms of computation are the most profitable for them and also see how many other operators are currently running individual jobs. Users can create subscriptions to all available feeds or pick and choose with a more a la carte style subscription plan.

Job Selection

Fig 3. Marketplace Jobs

5. Subscription/Payment Streams

To incentivize operators to continue to provide consistent data, payment streams are awarded to live operators paid by users. These payment streams act as a subscription service where users can pick and choose which feeds they need to use or a more general option for access to them all. The payment streams act as a vesting mechanism to operators who have opted in, which vests over a certain time period (Ex. 30 days) where they slowly earn vested rewards over time. A pay-per-use for other forms of computation is provided as well.

6. Mozaik Ecosystem

6.1 Data Feeds & Prediction Markets

Mozaik will provide not only consistent data feeds such as (BTC/USDC) to power DeFi platforms but also provide outcomes for prediction markets as well (what was the outcome of x event). With the ability to provide proof of computation, data provided on-chain will be verifiable through proofs generated by operators and hashed ELF binaries matching said computation. This is all provided publicly so that third parties can verify correct computation if desired. Mozaik plans to work with both data providers and protocols to meet needs for not only financial data but also more broad data feeds as well.

6.2 Verified Randomness

True randomness is not possible with current smart contract languages, so the use of VRF (verifiable randomness function) is needed to include such randomness in smart contracts. The use of Mozaik's zk-VR allows for proof that randomness has been generated with publicly available logic to ensure integrity. This randomness is then passed on-chain and proofs of computation are then verified before being included to recipients.

6.3 Macro Functionality

The ability to create and utilize custom off-chain compute that would be impossible or gas intensive on-chain is now a reality. Users will be able to create and provide Mozaik Macros to leverage different forms of custom off-chain computations into their smart contracts. Operators can opt into running macro jobs and return cryptographic proof that the desired computation was run.

Putting the Pieces Together

Collecting all of the right pieces is crucial to create the whole oracle picture. Mozaik addresses the long-standing oracle problem by leveraging advanced cryptographic techniques, specifically zero-knowledge proofs, to ensure data authenticity, integrity, and security. By eliminating the need for dispute periods and reducing reliance on centralized oracle networks, Mozaik offers an efficient solution that can scale with the never-ending need for off-chain data.

Mozaik's next-gen solution represents a significant step forward in the evolution of blockchain oracles. By enabling operators to provide ZKP's, we reduce the need for multiple nodes to reach consensus, enhancing both efficiency and accessibility.

The Mozaik Marketplace will allow operators to choose the most profitable jobs and offers users customizable subscription plans, making it easier for everyone to participate in the network.

We are creating a cohesive and trustworthy system that supports the growth and adoption of decentralized technologies. Join us in pioneering this new era of blockchain data integrity and trust, where every piece of data contributes to a more secure and transparent digital future.

Appendix