What Is An Oracle In Crypto?

In short a crypto oracle carries data. Either from the real world to the blockchain and vice versa, between blockchains or completely off-chain. So a blockchain does not just offer services based only within its own ecosystem.

As a result oracles increase the amount of services offered on blockchain via smart contracts.

How Do Oracles Work

An oracle essentially expands the number of data sets that smart contracts can handle. This is because it does not just deal with on-chain data, but off-chain real world data as well. Therefore oracles open up many more possibilities for what a blockchain can handle.

A crypto oracle work hand in hand with smart contracts. Smart contracts are agreements that are made on the blockchain. They are signed by all the parties involved to make it binding. 

The contracts can be simple ones or complex depending on the service you need. Additionally a developer could set up the contract so that it will get processed in the future. That is to say if and when an event happens, once final data will come through to the blockchain.

So for example you decide to place a bet on your favourite soccer team. You hope they will win a match. Once the match is over, the result is carried by the oracle to the blockchain. After that the smart contract would instantly pay out the people that placed a bet on the winning team.

It is exactly the same as if you had used a regular sports betting website except on crypto rails. So the payout you will receive would be based on the odds of the game. However the payout is made and settled in crypto.

Types of Oracles

Oracles can carry all sorts of different data depending on what is needed. They are as flexible as smart contracts in that sense.

There are different types of oracles that you can find on the network.

Oracles can carry information:

  • From the outside world to the blockchain (inbound)
  • From the blockchain to the outside world (outbound)
  • Between blockchains (interoperability)
  • Completely off-chain
how oracles can transfer data

Examples of Inbound Information

The list includes, but is not limited to:

  • Weather
  • Prices
  • Sports results
  • Event outcomes
  • Futures and derivatives trading
  • website data
  • online reviews

You might wonder why weather is included in the list. This could happen if for example a farmer took out crop insurance in case of heavy rains or draught.

The weather is recorded continuously by multiple sources in the area where the fields are located. If there is persistent heavy rain over many days the oracle will take that information to the smart contract. Consequently the smart contract will pay out the farmer.

Then there are what are called predictive markets. These are bets on future events and they would include; sports results, event outcomes, futures and derivative trading. So for example you have sports match results, election results or the future price of a commodity.

On the other hand you could have website data where smart contracts will pay you for particular reasons. Like for example your website generated €30 of revenue for an affiliate partner. The smart contract will pay you your agreed commission based on the revenue amount.  

Example of Outbound Information

Most of the time oracles are inbound. However there are applications when you might need to send data off-chain. With outbound oracles this is mainly because of payments that are made on-chain.

For example you rent your apartment on Airbnb and your guests turns up at the door. For the guests to go inside the apartment they need to pay for their stay using crypto. As soon as they make the payment the smart contract will activate. As a result it sends an oracle to trigger the smart lock to open the front door.

Example of Cross-Chain Crypto Oracles

These are oracles that support interoperability between blockchains. Interoperability means that different blockchains that are not linked are bridged so that they can communicate with each other. Like for example bridging Bitcoin with Solana.

Oracles are used in the cross-chain bridge so that they can send data between the blockchains. Additionally they can send cryptos to the non-native blockchain.

For the cryptocurrency to go onto the non-native blockchain the crypto needs to get wrapped. So for example you can have wrapped Bitcoin which works on the Solana blockchain.

Off-Chain Oracles

They are called compute-enabled oracles. These are fully off-chain oracles that still interact with smart contracts. To clarify they cannot do on-chain data transfers because of legal, financial or technical limitations. However the oracle network is still run by computers.

Decentralised Oracles

One of the most important things about cryptocurrency is that it is decentralised. However for the community to keep it decentralised they need to keep the whole system decentralised. That would also include all the dapps and oracles on the network.

As a result the oracles cannot get their information just from one source. Firstly because that is centralisation which goes against fundamental principles of cryptocurrency. Secondly one source is one point of failure and the information may not be accurate.

That means that if the source is hacked, removed or deprecated it will cause trouble. Especially if there are large funds that are controlled by the smart contract. Like in the case of sports betting or perhaps even for financial products that might become popular.

Additionally the oracle needs to give only one answer to the smart contract. It cannot give multiple answers. This is because the blockchain needs to have consensus on the network. That is to say whether it uses proof-of-work or proof-of-stake or any other consensus mechanism.

