The security, transparency and decentralization aspects of blockchains are ideal for multiple use cases. The significance of blockchain technology is expanding beyond the financial sector. Blockchain disrupts major industries like supply chain shipping, health, insurance and more.
The degree of data accuracy though, many times depends on the legitimacy of blockchain oracles. Certain use cases like the issuance of blockchain-based derivatives, require accurate data feeds. These data feeds come from blockchain oracles when they reside off-chain. In combination with algorithms and arbitragers, collectively ensure that the price of the derivative matches the price of the underlying asset.
The Blockchain Oracle Problem
Since blockchains rely on programmable smart contracts and to trigger further actions, they ususally operate on a rule-based, secure environment. Therefore, the input parameters determine the recording of data on an immutable blockchain. Consequently, they determine the following procedures which lead to specific outcomes.
The link of a blockchain to real-world events is a main issue among the community. This is the gap that blockchain oracles aim to fulfill. How could on-chain data become reliable and feed information to blockchains through smart contracts?
What kind of information do Blockchains require from Oracles?
Blockchain oracles attempt to bring accurate off-chain information into smart contracts. Such information include exchange rates, stock prices, outcomes of sports events and more.
Each use case requires a different approach in order to achieve high data accuracy. For example, decentralized prediction markets like Augur rely on the “wisdom of the crowd” to report on real-world outcomes. Reporters have monetary incentives to report true outcomes.
Additionally, oracles can determine prices of trading pairs in DEXs and the value of stablecoins by tracking the off-chain value of the pegged currencies.
Besides price feeds and outcomes of events, blockchains may require information from IoT sensors like the temperature of a delivery package. This is a primary example of the integration of blockchain with other exponential technologies of the 4th Industrial Revolution.
When the temperature of the package would fall below a set limit, smart contracts can apply a penalty to the default party e.g. the truck driver. IBM and Maersk’s TradeLens Shipping Solution, applied a similar supply chain concept in recent pilots.
Oracles are essential to facilitate these use cases as the procedure relies on them to gather accurate data, communicate them to smart contracts and perform off-chain computations.
How do Blockchain Oracles work?
Oracles run via applications that interact with an on-chain smart contract. The smart contract requests information from the off-chain application. The oracle application computes the steps to derive the outcome asked by the smart contract.
The outcome can be derived from data coming from IoT devices, AI devices, APIs etc. Upon gathering this information, the oracle application supplies the on-chain smart contract with a transaction containing the necessary information.
Data like stock prices can be sourced from software oracles like APIs and temperatures can be sourced from physical oracles like IoT devices. As previously discussed, other oracles depend on the “wisdom of the crowd” method to feed the blockchain with event outcomes like sport events.
Depending upon each use case, the smart contract can process either data coming from a single oracle or compute a formula to average the results transmitted from multiple oracles.
Check our previous blog describing the Chainlink Oracle Process, to understand how the process starts from a smart contract producing a “Requesting Product”, up to the point where Chainlink nodes use off-chain sources to gather the data and communicate them to the “Aggregating Contract” that produces an average result. This result is fed into the on-chain smart contract.