Published in


Introduction to Oracles: How different DeFi protocols made billions of dollars without centralization.

In the last two years, the DeFi industry has grown at an exponential rate. The Ethereum blockchain and its smart contracts, which are self-executing agreements that eliminate the need for a third party, deserve a lot of credit for DeFi’s remarkable development. However, there is another crucial element of the infrastructural structure that enables DeFi expansion. Which are — Oracles.

Back in medieval times, an oracle was a person that claimed the ability to see into the future and gave useful information to someone who needed it.

This is how it works in the blockchain space with a little modification from the technological perspective.

In layman’s terms, an oracle is a trusted third party that gives you reliable data outside the current information you have access to. It’s a software that acts as an intermediary helping to do a two-way data transfer between smart contracts (on-chain) and the real world (off-chain).

Examples of data transmitted by oracles to smart contracts include price information, the successful completion of payment, the temperature measured by a sensor, election outcomes, etc.

How oracle works

Let’s dive deeper,

Blockchain oracles can be classified into three sectors:

  1. The Source: Does it originate from software data or hardware data?
  2. The direction of Information: Is this data inbound or outbound?
  3. The Degree of trust: Is the data centralized or decentralized?

Using the classification above, we can now differentiate the different types of blockchain oracles.

Hardware oracles

Hardware oracles collect data directly from the physical world and convert it to digital values that can be fed into smart contracts. These include barcode scanners and sensors that collect data actively or passively and transmit it to the smart contract.

Software oracles

Software oracles get information from online sources, browsing their websites and thereby providing the most up-to-date information to the smart contract. For blockchains, this information usually comes from cryptocurrency exchanges.

Inbound oracles

Inbound oracles allow the network to send information from external data sources to smart contracts.

Outbound oracles

Outbound oracles permit smart contracts to send data to external sources.

Centralized oracles

A centralized oracle is a single entity that provides data from an external source to a smart contract that is protected by a set of security protections. However, because there is only one node in charge — comparable to a traditional financial system with a single point of failure — the smart contract becomes less secure and more prone to being corrupted and attacked by bad data supplied into it.

Decentralized oracles

Some of the goals of decentralized oracles are similar to those of public blockchains, such as minimizing counterparty risk. They make the information delivered to smart contracts more reliable by not depending on a single source of truth. The smart contract consults a number of oracles to assess the data’s validity and accuracy; this is why decentralized oracles are also known as consensus oracles.

Other blockchains can use decentralized oracle services provided by some blockchain initiatives. In prediction markets, where the authenticity of a specific outcome may be verified by social consensus, decentralized oracles might be valuable.

Human oracles

Individuals with specialized knowledge in a specific sector can sometimes act as oracles. They may gather information from a variety of sources, check its legitimacy, and convert it into smart contracts. Because human oracles can use cryptography to verify their identity, the chances of a fraudster impersonating them and giving tampered data are slim.

Why are decentralized oracles needed in the DeFi ecosystem?

Oracles are middlemen that ensure trust in the DeFi ecosystem.

To begin with, decentralized oracles are primarily employed within the DeFi ecosystem, as employing centralized oracles goes against the concept of DeFi products/applications. DeFi applications are financial solutions based on the blockchain technology.

Let’s take this Instance,

Imagine that Andy and Cozy placed a bet on the weather. Andy believes that it will be a rainy week, while Cozy believes that it is going to be a sunny week. They agree on the terms of the bet and lock their funds in a smart contract, which will release all the funds to the winner based on the results of the weather.

Since the smart contract cannot interact with external data, it has to depend on an oracle to feed it the necessary information — in this case, the results of the weather. After the day is over, the oracle queries a trusted API (Application Programming Interface) to find out which weather forecast plays out and relays this information to the smart contract. The contract then sends the funds to Andy or Cozy, depending on the outcome.

Without the oracle relaying the data, there would have been no way to settle this bet in a way that couldn’t be gamed by one of the participants.

This is why oracle is needed in DeFi and cryptocurrency because it solves centralization and trust issues.

ChainLink: The oracle of all oracles.