So the oracles have to reach consensus between themselves first. That is to say before they give the final data to the smart contract. So the more oracle nodes the better. This is because you have a higher probability of certainty and truth. Like that the network will remain honest and trustworthy.

Decentralised Oracles List

  • Equilibria (XEQ) a private oracle
  • Chainlink (LINK)
  • Band Protocol (BAND)
  • Witnet (WIT)
  • Augur (REP)
  • Ramp (RAMP)

Although there are huge benefits to decentralised oracles not all oracles are decentralised. So anyone that uses an oracle needs to pay attention to which one they pick. This applies for developers that code smart contracts, but also to people that use dapp services that use oracles. However each oracle is different so people need to pick oracles not just for decentralisation reasons only.

Advantages of Crypto Oracles

As I mentioned before oracles are going to expand the amount of services blockchains can offer. Additionally since they are in the blockchain ecosystem, oracles have similar benefits as cryptocurrencies.

However the amount of advantages each oracle has partly depends on the network and how they are coded. Oracle networks that are set up well from the start and truly decentralised are much better. As a result they are more resilient.

Plus they do not use a third party intermediary. Everything is done automatically by computers. Moreover the data they give to the blockchain is irreversible and permissionless.

Crypto Oracle Attacks

Similarly to cryptocurrencies oracles can get attacked. Cryptocurrencies can only suffer from 51% attacks. However oracles have different ways in which bad actors can attack them.

Bad actors can attack oracles by giving false data to the smart contract. As a result they can change the outcome to negatively impact the people involved in the smart contract.

If an attack happens it can seriously affect the community’s trust in the oracle. Perhaps to the point where people will not use a dapp or developers replace the oracle with another oracle.

Types of Crypto Oracle Attacks

  • Freeloading – This is when one oracle copies another oracle’s data in the network. That is to say instead of sourcing the data itself to make sure it is true.
  • Mirroring – This is when one node receives the data and shares it off-chain with other nodes. The node may or may not control these other nodes.
  • 51% attack – This is when a lot of oracle nodes on the network are owned by the same entity. Or nodes collude with each other to purposefully give false data to the smart contract.

Preventing Crypto Oracle Attacks

There are different ways for preventing oracle attacks. So developers can set up oracle networks to maintain the integrity of the network.

The features or processes they can use are:

  • Anonymity – Oracles cannot identify each other.
  • Reputation – Oracle nodes on the network should have a consistent and good longstanding reputation. Otherwise nodes that are badly behaving can get booted off the network or get punished.
  • No communication – Nodes cannot communicate with each other.
  • Encrypted answers – Oracles encrypt their answers as soon as they receive the data. It reveals the data when other oracles submit their answers. This is done when they need to reach consensus so the oracles submit one answer to the smart contract.

Private Crypto Oracle – Equilibria (XEQ)

Companies might want to have a private oracle for various reasons. Either because they want to protect client personal information or they have sensitive business information.

Therefore they would not even consider using the regular public oracles. However they could use Equilibria which is a private and highly secure oracle. Equilibria is also compatible with any blockchain. So companies can use it regardless of the platform they chose to build their service.

However sometimes it is not enough to just have a private oracle. The whole system needs to have privacy so no confidential information will get leaked. As a result a business might want to opt to also use a private blockchain.

So far there is only Dero that entities can build on that has the most decentralised blockchain that is private. It is still new, but it has some great features. It is scalable with an 18 second block time, instant syncing and is immune to 51% attacks.

Dero is likely going to do very well as a platform. If you are interested in Dero you can visit the dero website or buy Dero here.  

Other Articles In This Section
What is an Oracle? And the benefits for smart contracts.
DAG technology. An alternative to blockchain?
Hadera Hashgraph. A network based on DAG technology.
51% attacks. When blockchains become vulnerable.

Frequently Asked Questions

Why do we need oracles?

Oracles increase the amount of things a smart contract can do. They opens up a wide range of use cases. Find out more in the article what are oracles.

Is an oracle a smart contract?

An oracle takes data to a smart contract. Based on that data the smart contract will leap into action and complete the terms in the contract.

What types of oracles are there?

There are 4 types of oracles:
·      inbound
·      outbound
·      cross-chain
·      off-chain

Are there private oracles?

As it stands there is only one private oracle called Equilibria (XEQ). It will keep any data secure.
CoinStove
Logo