logo

Blockchain oracles explained

Jan 21, 2022 published by
blog image

What is a blockchain oracle?

A blockchain oracle is a third-party service that provides smart contracts with external information. As blockchains and smart contracts cannot access off-chain data (data from outside the network), oracles serve as bridges between the network and the outside world.

Oracles are an important element to a blockchain’s ecosystem as they give smart contracts the ability to operate in a wider capacity. Without an oracle, smart contracts would only have access to data from within their own network.

Blockchain oracles come in many shapes and sizes. Here are a few examples:

  • Inbound oracles – the most widely recognised oracle that gathers off-chain data and delivers it onto the blockchain network for smart contract consumption.
  • Outbound oracles – allow smart contracts to send commands to off-chain systems in order to prompt them to carry out certain actions. For instance, informing a banking network to make a payment.
  • Cross-chain oracles – these types of oracles read and write information between different blockchains. They also enable interoperability between different blockchains, such as using data on one blockchain to prompt an action on another.
  • Software oraclesdeliver data from digital sources, such as websites, servers and databases. These types of oracles can provide real-time information, including exchange rates and fluctuations.
  • Hardware oracles – provide and relay information through camera motion sensors, radio frequency identification (RFID) sensors, thermometers and barcode scanners.

What are their use cases?

Blockchain oracles have many different use cases, as well as the potential to solve problems in several industries.

For instance, the insurance industry often faces issues regarding transparency and data inequality. This happens when one side in a transaction has more information than the other.

An oracle-based blockchain will be able to solve this by monitoring data through an API (application programming interface) and then transmitting the relevant information for the insurance to the blockchain. From there, it will be able to verify whether the claimed event happened (e.g. flight delays or cancellations), providing full transparency and benefiting both the insurance company and its customers. People will be able to track the status and data of their claim at every stage, as well as get clarification on the process. On the other hand, insurance companies can ensure that the user data is genuine.

Another industry blockchain oracles could potentially improve is the prediction market, in which people can buy or sell shares following a real-world event. The current prediction market is centralised, which limits who has access to the markets and what they can bet their money on. There’s also the issue of high trading costs, profit cuts and withdrawal fees.

As blockchain is decentralised, there are practically no limitations. An oracle will gather the relevant information to implement into the network, which in turn will allow anyone to trade on any result at any time. People will also have the opportunity to set their own markets and won’t face the usual high fees that are typically seen on a centralised platform.

Chainlink and other blockchain oracles

Chainlink is an Ethereum-based blockchain oracle network that aims to link real-world, dependable data to smart contracts. Chainlink utilises multiple data inputs to eliminate any single point of failure in a smart contract, which in turn enables the network to securely connect smart contracts with external data sources. It also incentivises oracles to provide accurate data by giving them a “reputation score”, as well as rewarding them with its native LINK token. Here’s how the execution process works:

  1. Drafting the SLA – a user will draft up a service-level agreement (SLA), an agreement document that outlines a set of specific data requirements.
  2. Choosing the oracles – the Chainlink network will match the user with the best data provider.
  3. Submitting the SLA – once the SLA is submitted, a user can deposit their LINK tokens in an Order-Matching contract, which matches a smart contract’s SLA with the best bidding oracles.
  4. Connecting the dots – this is where oracles and external data come together. This data is processed by the oracles and transferred to the contracts running on the Chainlink blockchain.
  5. The results – the results of the collected data are recorded and returned to an Aggregation contract, which investigates the results and gives the user a weighted score.

Another example is Band Protocol, a software that aims to bring external data through traditional web APIs onto the blockchain.

Band Protocol incentivises a network of users to provide real-world data to decentralised applications (dApps). These users are known as validators, who are responsible for ensuring accurate transactions on the network, as well as adding new transactions. The network selects its validators from its top 100 users who hold the native BAND token, which can either be purchased or delegated to someone by other users.

Finally, there’s the API3 network. Launched in December 2020, the platform allows dApps to access real-world data and services through APIs. The problem API3 aims to solve is the fact that most APIs are designed for centralised applications, meaning they are not compatible with blockchain or dApps. Therefore, API3’s mission is to create capacity between the two, without burdening API providers or dApp developers. To achieve this, the network created its own decentralised APIs (dAPIs), which, as the name would suggest, are fully decentralised APIs that are inherently compatible with blockchain technology. These types of APIs work as multi-layer, cross-platform oracle solutions that provide data to any decentralised ecosystem.

What is the future of blockchain oracles?

As the world of DeFi continues to grow, blockchain oracles are likely to become more prominent. In terms of their use cases, it is widely speculated that oracles will grow beyond providing information for DeFi protocols.

Yannis Bakos and Hanna Halaburda of New York University commented that blockchain oracles could support the enforcement of international treaties, such as limits on greenhouse emissions. This is primarily because blockchain technology is immutable, meaning information cannot be altered or changed once it has been recorded. Therefore, any information provided from oracles is guaranteed to be completely legitimate and not tampered with. An article by CoinTelegraph also added that blockchain oracles could be used to help fight government corruption, authenticate supply chains and much more.

Wirex Community

Join Wirex Discord for the latest news, releases and updates
Join now

Need help?

There is no such thing as a dumb question. Find out whatever you need to know on the Help section.
Open Help section