Chainlink is a decentralized network of oracles that allows smart contracts to communicate securely with real-world data and services outside of blockchain networks. With Chainlink, existing technologies that presently power modern economies may connect to the growing blockchain sector to improve corporate and societal operations’ security, efficiency, and transparency.

The Chainlink decentralized oracle can connect many different types of data with many different blockchains, creating many potential applications for Chainlink. Chainlink could help to integrate blockchain technology with many industries and business functions.

Chainlink aims to continue to grow by expanding its support for blockchain environments and facilitating new use cases for hybrid smart contracts. Because significant stores of data and records are not yet maintained within blockchains, Chainlink may have countless opportunities to connect blockchain networks with off-chain information.

Rogue hackers that aim to exploit pricing anomalies by making oracles their target are vulnerable to assaults against blockchain oracles. Oracles are vulnerable to these assaults since they are supposedly outside of the blockchain’s consensus mechanism, and so the blockchain’s security safeguards do not apply to them.

Platforms like Chainlink, are at the forefront of oracle development. Chainlink has teamed with industry titans including Google, Oracle Corporation, Gartner, Binance, and even China’s Blockchain Service Network, to improve the application of oracles in the blockchain.

Chainlink currently holds the top spot among oracles, with its network securing over >$75 billion in smart contract value.

Chainlink secures tens of billions of dollars across the top DeFi, lending, and gaming protocols, as well as many chains throughout the blockchain sector. Chainlink secures up to 90% of the value of some DeFi-focused chains within dApps.

Chainlink’s oracle infrastructure, a chain-agnostic platform with its own Top 20 native asset (LINK), includes a Sybil-resistant network of independent oracle nodes that fetch data from a variety of off-chain sources, before aggregating the data off-chain and delivering it on-chain to be consumed by smart contracts.

Nest Protocol: The two-way quotation mechanism.

The NEST Protocol is an Ethereum mainnet-based distributed pricing oracle network. It employs a one-of-a-kind “quotation mining” technique to ensure that the chain creates off-chain price information in lockstep. The NEST protocol generates pricing data directly on the blockchain, addressing the industry’s absence of price data on the blockchain.

Nest Protocol, a blockchain oracle that provides a uniquely safe means to receive real-world pricing data into the DeFi ecosystem, has released an ERC-20 token called NEST. In the year 2020, the Nest Protocol was released. The Nest Protocol is distinct from other oracles in that it employs an authentication scheme. The quotation is first submitted to a miner for verification, along with a processing fee in ETH and the quoted assets in an appropriate proportion.

For example, if a miner declares that 1 ETH Equals 100 USDT, he or she must enter into a smart contract with the price and commit 1 ETH and 100 USDT. The asset will then be traded or left alone if there is an arbitrage opportunity. The price is included in a price block on the chain in the latter situation. The miner can remove his or her assets from the contract when the verification time has over. The part of the charge that Oracle’s clients pay for their data requests goes to miners and “verifiers.” Because arbitration applications are rejected, Miners are rewarded for quoting prices that are as near to the real market as feasible; otherwise, they would lose both the commission and the submission fee. Payments inside the network are made in NEST, which also functions as a governance token, aside from this handling charge. Payments inside the network are made in NEST, which also functions as a governance token, aside from this handling charge. offer prices that are as near to the true market as possible, or they will lose both the fee and the profit.

If you’re curious and want to understand more about nest protocol — Go here

In Summary

Decentralized finance clearly relies on more than simply blockchain, with smart contracts and oracles serving as two critical components. Individual initiatives must, of course, build apps that people want to interact with.

Although speculation has been the most common DeFi use case so far, the emergence of gamified finance, as well as blockchain-based insurance, prediction markets, governance, supply chain management, and digital identification, all point to a bright future.

Teams who ignore the importance of oracles might be in for an unpleasant shock.

Having a reliable data stream is essential for long-term success. Data services companies that ignore oracles risk losing their Web3 existence.



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
Adegbite Mubaraq

Adegbite Mubaraq


Blockchain Copywriter and Marketer |Technical Analyst |Budding Financial Engineer