An oracle may be defined in multiple different ways, according to the context. Within the blockchain context, an oracle is basically a data source that is used as a bridge between smart contracts and other external sources.

More specifically, an oracle is an agent that not only communicates with external data sources but also verifies and authenticates that the data being provided is accurate. Thus, oracles are responsible for providing vital and reliable information to smart contracts, which in turn perform certain tasks.

The importance of oracles relies on the fact that blockchain smart contracts are only able to access the data that is contained within their own digital network. Therefore, oracles are needed as a communication instrument that “translates” real world events (non-deterministic data) to digital values that be recognized by smart contracts (deterministic data).

Blockchain oracles may be classified according to their use case. The most common types are:

  • Hardware Oracles: Integrates with physical systems and technologies, providing real-world data for smart contracts. For instance, hardware oracles can communicate with RFID sensors used in various industries (automobile, pharmaceutical, supply chain, etc.)
  • Software Oracles: most commonly used; retrieve online data from external programs and web APIs - such as market prices, flight status, and weather data.
  • Consensus Oracles: sort of decentralized oracles that collects large amounts of data from a set number of other oracles, following specific methods to determine the validity and accuracy of data collected. Consensus oracles are being used in prediction markets platforms, such as Augur and Gnosis.
  • Inbound Oracles: transmits external data to smart contracts or software oracles. Can be configured as a set of "if" guidelines (e.g. “if an asset hits a certain price, place a buy order”).
  • Outbound Oracles: transmits smart contracts data to external systems, making it possible for smart contracts to communicate with non-blockchain sources.

In general, a blockchain oracle consists of a third-party data source that is dependent on external permission to work properly, which means they are usually a tool provided by centralized entities. Therefore, most oracles end up sacrificing the decentralized properties of the smart contracts. 

The Oracle Problem

Depending on the data provided by the centralized oracles, smart contracts will execute different functions, meaning that oracles have immense power over smart contracts. This is known as the Oracle Problem, which rises as a conflict of trust that centralized third-party oracles bring to trustless smart contracts and blockchain systems.

Although decentralized oracles, such as the consensus oracles, may present a possible solution, there are still many challenges to be overcome, since decentralized oracle networks are quite difficult to implement in a secure, functional, and trustless way.