blockchain oracle what is it

In an ideal world, businesses would have a one-stop shop for all their technology needs. This would make things simpler and less time-consuming. But in the real world, you need to find multiple vendors and test different solutions before finding the right one.

Oracle is a leading enterprise software company that provides solutions for many business needs. Among these is Blockchain technology. There are several types of oracles, each with its own function and usage.

It can be considered a source of information for other applications. They are sometimes called the “bridge” between the real world and Blockchain protocols because they provide data from outside sources in a trusted way.

In this article, we will explore what a Blockchain oracle is, its different types, how it works, and common applications of an oracle within the Blockchain ecosystem.

What is a Blockchain oracle 

Definition: A Blockchain oracle is a software system that provides data to smart contracts. It is a source of external data that a Blockchain can rely on, and that data can be used to trigger or execute contractual clauses.

Oracles are important to Blockchain systems in the same way that a database is important to a website. It provides information that the website needs in order to function, like the current exchange rate of the country’s currency.

They are used in Blockchain to facilitate the transfer of assets between different parties. This is done by triggering contractual clauses based on data from the outside world.

Types of Blockchain oracles

There are 9 different types of oracles, each with its own purpose and function. The different types of oracles are Hardware Oracles, Software Oracles, Inbound Oracles, Outbound Oracles, Centralised Oracles, Decentralised Oracles, Human Oracles, Contract specific oracles, and Computation Oracles.

1. Hardware oracles

Hardware oracles are useful for applications like supply chain management and IoT. They are secure and tamper-proof, but they can be expensive. Hardware oracles work by receiving data from a sensor and then sending that data to a Blockchain via a secure connection. There are many use cases for hardware oracles.

a man scanning a barcode. the blockchain oracle is useful to track the origin of the product
Source: Pexels

One example is using a barcode scanner to read a product’s packaging label. If the shipping company scans the barcode, they can see its destination and where it originated. This is helpful for tracking and tracing.

luggage at the airport
Source: Unsplash

Another example is a luggage tag that contains a chip that records flight details and lets the airline know when it’s been picked up by a passenger.

When the luggage is scanned at the airport, the airline’s app reads the chip and can track the bag as it goes through the conveyor belt and onto the plane.

2. Software oracles

Software oracles work by using API servers to send Blockchain data to other applications. They are ideal for simple systems and are less expensive than hardware oracles. There are many types of software oracles, including web oracles, API oracles, and smart contract oracles.

  • Web oracles work by sending web data to a Blockchain network.
  • API oracles send API data to a Blockchain.
  • Smart contract oracles send data from a third-party application to a Blockchain by creating a contract between the two.

For instance, you can use an API oracle to pull stock data and information about a company’s market cap from an API to a Blockchain. If you’re using a web oracle, you can use a website API to send information to a Blockchain. For example, you could pull data from the website Coin Market Cap to a Blockchain and make it publicly available.

3. Inbound oracles

Inbound oracles are designed to pull data from the internet to the Blockchain. This form of oracle is utilised when sending data from the Blockchain is not necessary or when the data is private. They are useful for pulling data from websites and APIs.

For example, you can use an inbound oracle to get data from a website like Coin Market Cap and display it on a Blockchain.

Inbound oracles work by pulling data from the internet and sending it to a Blockchain with no option for the website to respond. The website owner cannot send any data back to the Blockchain. This is ideal for situations where the data is sensitive and needs to be kept private.

4. Outbound oracles

Outbound oracles do the opposite of the inbound ones by sending data from the Blockchain to the internet. This type of oracle is used when you need to send private data to the internet or when data needs to be sent to other Blockchain networks. They are useful for sending data to the internet.

For example, you can send data such as a shipping address stored in the Blockchain. Using an outbound oracle, you can send information, such as identification numbers, to a website. This is helpful when you need to confirm your identity online.

Outbound oracles work by pulling data from a Blockchain and sending it to the internet. This means that the Blockchain network controls the information sent to the internet.

5. Centralised oracles

These oracles are controlled by a centralised entity and are useful for scenarios where trust between network participants is an issue. Centralised oracles can be compromised and are not ideal for most Blockchain networks.

They are controlled by a centralised party. This means that a single entity controls the oracle, and that entity can decide what data is sent to the Blockchain. This is helpful when there is a lack of trust between network participants.

6. Decentralised oracles

Multiple parties control decentralised oracles with no single controlling entity.. These oracles have no central controlling entity and rely on the network participants to come to an agreement about the information sent to the Blockchain.

This means that no single party can decide what data is sent to the Blockchain. They are useful for applications where trust between participants is an issue.

7. Human oracles

Human oracles are used when you want to use an oracle that relies on human input. This can be as simple as a multiple-choice quiz or a user typing in a phrase they’ve been given. A great example of a human oracle is using cryptography. This helps identify humans to reduce the possibility of fraud in a network.

8. Contract specific oracles

a painting representing a ship. a blockhain oracle is helpful to prove the authenticity of any piece of artwork
Source: Unsplash

Contract-specific oracles are built specifically for a particular contract. This means that the data sent to the Blockchain is related to the contract. They are ideal for situations where the data from a real-world event needs to be verified and cannot be used for other purposes.

