Spotlighting the most important developments in web3

Spotlight: Oracles, essential building blocks of the decentralized world

The crucial element of building scalable blockchain applications and DeFi infrastructure

Henri.M
district0x Updates
Published in
6 min readJan 4, 2023

--

(Any views expressed below are the personal views of the author and should not form the basis for making investment decisions, nor be construed as a recommendation or advice to engage in investment transactions.)

No, Blockchain Oracles are not ancient Greek crypto applications, nor do they make predictions — rather, they confirm what has already been proven to be true.

Web3 Oracles are essential to many decentralized applications (dApps) and their smart contract architecture. They provide a link between the blockchain and the outside world, enabling smart contracts to access off-chain data and execute based on arbitrary external events. Without oracles, many of the innovative and groundbreaking use cases for blockchain technology would not be possible.

Pythia, The Oracle of Delphi

In this article we will shed some light on what Oracles are from a high-level perspective — this is not an in-depth technical analysis — while still looking at the landscape and latest developments in the space. Let’s dive in!

Oracles report verifiable data

So, what are blockchain oracles, and how do they work? In simple terms, a blockchain oracle is software that retrieves data from external sources and submits it to the blockchain — and by doing so, confirms it as true on chain, valid and actionable. This data can then be used to trigger the execution of logic or to update the state of the blockchain to a new state.

There are many different types of oracles, and the best one to use will depend on the specific needs of the dApp or smart contract developer. Some popular oracle solutions include Chainlink, Maker, UMA, Oraclize, and Band Protocol, among others. These oracles use different methods to retrieve data, such as APIs, web scraping, and on-chain data feeds. Developers will typically pick the one which serves their needs best.

Oracles are important. Since January 2019, DefiLama tracks close to 20B USD in Total Value Secured (TVS) through various oracles (32 at the time of writing), with Chainlink alone securing around 9B USD (excluding CeFi), with a Transaction Value Enabled (TVE) of over 6T USD.

Top 10 Oracles on Defillama

One of the key advantages of blockchain oracles is that they enable ‘trustless’ communication between smart contracts and the outside world. This is crucial because it allows smart contracts to operate without relying on any single party to provide data or execute instructions, and enables true decentralization to flourish. Instead, the oracle acts as an impartial intermediary, enabling the smart contract to execute based on objective and verifiable data, confirmed by a decentralized network of nodes.

Applied Data

Oracles are crucial for enabling many new use cases for blockchain applications. Some examples of how oracles are being used include:

  • Supply chain management: Oracles can be used to track the movement of goods through the supply chain, enabling smart contracts to automatically release payment or trigger other actions based on the status of the goods.
  • Predictive markets: Oracles can be used to provide real-time data feeds for predictive markets, allowing users to bet on the outcome of events and enabling smart contracts to settle bets automatically.
  • Insurance: Oracles can be used to trigger the payout of insurance policies based on external events, such as natural disasters or accidents.
  • Identity and reputation: Oracles can be used to verify the identity and reputation of individuals or organizations, enabling smart contracts to enforce rules and conditions based on this information.

Above all, oracles are essential in DeFi. Without Oracles, many apps we use today would not be possible, such as:

  • Money Markets
  • Decentralized Exchanges
  • Stablecoins
  • Options and Futures
  • Mirrored and Synthetic Assets
  • Yield Farming

As the graph below illustrates, Oracles read Market Data and supply ‘Reference Feeds’ to the users, liquidators and other market participants:

Oracle flow in DeFi

Blockchain oracles are an essential component of many decentralized applications (dApps), yet while oracles are a powerful and useful tool, they also introduce certain security risks that must be carefully managed.

Hacked truths?

One of the main security risks associated with oracles is the potential for data tampering or manipulation. Oracles rely on external data sources to provide information to the blockchain, and if these data sources are compromised or maliciously altered, it can have serious consequences. For example, if an oracle is providing data for a predictive market and the data is tampered with, it could lead to incorrect predictions and incorrect payouts.

Another security risk is the possibility of oracle failure. Oracles can fail for a variety of reasons, such as hardware failures, network outages, or software bugs. If an oracle fails, it could prevent smart contracts from executing correctly, leading to delays or errors.

To mitigate these risks, it is important for oracle providers and users to implement robust security measures. This can include using multiple data sources to reduce the impact of a single point of failure, implementing security protocols to protect against data tampering, and implementing robust testing and quality assurance processes. Chainlink for instance, uses ‘1,000+ heterogenous oracle networks that deliver data or perform off-chain computations’ instead of one single source of truth:

Another security risk is the possibility of oracle censorship. In some cases, oracles may be subject to censorship by external parties, such as governments or large corporations. This could prevent the oracle from accessing certain data sources or transmitting data to the blockchain, leading to incomplete or inaccurate information. To address this risk, it is important to use decentralized oracle networks that are resistant to censorship, thereby reducing the impact of any single point of failure or censorship.

Finally, there is the risk of oracle hacking. Oracles are vulnerable to hacking attempts, just like any other software. If an oracle is successfully hacked, it could lead to data tampering or unauthorized access to sensitive information. To mitigate this risk, it is important to use secure oracle providers and to implement strong security measures, such as encryption and secure data storage.

In conclusion, blockchain oracles are a powerful tool for enabling smart contracts and dApps to access external data in a trustless and verifiable manner, and a crucial component of the decentralized finance ecosystem. As the use of blockchain technology continues to expand and evolve, oracles will play an increasingly important role in enabling new and innovative use cases. However, they also introduce certain security risks that must be carefully managed. By implementing robust security measures and using decentralized oracle networks, it is possible to minimize these risks and ensure the integrity and reliability of oracle-based systems.

Joining the district0x DAO

For more information about the district0x network:

--

--