FHE Oracle

FHE Oracle is a fully homomorphic encryption-powered data oracle on Fhenix blockchain. It can compute or fetch any data using Lit Protocol actions and is indexed using Envio HyperIndexer.

ETHOnline 2024Shipped August 23, 2024Prize winner#privacy#infra
Visit Repo
FHE Oracle banner

About

FHE Oracle is a fully homomorphic encryption-powered data oracle on Fhenix blockchain. Computes or fetches data using Lit Protocol actions and is indexed using Envio.

Users can query any off-chain datasource, compute inside a Lit Action, execute transactions, sign messages or perform anything inside a Lit Action and get the result back in a fully homomorphic encrypted form.

How it's made

The Architecture is divided in three parts:

1. **FHE Oracle Smart Contracts**

2. **Lit Action backed Oracle Service** 3. **Envio Indexer**

---

# FHE Oracle Smart Contracts

Most of the contracts are inspired from Chainlink Functions Architecture where a user can create a `Consumer` Contract where they send requests and receive responses.

Oracles are Deployed and Verified on Fhenix Helium Testnet:

Router: [0xbd533524e6f709AE55Bc7686C3e416D6870D1259](https://explorer.helium.fhenix.zone/address/0xbd533524e6f709AE55Bc7686C3e416D6870D1259)

Coordinator: [0x1EA3bce6a8a08d8c08859Fe720024f98FeB11C4E](https://explorer.helium.fhenix.zone/address/0x1EA3bce6a8a08d8c08859Fe720024f98FeB11C4E)

Consumer: [0x394403eE9b3b5e25D492Ad2FD4cc0836D8e75B52](https://explorer.helium.fhenix.zone/address/0x394403eE9b3b5e25D492Ad2FD4cc0836D8e75B52 )

Before using the Oracle, the user needs to register their Consumer contract with the Oracle by creating a Subscription and adding the `Consumer` contract address for the Subscription.

While creating a request a user can pass the following parameters:

  • **Source**: The source of the data. It can be a Lit Action IPFS CID or inline code to execute.
  • **Public Arguments**: The public arguments to pass to the Lit Action.
  • **Private Arguments**: The private arguments to pass to the Lit Action (will be encrypted using Lit Network and only decrypted inside the Lit Action).
  • **Callback Gas Limit**: The gas limit for the callback transaction.

Once the Request is created, it is sent to the `Router Contract. Then Router contract forwards the request to the Coordinator contract. The Oracle Service listens for the Coordinator contract events and fetches the request data.

---

# Lit Action backed Oracle Service

Once the event is received, the Oracle Service fetches the request data and executes the Lit Action. The Lit Action can be a simple computation or a complex off-chain data fetch. Private Parameters are decrypted inside the Lit Action and used to perform the computation.

Once the Action is Executed the result is encrypted using `Fhenix Blockchain Network Key` and then sent to `Off-Chain Reporting (OCR)` Contract. This is where the transmitter can batch and send multiple responses back to the `Coordinator` contract. The batch is signed using the Transmitter PK and sent to the Coordinator Contract.

The Coordinator Contract verifies the signature and then sends the response back to the Consumer contract via Router.

---

# Envio Indexer

Events are indexed using the Envio Indexer. The Indexer listens for the `Coordinator` contract events mainly `RequestSent` and `RequestFulfilled` and indexes the data. The data is then available for querying using the `FHE Oracle Frontend`.

This Indexed Data can be used by the Request Fulfillers/Transmitters to fetch the data and send the response back to the `Coordinator` contract.

Prizes

  • Lit Protocol · Participation Trophy · Participation Trophy

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

Intellijack

AI Oracle on Fhenix enabling inference over private data to go on chain. Demonstrated application of an agent and data economy

fheProxies

fheVPN (Proxies) is a decentralized Proxy-as-a-Service (PaaS) enabling anonymous web browsing via nodes from global operators. Fully Homomorphic Encryption (FHE) ensures only clients who pay on-chain through the Fhenix network can securely access node details.