Sign In
Learning Center

Blockchain Oracles: An Overview

Oracles enable the decentralized Web 3.0 ecosystem to gain accessibility to legacy systems, data sources, and enhanced computations. DONs (Decentralized oracle networks) enable the formation of hybrid smart contracts, which merge on-chain code and off-chain resources to accommodate advanced decentralized applications (dApps) that respond to real-world occurrence and interconnect with traditional systems.

For instance, let’s presume Nina and Toby wish to bet on the result of a sports match. Nina bets $30 on team A and Toby bets $40 on team B, with the total of $70 kept in escrow by a smart contract. How does the smart contract know regarding the release of the funds to Nina or Toby when the game ends? The answer to this question is that it needs an oracle mechanism to retrieve accurate match results off-chain and provide it to the blockchain in a protected and reliable way.

Why Are Oracles Needed?

With a blockchain like Ethereum, each node in the network must rewind each transaction and ensure a very similar result. APIs allow for the introduction of feasibly variable data. In case  you used a price API to transmit ETH depending on the agreed approved $USD value, the query would revert back a separate result from day to day. Not to mention the possibility of the API being hacked or abandoned. If this occurs, the network’s nodes will be unable to accept Ethereum’s present state, eventually breaking consensus.

Oracles resolve this issue by storing data on the blockchain. As a result, any node rewinding the transaction will utilize the similar immutable data that has been publicly posted. To accomplish this, an oracle is typically composed of a smart contract and some off-chain elements that can query APIs and then send transactions to upgrade the smart contract’s data on a regular basis.

What is the Oracle Problem?

Let’s step back and remind ourselves why we’re developing on-chain in the first place. Decentralization is a significant cause we do anything on-chain. Nevertheless, data must originate somewhere.

Unless we import information from an individual API, source, or node we have effectively eliminated the entire point of utilizing blockchain in the very first place. A centralized oracle signifies that one entity has control above your smart contract, and no longer your smart contract is superior to a regular contract. So if the centralized oracle has the desired impact, we’ve all seen attacks in which a centralized oracle is hacked, outdated, attacked, or not maintained, and disaster ensues.

What’s the Solution?

Decentralized Oracle

The use of a centralized entity to transfer information to a smart contract in a blockchain oracle mechanism introduces a point of failure, trouncing the complete purpose of a decentralized blockchain application. Unless the single oracle fails, the smart contract will either not have accessibility to the data needed for implementation or will be enforced incorrectly based on stale data.

Worse, in case the single oracle is manipulated, the data delivered on-chain may be extremely incorrect, resulting in smart contracts executing extremely incorrect outcomes. This is known as the “garbage in, garbage out” problem because bad inputs result in bad outputs. Furthermore, even though the transactions on blockchain are automated and unchanging, a smart contract result  depending on faulty data cannot be overturned, implying that user funds may be lost in perpetuity. As a result, centralized oracles are out of the question for smart contract applications.

To genuinely overcome the oracle issue, decentralized oracles are needed to avoid data manipulation, imprecision, and downtime. To achieve end-to-end decentralization, a or DON (Decentralized Oracle Network), incorporates various independent Oracle node operators and numerous reliable data sources.

In the end, availability of diversified and credible data is required for smart contracts to be an excellent form of agreement. And that’s why we need Oracles like LCX Price Oracle.

LCX Blockchain Oracle
Login @ LCX