For example, you can create an oracle that verifies the authenticity of a piece of artwork. You can then send the oracle’s results to a Blockchain. A buyer can then use the oracle results to verify that the artwork is authentic.

9. Computation oracles

Computation oracles work by using a third-party computation service, such as Amazon’s AWS, and sending the results to a Blockchain. This is helpful when you need to use expensive or computationally heavy services that would otherwise be impossible to calculate on-chain.

What is Blockchain oracle used for?

Blockchain oracles can be utilised in many ways. These range from tracking a commodity’s price to determining an online user’s legitimacy by checking their identity. Oracles are particularly important for the Internet of Things (IoT), where data needs to be verified and trusted.

They can also enable cross-chain interactions and other Blockchain protocols that are otherwise difficult to integrate. Oracles are used in smart contracts to trigger actions based on data from the outside world. This data can come from different sources and can be as simple as the weather or as complex as a change in stock prices.

Oracles can be used to determine the transfer of assets between parties, to track commodities, or to verify information such as a person’s identity. They can also be used to enable cross-chain interactions that would otherwise be difficult to integrate.

Problems with Blockchain technology

Scalability – In a PoW Blockchain, every transaction requires the entire network to solve a complex mathematical puzzle to verify it. This increases transaction times as the network expands and becomes increasingly congested.

Security – To prevent malicious actors from tampering with the Blockchain, PoW Blockchains employ heavy-handed security measures that consume immense computing power. This results in slow transaction speeds and high energy costs.

Decentralisation – Since each validator is required to solve a complex mathematical puzzle, PoW Blockchains are highly centralised. PoW Blockchain networks are also inherently less secure when compared to their PoS counterparts.

Immutability – All transactions are verified and approved by the entire network. It’s virtually impossible to change or remove data once it’s been recorded on the Blockchain.

How does Blockchain oracle solve those problems?

There are different ways to solve the problems discussed above. The specific implementation of a Blockchain oracle depends on the application’s requirements. To overcome the problems of scalability, security, and decentralisation, a PoS Blockchain can be used.

PoS Blockchains don’t require miners to solve complex mathematical puzzles to verify transactions and are, therefore, faster and cheaper. They are, however, less secure. To overcome the problem of immutability, an oracle can be implemented as a centralised service or using a distributed oracle network.

A centralised oracle is easier to implement but isn’t consistent with the rest of the decentralised network. A distributed oracle network is more complex to implement but is consistent with the rest of the Blockchain.

What is the Oracle problem?

The oracle problem exists because of the trust deficit between a Blockchain and the outside world. The outside world is composed of various data sources that can’t be fully trusted as they can be altered or tampered with. On the other hand, Blockchain protocols are built on trust and verified data.

Since the Blockchain can’t trust outside data, it can’t make use of it. The Blockchain is forced to either trust the oracle or use some sort of verification method. The oracle problem can be solved in two ways: The Blockchain protocol can either trust the oracle or verify the data from the outside world.

Trusting the oracle is not a good long-term solution because it can result in bad actors abusing this trust by providing false information. 

How to solve the Oracle problem

There are two ways to solve the oracle problem: 1) Verify the data, or simply 2) trust it. Verifying the data involves using a trusted third party that verifies the data from the outside world. This is a costly and less scalable solution.

Trust is more of a short-term solution. The Blockchain can verify the oracle’s public key and then trust the data from that specific oracle. This isn’t a long-term solution either because there’s no guarantee that the oracle’s public key won’t change.

Oracle design patterns

To determine an oracle’s trustworthiness, it’s important to understand how oracles work. An oracle is a server that listens for data from external sources. The data can come from any source, such as a website, API, social media post, or sensor.

It then stores this data in a database. The Blockchain can then query this database to receive the appropriate data. Here are some common oracle design patterns:

Immediate-read

An oracle provides data to the Blockchain that needs to be read immediately. This data can come from an API call, a sensor reading, or a website. Immediate reads are useful when the Blockchain needs to respond to real-time events, such as tracking a package or monitoring an online chat room.

This can be useful in supply chain management to monitor weather conditions or detect any hazards on the route.

Publish-subscribe

An oracle provides data that needs to be published and subscribed to. This can be data from a website that needs to be updated at specific intervals or the price of commodities that needs to be updated daily. Publish-subscribe oracles are ideal when the Blockchain needs to trigger actions based on future events. 

Request-response

An oracle provides data that needs to be requested by the Blockchain and then responded to. This data can be identity verification, data from an API call, or sensor data. Request-response oracles are ideal for validating identity, getting real-time sensor data, or accessing APIs.

Conclusion

A Blockchain oracle is an intermediary providing data or validation about the world outside a network. This entity can provide reliable answers to predetermined questions. For example, an oracle could verify that someone owns a specific address and provide that information as part of a smart contract on a Blockchain.

If you’re new to the Blockchain world, you might have heard some terms without fully understanding what they are. An oracle is one such term. An oracle is essentially an agent that provides access to information from the real world. It has many applications but is especially useful regarding digital contracts between machines in a trusted network.

See you soon,

Scaling Parrots

Condividi questo articolo