Blockchain Oracles Explained

Blockchain Oracles Explained
TabTrader Team
TabTrader Team
Reading time is 9 min
Publication date is

A blockchain oracle is a piece of infrastructure which connects blockchains to the outside world, supplying them with off-chain data.

They solve the problem of feeding real-world data into a deterministic blockchain, nodes in which only see events which occur within that blockchain.

What do Blockchain Oracles Do?

Blockchain oracles are a key component in the proliferation of smart contract capabilities. They essentially act as a bridge between two “worlds” — the off-chain and on-chain realm.

In the era of Web3 and DeFi, smart contracts are being used in all sorts of ways in endless fields, with each implementation having different requirements. 

Sometimes, these requirements pose challenges for blockchain networks in which nodes are only capable of processing on-chain data. What if the source of the data, or data variables, come from outside the blockchain and are constantly changing?

This is where an oracle comes in — using an oracle, blockchains can process data from the outside — off-chain data — to generate reliable results. 

In practice, an entity which feeds off-chain data to deterministic blockchains — blockchains in which nodes produce the same order of transactions — is referred to as an “oracle”. 

Types of Blockchain Oracle

“Oracle” is the umbrella term for a variety of different entities, but they differ in how they operate. There are, in fact, various types of such blockchain oracle.

 Hardware and software oracles

One key difference between the different iterations of blockchain oracle currently employed is the data they are able to process. Different requirements dictate different data sources for a blockchain, and these themselves are not as straightforward as a constantly-updated cryptocurrency market or other digital source. 

Some oracles are specifically designed to deal with off-chain data which is not digital; for example, readings from motion sensors. These are called hardware oracles, as they do exactly that — connect to different hardware or computer peripherals to extract data and feed it to the blockchain. They do so via Internet-of-Things (IoT) sensors and radio frequency identification (RFID) tags.

The “traditional” image of the blockchain oracle thus refers to software oracles. These collect data from digital sources. In terms of security, however, hardware oracles are considered a safer bet as part of a blockchain setup as it is harder to compromise such an entity compared to a software oracle.

Inbound and Outbound Oracles

A further nuance in oracle operation extends from their status as a “bridge”. Bridges can be crossed from either end, and as such, data can travel just as easily from the blockchain to the “real world” as it can to the blockchain from the outside. 

Oracles can thus be either “inbound” or “outbound” depending on the direction of this flow of data. If, for example, a trading setup demands a smart contract handle exchange orders, an inbound oracle could feed data from the market which will decide when a particular type of order is placed. By comparison, an outbound oracle tells outside entities about blockchain data changes.

Centralized and Decentralized Oracles

In a simple setup, a blockchain oracle which relays data from outside on its own is called a “centralized” oracle. In Blockchain, of course, the word “centralized” carries certain unwelcome connotations, and for good reason — everything of value is in one place, and that entity as such becomes a liability. If the entity is compromised, it acts as a single point of failure. This is one of the major problems of blockchain oracles acting as the sole arbiter of a blockchain — the data source relies on the controller of just one oracle entity.

This is where decentralized oracles, or “consensus oracles”, come in. Decentralized oracle setups allow a blockchain to consult multiple data sources, mitigating the risk of a single point of failure leading to a breakdown in blockchain validity.

Perhaps the best-known decentralized oracle network as of 2022 is Chainlink, the token for which, LINK, along with many others, is easily tradable on TabTrader.

Human Oracles

The term “human” in blockchain oracle settings refers to whether the oracle can function without human intervention.

Some data sources are inherently subjective; for example, when a group of users votes on an abstract question which requires emotional bias to answer. Here, human “oracles” allow such complex data, which cannot be gathered and determined automatically, to enter the blockchain. 

Contract-specific Oracles

As its name suggests, a contract-specific oracle is one which is designed to work with a single smart contract. This has its benefits — an oracle designed with just one goal in mind can be tailor-made to suit that smart contract’s needs exactly. On the other hand, in general, such oracles are time-consuming to create and maintain. Moreover, if there are multiple smart contracts, there will also need to be multiple contract-specific oracles.

Computation Oracles

Oracles can in fact do more than simply act as the bridge between the off-chain and on-chain realm. Computation oracles process data and make calculations before passing it to the blockchain — a use case which is especially useful if computation costs on a network would otherwise make its operation financially burdensome. Oracle computation thus allows off-chain calculation to be performed in a trustless manner on behalf of a smart contract.

What is the Oracle Problem?

The difference between centralized and decentralized oracles discussed above is in fact a key topic of debate within the blockchain world, and is known as the “oracle problem”.

The oracle problem consists of security versus utility — “how can I be sure that an oracle’s data is secure if there is only one of them?”

This gives rise to a dilemma — smart contracts are designed to remove risk and human error, but if their operation depends on a single point of failure in the form of a centralized oracle, their usefulness can potentially be easily undermined. 

How to Solve the Oracle Problem

To address the oracle problem, decentralized oracles attempt to remove the threat of compromise and related security issues by diversifying the means by which smart contracts are fed data. 

This is a key mission of Chainlink and others like it — providing a blockchain-agnostic interface which removes the pitfalls of centralization. Chainlink is essentially a distributed pool of decentralized oracles which can be cross-consulted.

Conclusion

Blockchain oracles are a key aspect of Web3 and DeFi infrastructure. They are responsible for bridging the gap between the online and offline world when it comes to data used in smart contracts supported by deterministic blockchains.

Without oracles, a large segment of Web3 and DeFi implementations would not be able to function based on the data sources that they require, and as such, oracles contribute to the rapid expansion of the industry.

There are some pitfalls when it comes to blockchain oracles, however, these centering on security issues and the susceptibility of centralized oracles in particular to attacks from bad actors.

Blockchain oracles are also important for crypto traders, as popular tokens likewise facilitate growth and expansion of DeFi in addition to their internal functions. 

TabTrader offers a wide variety of DeFi tokens for trading via the most popular exchanges. Check out the TabTrader app for iOS, Android and Web to get started.

Want to know more about Bitcoin, crypto and how to become a better trader? The TabTrader Academy has all the information you need.

Looking to get started in crypto trading?

Try TabTrader on mobile or web!

google-playapp-storeweb-app