Oracles

Oracles are data feeds that make off-chain data sources available to the blockchain for smart contracts. This is necessary because MELD-based smart contracts cannot, by default, access information stored outside the blockchain network. Giving smart contracts the ability to execute using off-chain data extends the utility and value of decentralized applications. For instance, on-chain prediction markets rely on oracles to provide information about outcomes that they use to validate user predictions.

Oracles solve an important problem, but also introduce some complications, e.g.:

How do we verify that the injected information was extracted from the correct source or hasn’t been tampered with?

How do we ensure that this data is always available and updated regularly? Different oracles offer different solutions to these issues. Oracles are typically evaluated on how well they can handle the following challenges:

Correctness: An oracle should not cause smart contracts to trigger state changes based on invalid off-chain data. An oracle must guarantee authenticity and integrity of data. Authenticity means the data was gotten from the correct source, while integrity means the data remained intact (i.e. wasn’t altered) before being sent on-chain.

Availability: An oracle should not delay or prevent smart contracts from executing actions and triggering state changes. This means that data from an oracle must be available on request without interruption.

Incentive compatibility: An oracle should incentivize off-chain data providers to submit correct information to smart contracts. Incentive compatibility involves attributability and accountability. Attributability allows for linking a piece of external information to its provider, while accountability bonds data providers to the information they give, so they can be rewarded or penalized based on the quality of information provided.

MELD is currently integrated with two Oracles, Supra Oracles and Umbrella network. In the next section, we will discuss how to integrate Supra Oracles into your dApp.

Last updated