---
# System prepended metadata

title: Hyper Oracle - scaling Ethereum via zkDApps
tags: [zkml, zkautomation, zkOracle, smartcontractwithsuperpowers, zk, ethereum]

---


## Hyper Oracle: scaling Ethereum via zkDApps

### Introduction

The scaling of Ethereum has been a hot topic for years. While most discussions have been revolving around L2 protocols that are capable of significantly increasing the Ethereum's throughput while providing low-fee transactions, there is another approach capable of scaling Ethereum in a different but equally important way. Hyper Oracle has been building along the latter path boosting the capabilities of smart contracts built on top of Ethereum, opening up whole new perspectives in creating trustless, decentralized and fully on-chain applications.

In practise it means you can add zk-proven data-indexing, automated workflows or machine-learning capabilities to your smart contract. In this article we'll dive deeper into Hyper Oracle's architecture, workflows and use cases.

### A Programmable zkOracle Protocol

#### What exactly does it mean?

Hyper Oracle is a stateless *protocol* consisting of a network of nodes called [zkOracles](https://ethresear.ch/t/defining-zkoracle-for-ethereum/15131) that are *programmable* and can handle customized, arbitrary computations. A *zkOracle* can provide zk-proven on-chain data from Ethereum as input for the customized computation while ensuring that the output is also verified through a zero-knowledge proof. The former is achieved by proving Ethereum's state through zkPoS, while the processing of data along a customized logic is achieved using programmable zkGraphs that run on zkWASM.  

#### What problems do zkOracles solve, and how?
Traditional oracles ensure the security, integrity and reliability of data generally through consensus mechanisms and staking, with the amount staked being subject to slashing if the data turns out to be incorrect. However high staking requirements may increase the entry barrier for new nodes and could be a limiting factor for decentralization.  

Besides, optimistic oracles work on a "true-unless-disputed" basis. Only the data that remains undisputed over a pre-determined challenge period will be passed through the network and assumed to be true. If we were to use a term from the L2 space, we'd say only after this period does it reach finality. 

On the contrary, Hyper Oracle is designed to be a decentralized, autonomous network of zkOracle nodes where consensus mechanisms and staking requirements are replaced by math. The nodes generate zero-knowledge proofs (ZKPs) to ensure data integrity and reliability, and rely on Ethereum for security. This results in  a 1-of-N trust model in which a single honest zkOracle is enough to secure the trustless functioning of the network.

### zkDApps: the future of smart constracts

#### Architecture

Hyper Oracle relies on **zkPoS** for data availability: the whole Ethereum state is verified through ZKPs ensuring data integrity and credibility. In addition **zkGraphs** are used to achieve programmability. The customized computation logic is defined in zkGraphs which are subsequently processed by zkOracle nodes. The zkGraphs are Subgraph-equivalent, written in AssemplyScript, and thus enable easy migration.  An easy-to-use webIDE called [zkGraph Studio](https://www.hyperoracle.io/app/zkGraphStudio/create) is available for developers looking to integrate Hyper Oracle.


![](https://hackmd.io/_uploads/Sy5nOU2-6.png)
<div style="text-align: right"> Source: Hyper Oracle </div>

#### Making smart contracts smarter

The concept of zkDApps can be summarised as follows: zkDApps = zkOracle + DApp. While the number of unique use cases is endless, the Hyper Oracle team has been building certain zkGraph Standards (MetaApps) as core applications to facilitate integration:

Using **zkIndexing** developers can provide decentralized applications with zk-proved historical data. The use-cases of these zkGraphs could include quering the transaction activity and volume for NFTs or building verifiable DeFi dashboards. 

* The process flow for zkIndexing includes: 1. Reading on-chain data; 2. Computing and indexing with zkGraph; 3. Verifying the output and the ZKP

When combining zkGraphs with **zkAutomation** users can add automation capabilities to their smart contracts, opening up the door for robust and powerful zkDApps. The additional computational power also allows them to make automated calls if the computation output meets certain pre-defined parameters. Be it automated swap orders and recurring transactions, automated treasury management for DAOs, fully on-chain stablecoins, zkAMM, or a [fully-on-chain liquidation keeper for DeFi protocols](https://mirror.xyz/hyperoracleblog.eth/iXLTbbggNTtLWqPB695IvJQo2DtgooEbvYVVuFVY6y8) the opportunities are truly endless. 

* The process flow for zkAutomation goes as follows: 1. Reading on-chain data; 2. Computing and checking if automation is triggered; 3. On-chain verification; 4. Writing values into the smart contracts defined by zkGraph


Through **zkML** (zkMLinference) users will be able to build fully on-chain DApps powered by machine learning and secured by Ethereum. [zkMLinference](https://docs.hyperoracle.io/zkgraph-standards/zkml-wip) is Hyper Oracle's trustless machine-learning inference protocol based on ZKPs, enabling model and user input privacy, and computation integrity. This allows smart contracts to integrate decentralized machine learning computation. There could be a wide range of potential use-cases such as verifiable ML model inference, fully on-chain ML quant funds or fully on-chain AIGC ([EIP-7007: zkML AIGC-NFTs](https://ethereum-magicians.org/t/eip-7007-zkml-aigc-nfts-an-erc-721-extension-interface-for-zkml-based-aigc-nfts/14216), co-authored by Hyper Oracle), potentially even dApps capable of predictive analytics and automated decision-making processes, or automated risk assessment and fraud detection in DeFi applications. 

* The process flow for zkMLinference is the following: 1. Reading on-chain data; 2. Computing for inference with zkGraph; 3. On-chain verification; 4. Writing inference output into the smart contract defined by zkGraph



#### zkOracle workflow

1. The users register their zkGraphs and provide the bounty for the zkOracle network to process the arbitrary computation.
2.	zkOracle nodes pick up the computation tasks customized in the zkGraphs, and process them, generating zk-proofs. zkOracle nodes also deploy the smart contract that can verify the ZKPs generated. 
3.	Once the ZKPs are verified, the user’s smart contract receives the computation result and uses it in its operation.
4.	Bounty provided by the user in step 1 is sent as reward to the zkOracle node that processed the corresponding task.

![](https://hackmd.io/_uploads/ByCJt8hWa.png)
<div style="text-align: right"> Source: Hyper Oracle </div>

### Building without trade-offs
Integrating Hyper Oracle developers don't need to worry about the usual trade-offs. Instead, they can focus on building robust DApps that truly represent the core values of Ethereum, such as decentralization, trustlessness, permissionlessness, security and integrity. 


### Find out more about Hyper Oracle:
[Website](https://www.hyperoracle.io/), [Github](https://github.com/hyperoracle), [Docs](https://docs.hyperoracle.io/), [Blog](https://mirror.xyz/hyperoracleblog.eth)
[How to develop a zkGraph with zkGraph Studio](https://www.youtube.com/watch?v=_4W615T1gdY)
[How to develop a zkGraph with zkGraph Template](https://www.youtube.com/watch?v=1ehlXhwk5eE)
[Sample Code: zkGraph Examples](https://github.com/hyperoracle/zkgraph/tree/master/example)
[Dev flow for zkAutomation](https://www.youtube.com/watch?v=VbhoQnu5_Kg)
[Towards World Supercomputer](https://review.stanfordblockchain.xyz/p/towards-world-supercomputer)

---



### References:
[Hyper Oracle website and docs](https://www.hyperoracle.io/home)
[Defining zkOracle for Ethereum](https://ethresear.ch/t/defining-zkoracle-for-ethereum/15131)
[Hyper Oracle Simply Explained](https://mirror.xyz/hyperoracleblog.eth/FKvpIGI7fiuNr5rnTlFWAdxk4QCNFIR9rmqDPxWLc2w)
[Latest Applications Building on Hyper Oracle](https://mirror.xyz/hyperoracleblog.eth/Tik3nBI9mw05Ql_aHKZqm4hNxfxaEQdDAKn7JKcx0xQ)
[Marine: Compound Liquidation Keeper with zkGraph](https://mirror.xyz/hyperoracleblog.eth/iXLTbbggNTtLWqPB695IvJQo2DtgooEbvYVVuFVY6y8)
