Announcing Hyper Oracle, the ultimate Web3 zkMiddleware

Hyper Oracle
6 min readOct 15, 2022

Written by @Kartin, @msfew

Hyper Oracle

Hyper Oracle is the ultimate Web3 zkMiddleware, with Math as a Consensus.

Hyper Oracle Node takes and caches the states of smart contract , and generate the proof of them, so that any data can be transferred cross different blockchains, block, and time.

The workflow of Hyper Oracle:

1. zkIndexing

Multi-chain Indexing, or Decentralized RPC

In the practice of dApp development, the architecture will look like the below:

For RPC provider and indexing, keeper, oracle middleware, centralized service (or hosted service) is commonly used, due to its high reliability, and performance.

The downside of using centralized RPC and any service is that, in the decentralized world of dApps. The centralized approach will cause:

  • Censorship
  • Security and trust issue
  • Conflict with blockchain’s ethos

Projects value decentralization must use decentralized RPC and middleware protocols.

The trilemma of decentralized Web3 indexing protocols is that a protocol cannot satisfy:

  • Decentralization (Permissionless, 100% Uptime)
  • Security (Data Accuracy)
  • Performance (Latency)

The Graph Protocol sets the perfect foundation for what a indexing protocol should look like:

  • GraphQL schema
  • Subgraph adoptions and infrastructures

However, The Graph still have flaws in security and performance, due to its optimistic-like fisherman mechanism.

That’s the reason why DeFi protocols don’t use The Graph. There have been solutions like Compound’s Lens design patterns, which is development-wise complex (500 loc contract and 1k loc .ts file). And it still requires off-chain query solutions like The Graph.

However, DeFi is the definite leap and the vital part of Blockchain. DeFi represents and creates the major value of blockchain.

We are building zkIndexing, powering the next-generation of DeFi protocols and any dApp that values security and performance.

With the power of zkWASM, any zkGraph(called “subgraph” in The Graph) will be the witness of zero knowledge proof. Once the proof is generated (<1 min) and verified (<12s), the indexing and query will be fully secured and finalized on-chain. It is much shorter than The Graph’s mechanism that takes at most a month.

Some other advantages of zkIndexing are:

  • Lightening fast performance and finality (any geo-wise closest node can provide service if it generates the right proof)
  • Math secured security (security is based on Math and Cryptograph by ZK, not untrustworthy fisherman mechanism)
  • Multi-chain verification (verify the correctness of indexing and querying on any chain based on security and performance needs)
  • Developer adoption (migrate subgraph to zkGraph with 0 line of diff)

2. zkAutomation

Inter-chain Automation with On-chain/Off-chain Source

Automation (or Keepers) is needed for dApp, since certain smart contract functions (Uniswap V2 TWAP, or liquidation) need to be periodically called by an EOA. Trading bots, market making bots, MEV bots, and arbitrage bots also need automation jobs to be running.

However, keeper networks like Gelato, or Keep3r Network have a worse security mechanism than The Graph’s fisherman mechanism. They are secured by a DAO. It means that you need to identify the bad actors by examining their on-chain activity, submit a proposal, and have the proposal passed to secure the network.

To help improve the automation service’s security and reliability, MakerDAO has a rotation for different automation service providers. But that doesn’t solve the core of the problem: the execution of the correct automation operations cannot be proven.

Well, with Hyper Oracle’s zkAutomation, security for keeper network is possible:

  • Secured by ZKP (Math and Cryptography as consensus)
  • On/Off-chain sources (called “resolver” in Gelato)
  • Inter-chain ability (contracts and proof can be targeted and verified on any chain)

zkAutomation will open up a new world for automation and DApps:

  • Inter-chain arbitrage and MEV bots
  • Market making and trading bots
  • Oracle and liquidation keepers
  • Programmable liquidity
  • Dynamic NFT

3. Math as a Consensus

Hyper Oracle is entirely rely on ZKP (Math and Cryptography), not validators, not relayers, not PoS node operators.

a) BoB (blockchain of blockchain)?

The reason why we need blockchain is to solve trust problem by creating a global network system with integrity. It proves an execution or computation is correct by consensus mechanism.

The introduction of consensus makes trust exist, but produces too much redundancy caused by the process of reaching consensus itself.

Also, the emerging new PoS blockchains represents new tokens listing, but new trust assumptions that have low attacking cost and are not backed by preexisting security. We don’t need a new blockchain and extra capital to back the security of every system.

b) Hardware?

Blockchain is a “trustware” that combines the flexibility of software and immutability of hardware. Why don’t we just use hardware (TEE) to achieve trust? However, the cost of attacking a chip is fixed, and we still need to trust the manufacturer of the chip.

c) Optimistic Mechanism?

Then we have optimistic mechanism and DAO-operated watchers. They both utilize presumption of innocence, that assumes everything is correct until someone think it’s suspicious.

They create an unacceptable latency (7 days or 30 days) to finally finalize an operation. Also, the cost of attack is mostly minimal, since the attacker can attack once and (at least) get away with it during the latency period.

d) ZK and Math

Math is the ultimate law of the universe completely invented and believed by generations of beings.

Cryptography is the only technology available to any individual today that enables defence against bad actors.

Zero Knowledge technology is the optimal solution to achieve “Doing the right thing, even when no one is watching”.

Generated ZKP can be verified by the whole network (Ethereum), thus the ZKP will be the mathematical proof that proves the related operations are correct.

Zero knowledge proof can guarantee computational integrity, correctness and privacy. ZK has already been widely used by Layer2 scaling solutions and privacy layers of blockchains.

ZK will be the RSA of Web3, backing any application and protocols value both security and performance.

With the booming of ZK tech, we see brilliant teams working on zkEVM, to scale Ethereum with ZK Rollup. zkVM, as a general runtime, will be able to generate proof for any executions that can be executed by the VM.

Hyper Oracle uses zkWASM emulator to provide the superpower of ZK to any protocols we are building:

  • No additional trust, just Math and Cryptography
  • No new networks, simply inheriting Ethereum’s security by its verification of ZKP
  • Generate ZKP for any code that can be compiled to WASM

4. Links