1. Table of Contents
- Table of Contents
- Introduction
- Centralised and Decentralised Oracles
- Centralized Oracles: The Trust Dilemma
- Decentralized Oracles: A Trustless Model
- BlockChain Oracles Use Cases
- Comparing Leading Decentralized Oracle Networks (DONs)
- Chainlink
- Hybrid Smart Contracts
- Node Reputation System
- Data Aggregation
- DIA (Decentralized Information Asset)
- Pyth Network
- API3
- Airnodes
- Ensuring Data Integrity in Decentralized Networks
- Data Aggregation and Verification
- Reputation and Staking Models
- Conclusion
2. Introduction
An Oracle, most commonly called a blockchain oracle, are intermediary networks that connect blockchain systems to external off-chain networks, allowing the blockchain smart contracts to interact with data off-chain. Important data like financial market data, sporting events, banking data, games and many other data which exists off-chain can be made to interact with on-chain smart contract. Oracles work by fetching, verifying and delivering these data to blockchain networks.
Oracle networks serve as data providers to smart contract, they are independent bridges that verify real-life data, aggregating them before delivering them to the smart contract on-chain. They enable contact between the outside world and real data, vastly enlarging the scope of operation of smart contracts.
Centralised and decentralised oracles are examples of blockchain oracles, they’ll be evaluated below.
Figure 1: Intersection of real world data and the blockchain
3. Centralised Oracles and Decentralised Oracles
There are two major types of oracles: centralised oracles and decentralised oracles. Just as in the case of decentralised and centralised networks, decentralised oracles deliver data from a network of nodes while centralised nodes deliver data from a single network. Both have their own pros and cons based on security, reliability, and other metrics.
Figure 2: Pictorial depiction of centralised and decentralised oracles
4. Centralized Oracles: The Trust Dilemma
Centralised oracles are single entities that provide data to a smart contract from a single source. They are single organisations that interact and fetch data from a smart contract; they are responsible for any information the smart contract needs. While they have advantages such as operational efficiency and low latency, they pose risks such as having a single source of failure, censorship and manipulation, and doubtful transparency. Also, they traditionally require smaller investment and less architecture and maintenance, although they are prone to being attacked and corrupted.
5. Decentralized Oracles: A Trustless Model
Decentralised oracles also work similar to the decentralisation model in Web3, data is provided by multiple, distributed sources (nodes), enabling a trustless model. Due to this model, the accuracy of the data is verified by the many data sources, enabling the smart contract to perform with higher accuracy and veracity. Due to the decentralised model, the oracle interacts with the several sources of data, validating their data before the onwards dissemination to the smart contract. Decentralised oracles make use of variations of the ShellingCoin mechanism, where sources report data independently without collusion between parties.
Decentralised oracles are well-suited for larger companies because of the architecture and higher maintenance cost.
Decentralised oracles are utilised by several DeFi protocols, including Compound, Uniswap, SushiSwap, Balancer, and PancakeSwap.
6. BlockChain Oracles Use Cases
Oracles serve as an abstraction layer to bridge the gap between smart contracts and real-world data. Oracles are used in applications like getting financial data for DeFi applications, smart contract automation, gaming, NFTs, decentralised insurance, among others. Applications that utilize oracles include decentralised finance (DeFi), smart contract automation, gaming, NFTs, and decentralised insurance, among others. These applications leverage oracles to retrieve financial data.
7. Comparing Leading Decentralized Oracle Networks (DONs)
Decentralised oracles are the backbone of blockchain ecosystems, enabling smart contracts to securely access real-world data. From price feeds in DeFi to sports scores and weather conditions for insurance contracts, decentralised oracles play a crucial role in expanding blockchain’s utility. However, not all oracles operate the same way; different networks employ unique mechanisms to ensure data integrity, security, and decentralisation.
This article explores and compares the leading decentralised oracle networks, including Chainlink, Pyth, DIA, and API3. We’ll examine their architecture, trust models, use cases, and how they address the challenges of data accuracy and reliability in Web3 applications.
8. Chainlink
Chainlink is the world-leading decentralised oracle network that provides, complements, and enhances existing and new blockchains by providing fast, reliable, and confidentiality-preserving universal connectivity and computation for hybrid smart contracts. They provide smart contracts with real-world information in a decentralised, secure manner, enabling the use of smart contracts in wide-reaching applications. Chainlink fetches its data from diverse entities in DONs and relays data to smart contracts in "reports.". The DONs are operated by independent, security-reviewed, and performance-proven node operators. Chainlink focuses on data validation and off-chain value consensus, differing from other oracles. Chainlink also incorporates a broad range of next-generation smart contract applications and use cases with a focus on seven key areas: hybrid smart contracts, scaling, abstracting away complexity, confidentiality, order fairness, trust minimisation, and cryptoeconomic security. Chainlink’s decentralised metalayer of Oracle networks allows smart contracts to seamlessly use and create an array of decentralised services that accelerate dApp development, enable cross-chain functionality, and harmonise disparate technologies. Chainlink's decentralized oracle network metalayer enables smart contracts to seamlessly create and utilize a range of decentralized services. These services accelerate the development of decentralised applications (dApps), facilitate cross-chain functionality, and integrate diverse technologies.
Figure 3: Chainlink architecture
Some of the key features of Chainlink are included.
9. Hybrid Smart Contracts
In a literal sense, smart contracts that interact with data from the real world are known as hybrid smart contracts. They combine blockchain code with off-chain data provided by DONs. Due to this ability, the use cases and functionality of smart contracts can be expanded significantly to include things that were deemed impossible before.
10. Node Reputation System
Chainlink employs a reputation framework to assess and rank oracle nodes based on their historical performance, reliability, and data accuracy. This system incentives nodes to provide trustworthy data, as higher reputation scores can lead to more assignment opportunities and rewards. Chainlink uses a reputation system to evaluate and assign rankings to oracle nodes. These rankings are based on the nodes' past performance, reliability, and data accuracy. Nodes are incentivised to provide reliable data, as a good reputation can result in more work and rewards.
11. Data Aggregation
Accuracy of data is of paramount importance to Chainlink, so it aggregates data from multiple independent sources (nodes) for veracity and to mitigate against false information. The data is then combined into a single, reliable source and sent to the smart contract to use.
12. DIA (Decentralized Information Asset)
Decentralised information asset (DIA) is an open source DON that allows market forces to share trustable data. DIA was created to allow market actors, data users, and analysts to share digital and financial data. DIA creates an open source abstraction allowing off-chain data from various sources to be shared and interact with smart contracts for use in various financial DApps.
DIA's focus is basically on financial data, mostly used in the DeFi space, with a focus on autonomy, transparency, and decentralisation.
13. Pyth Network
The Pyth network is an oracle for obtaining on-chain financial market data. It sources its data from “over 90 first-party data providers," which includes market agents and big exchanges. Pyth offers real-time price feeds for several cryptocurrencies, equities, exchange pairs, ETFs, and commodities for smart contract developers on more than 40 blockchains, making it a major driver of DeFi applications.
Figure 5: Pyth Data Architecture
The Pyth project began due to the need for a price oracle for ultra-low latency and institutional-quality market data. The problems were highlighted as: traditional oracles are slow, making them unsuitable for high-frequency financial applications; lack of essential price feeds on newer blockchains; opaque data sources posing risk to DeFi; and smart contract security.
The Pyth network operates as a decentralised marketplace for data; the data contributed by the individual sources, called “first parties,” is created and owned by the sources. Pyth incentivises these financial data owners to contribute directly into the blockchain.
Pyth enables publishing of financial data on-chain for dApps usage. They operate as follows:
- Data providers submit price information to Pyth's Oracle program, with multiple publishers per asset to enhance accuracy and reliability.
- The Pyth protocol aggregates this data, generating a single price estimate with a confidence interval.
- Data users access the price information from the oracle.
Pyth is another important oracle to look at, especially if you’re into building DeFi apps for new blockchains.
14. API3
API3 is a decentralised API platform that connects Web2 APIs to decentralised applications.
API3 enables smart contracts on decentralised applications to connect with real-world data using APIs. While we’re talking about oracles in this article, API3 is an oracleless approach because of the way they facilitate on-chain and off-chain interaction. API3 connects real-world data to the blockchain directly through APIs. They allow companies to deploy their web2 APIs directly on the blockchain by using what they call "Airnodes.”
Figure 6: API3 project overview
15. Airnodes
Airnodes are cloud-based services that enable data providers to seamlessly integrate existing Web2 APIs with the blockchain, creating what’s called decentralised APIs (dAPIs). To understand the benefits of this approach, we need to first understand how data is transmitted.
Data can be grouped into first-party data and third-party data. This distinction is important for understanding the benefits of API3.
First-party data transmits data directly from the data providers, while third-party data is obtained from intermediaries that aggregate first-party data before forwarding it to the end user. API3 is based on the premise of eliminating oracles, since oracles usually transmit third-party data after aggregating several first-party data. Eliminating oracles according to API3 will allow data providers to run their own nodes, improving the quality of data. Even though this sounds contradictory, API3 has its own benefits, which include:
Transparency: Users can verify the source of their data with dAPIs, unlike Oracles, which users can’t verify and lack clarity concerning data sources.
Security: Decentralised networks are attack-prone, especially Sybil accounts where bad actors manipulate data. API3 addresses this with a collateral pool for coverage (similar to Chainlink's staking, though not yet launched) and potential legal action against public data providers, which is an option unavailable with third-party oracles.
Ease of use: API3's Airnodes are serverless and easy to deploy, requiring minimal technical expertise. Data providers don’t need blockchain knowledge or crypto handling, making it easier for traditional financial institutions to integrate their data into the blockchain.
16. Ensuring Data Integrity in Decentralized Networks
Decentralised oracle networks (DONs) play crucial roles in maintaining the integrity of off-chain data used in blockchain applications, particularly DeFi and other financial applications. Ensuring data integrity in decentralised networks is of utmost importance to prevent frauds, attacks, and other malicious activities. Mechanisms like data aggregation and verification techniques, reputation and staking models, cryptographic proofs, and governance models to improve security. Enhance security by employing mechanisms such as data aggregation, verification techniques, reputation and stake models, cryptographic proofs, and governance models.
17. Data Aggregation and Verification
Oracles aggregate data from multiple sources to reduce the probability of single points of failure, data manipulation, and inaccuracies. Aggregation ensures that outliers and erroneous values do not compromise the final data transmitted to the smart contracts. Key methods for data aggregation include using:
Median and Weighted Median Aggregation: Data is collected from multiple sources, and the median value is used to mitigate the influence of extreme values. Some oracles also apply a weighted system where sources with higher credibility get precedence.
Consensus Mechanisms: Some Oracle networks, like Chainlink and DIA, employ decentralised consensus models where a majority of nodes must agree on a data point before it is published on-chain.
Cross-Referencing with Trusted Sources: Oracles compare incoming data with publicly available, reputable sources to detect discrepancies and prevent manipulation.
Effective data aggregation and verification mechanisms are essential to preventing data manipulation and ensuring the trustworthiness of smart contract interactions.
18. Reputation and Staking Models
Decentralised oracle networks often incorporate reputation and staking systems to incentivise honest behaviour and penalise malicious actors. These models ensure that oracle nodes remain accountable and provide accurate data.
Reputation Systems: Oracles are assigned reputation scores based on their historical performance, accuracy, and reliability. Nodes with higher reputation scores are more likely to be selected for data queries. Chainlink, for instance, maintains a reputation framework where node performance is tracked transparently.
Staking Mechanisms: Many oracle networks require node operators to stake tokens as collateral, which can be partially or fully forfeited if they provide inaccurate or malicious data. Chainlink introduced a staking mechanism where staked LINK tokens serve as a security guarantee against faulty or manipulated data submissions, API3 uses a staking pool to ensure data accuracy and provide insurance against malicious activity while Pyth and DIA also integrate staking incentives to encourage honest data reporting and secure network participation.
Reputation and staking models can enhance the reliability of decentralised oracles by aligning financial incentives with truthful reporting.
19. Conclusion
Decentralised oracles are very important for intersecting real-world data and hybrid smart contracts. DeFi applications rely on oracles to provide accurate and tamper-proof data for lending protocols, derivative markets, synthetic assets, and automated market makers (AMMs). Oracles ensure that the smart contracts operate correctly based on real-world data like asset prices, interest rates, and volatility.
While centralised oracles offer efficiency, they introduce significant risks like trust and single points of failure. Decentralised ones like Pyth, Chainlink, and DIA address these issues by leveraging data aggregation and other approaches.
Top comments (0)