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.
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.
The Architecture is divided in three parts:
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: 0
Coordinator: 0
Consumer: 0
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:
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.
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.
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.

