0

We have a Substrate based relay chain where we need to fetch external data like important documents and specific data using off-chain workers right now. But these OCW doesn't work for reaching consensus on data being fetched and put on chain. Is there any substrate based oracle available for relay-chain and not solo-chain or parachain?

1 Answer 1

1

This link can help you: https://wiki.polkadot.network/docs/build-oracle

Here is a copy of the content linked:

In the blockchain context, an oracle is a way to bring real-world data onto the blockchain so that it can be used by a decentralized application.

Oracles serve many purposes for application builders. For example:

  • Most stablecoin designs use an oracle to bring in data of the exchange rate of assets, in order to peg their value to a real world currency.
  • Synthetic assets use oracles as price feeds in order to determine if the underlying cryptocurrency can sufficiently collateralize the debt position.
  • Prediction markets use oracles to decide the outcome of real world events and determine the payout of the prediction shares.
  • Decentralized insurance markets use oracles to bring in information about whether a claim is valid or not.

Oracle solutions range from centralized and trusted to decentralized and game-theory based. On the centralized end of the spectrum, an oracle could be a single account that has the authority to dictate the real-world data on-chain. On the decentralized end, a complex game of "chicken" can be played among various staked actors who risk getting slashed if they don't submit the same data as everyone else. Solutions such as Chainlink fit somewhere in the middle, where the amount of trust you put into the reporting oracles can be adjusted based on your preferences. A Chainlink Feed Pallet was recently released to allow smart contract applications across Polkadot to access price reference data, made available as a Substrate oracle pallet. Acurast is another solution that enables developers to define their off-chain data and computation requirements and receive the outputs to the Acurast Pallet and EVM or WASM environments.

When using an oracle in your application you should be aware of the benefits and risks that are baked into its specific model. As the Polkadot ecosystem develops and oracle parachains begin to appear, this article will be updated with a comparison of the different solutions and the benefits and drawbacks that each provide.

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.