What is an Oracle?


Oracles are the most under-appreciated aspect of blockchain technology. They bring real-world data into smart contracts. Oracles provide the bridge between traditional data sources, such as bank accounts, and smart contracts that rely on this information to execute a transaction. Given the critical role they play in the blockchain ecosystem, it is important to understand what an oracle is and how they work.

What is an oracle?

An oracle is a network service that provides data to an application, enabling smart contracts to interact with the real world. For example, you can use an oracle to get the price of gold at any moment in time, which allows your smart contract to pay out different amounts of bitcoin depending on whether the price of gold was above or below $1,000 USD by 10 am.

Oracles are used in blockchain because they provide secure and trustworthy data input without relying on human intervention.

How does it work?

Oracles are a bridge between the real world and blockchain. They bring data from the outside world into smart contracts, which can then use that data to trigger events.

For example, you might want your smart contract to be able to verify an event happening in the real world, like “the price of this stock has reached this value” or “this shipment has arrived at its destination.” In both cases, someone needs to determine whether or not those events have actually occurred. You could have people manually checking these things every time they happen — but not only would that be very inefficient (and slow), but it also wouldn’t scale well if you wanted many people using your service at once. Instead of doing all those checks manually, you could use an oracle service like Oraclize [link] which would automatically verify those things for you whenever they occur.

Why are oracles used?

Oracles are used to bring data from the outside world into blockchain-based smart contracts. For example, a system could be created that tracks airline flight information and uses an oracle to relay this information to smart contracts. The flight schedule would then be available for anyone who wished to use it for booking travel arrangements.

The main advantage of oracles is that they allow you to use your blockchain project in situations where you don’t have access to all of its components at once. Oracles are also helpful with projects that involve creating decentralized applications (DApps), which may not be able to function without some additional assistance from external sources

What are the disadvantages of oracles?

Advantages of oracles are obvious, but there are also some disadvantages to be aware of:

Oracles can be unreliable. This is a problem because the information they provide is critical to any smart contract’s correct functioning. If the data they give you is incorrect, then your contract will not work as intended, and could end up losing money or giving out funds inappropriately.

Oracles may be hacked by bad actors who want to trick users into making bad decisions on behalf of their contracts (like investing in fake companies). This would prevent smart contracts from operating as expected, which would cause major problems for everyone involved.

Oracles may also be manipulated by those with insider knowledge about what data should come next so that it benefits whoever has access at that moment instead of following normal protocol (such as timestamping). This could severely impact whether or not someone ends up receiving their deserved payouts after completing a task properly within time limits; if an outsider changes something about how much money should go where based on personal gain rather than what really happened then things won’t work out well!

Oracles bring data from the outside world into blockchain-based smart contracts.

In a broad sense, an oracle is something that brings data from the outside world into a blockchain-based smart contract. The most common use of oracles in the blockchain is for users to pull information from external sources like weather conditions, stock prices, or sports scores.

The idea behind using an oracle is to make it easier for users to write smart contracts that interact with the outside world — and thus creating more complex smart contracts than what was previously possible. You can think about it as an interface between your blockchain and the real world (or virtual worlds).

There are two types of oracles: Software Oracles and Hardware Oracles. The main difference between them is the way they communicate. Software oracles typically use APIs to pull data from external sources, while hardware oracles use sensors, cameras, or other hardware sensors to collect information.


Oracles are a key component of blockchain-based smart contracts, providing data from outside the blockchain and enabling developers to build applications that can interact with external systems. The future for oracles is bright, as they will continue to play an increasingly important role in the development of smart contract technology.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store