Is there any Oracle solution available to feed private data to Substrate chain?

Feeding data to chain has already been answered here How can I build a price feed oracle for my Substrate chain?. And OCW provides the best solution.

But in my case, I want to feed private data, which is a confidential information. I have checked off chain worker example. We can hit http end point to fetch information https://github.com/paritytech/polkadot-sdk/blob/ca382f32033d8350d49934b30680d8c30dd9bdfc/substrate/frame/examples/offchain-worker/src/lib.rs#L585 and feed on chain.

In my case, I would need confidential information from other application so I can not use http end. I would need any oracle to feed such data on chain.

Please help me to provide the solution.

  • Are there any constraints? Can your oracle just encrypt the data before putting it on-chain?
    – liamaharon
    Feb 20 at 5:32
  • Yes. We have to send data without encrypt it.
    – Boleng
    Feb 20 at 5:36
  • You want to send data unencrypted data to a public blockchain, but at the same time have it be confidential / private? It sounds like there's a problem here :)
    – liamaharon
    Feb 22 at 0:24

1 Answer 1


Substrate chains are public. If you want to do confidential computing then you could consider the Phala parachain. They have confidential off-chain computation extensions.

I can't use OCW.

Without elaboration on why, its difficult to give advice.

Another way would be to implement Zero-Knowledge computation to do the computations on-chain. AFAIK its quite computational expensive and normally on-chain code should only verify - not compute. This is a standard principle to make the system more efficient.
You could therefore try to do the computation off-chain and then only have the verification in a on-chain ZK logic, but i dont think its easy...

Next time please include concrete information on what you are trying to achieve.

  • I have updated the description.
    – Boleng
    Feb 20 at 11:47
  • It is still not clear. Confidential to whom? To the runtime business logic of the chain, to the OCW, to the other party? Who encrypts the data and who should be able to decode it? I dont think the question can be answered like this since "confidential" is not sufficiently explained here. Mar 30 at 15:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.