Oracles have emerged as a fundamental part of the Decentralized Finance (DeFi) ecosystem -- they are the 3rd party services that provide blockchain smart contracts with off-chain data (real-world information). In just a few months, the total market capitalization of oracle coins has grown to tens of billions, thanks to their role in the DeFi market.
Blockchain oracles act as the technological mediator between smart contracts and the real-world data. They are designed to relay information from off-chain sources (data outside the blockchain) to an on-chain network. In most cases, the off-chain data is used to trigger smart contracts that need external data in order to execute.
Naturally, smart contracts can only operate with the internal information that is stored or recorded on a blockchain. Oracles solve this challenge by connecting them to the real-world information. With oracles in the picture, DeFi protocols can access off-chain data and relay on-chain data to the outside world as well.
Some of the better known projects in this space are Chainlink, Band Protocol and Nest protocol, while upcoming ones include Umbrella Network and API3. All these oracle projects have an almost similar goal, but the fundamental designis different. Let's take a deeper look at what blockchain oracles bring to the DeFi table.
Oracles are specifically designed for the DeFi ecosystem, where most operations are on-chain and rely on real world data for smart contract execution. As for Centralized Finance (CeFi), most of its fundamental infrastructure is built on the existing technical querying process. This model allows databases and applications to exchange price feeds in a seamless way.
Interestingly, DeFi oracle solutions also collect data through API price feeds from major crypto exchanges, that allow other parties to query their data. Going by this structure, CeFi actually plays an important role in the sustainability of DeFi products - the value that it brings to DeFi is likely to be undervalued by stakeholders who are not well vast with the concept of blockchain oracles.
Last year saw the rise of DeFi to become one of the trendiest crypto topics and markets as well -- there's currently over $38 billion locked in DeFi protocols. However, this burgeoning crypto niche still has its shortcomings, especially when it comes to interaction with real world data/market environments. A problem that could be traced to the deterministic nature of blockchain ecosystems.
While some real-world databases are also deterministic, blockchain smart contracts can barely interact with off-chain data. This is because on-chain activity is limited within the blockchain network, where transactions depend on the previous recorded blocks. It is this fundamental architecture that defines the deterministic nature of blockchain environments.
Well, oracles have come up as a holy grail to this shortcoming - they can either be inbound or outbound. The former relays off-chain data to the blockchain for smart contract execution while the latter does the opposite. Take for instance a DeFi weather derivative -, inbound oracles would need to relay weather data to this smart contract for any underlying action to be triggered. On the other hand, outbound oracles inform off-chain networks about on-chain activity.
As highlighted earlier, oracles come in different designs and take a varied approach in solving the interaction between off-chain and on-chain ecosystems. There are currently five prominent oracle designs; Centralized, Decentralized, Distributed, Delegated Proof-of-Stake (DPoS) and Prediction Market oracles. The next section features a detailed overview of each oracle design.
Just like the name suggests, centralized oracles feed smart contracts with data based on a central point of information. Such oracles are provided by whitelisted entities which could be a 3rd party or the DeFi protocol itself. These entities can include spot and derivatives exchanges like Drixx. This design enjoys a competitive advantage when it comes to responsiveness -- they are generally faster due to the centralized nature.
However, centralized oracles are still not efficient and depend on high levels of trust for them to be reliable. This is because a whitelisted off-chain data provider could compromise the data that they feed to on-chain smart contracts. As a result, the smart contract would fail to operate in a decentralized manner, beating the whole purpose of DeFi fundamentals.
Centralized oracles also have a low degree of liveness, which means that the external data provider could switch off their resources at any time. If such a scenario happened, smart contracts linked to this whitelisted entity would lose connection with real world data and no events could be triggered.
In contrast to their counterparts, decentralized oracles depend on an open source network to provide off-chain data for smart contract execution. The open source network is made up of data providers who unanimously agree on the off-chain data credibility. These decisions are made through game theory fundamentals and blockchain economic incentives, which attract more data providers to increase the decentralization aspect.
Given their dependency on several external data sources, decentralized oracles are much more credible compared to centralized oracles. In fact, they have a higher degree of liveness when it comes to long-term reliability. It is also hard to manipulate decentralized oracles since the open source data providers operate independently and credibility decisions should be unanimous.
Of course, decentralized oracles are not without fault; this oracle design is quite slow and expensive. Sourcing data from several external providers is a costly affair compared to dependence on a whitelisted central entity. In addition, it takes more time for the data providers to decide on the credibility -- a process that is almost seamless through centralized oracles.
Distributed oracles can be viewed as an advanced version of the centralized design. Instead of a single entity, this design whitelists several data providers to feed the real world information on-chain. Users can then transform this data through averaging methods, before applying it to trigger smart contract executions. While this design is deemed as a better option to centralized oracles, it is highly exposed to manipulation due to its limited level of liveness.
A new approach dubbed 'Relaying Mechanism' is one of the variations that have come up to improve the distributed oracle design. This involves a hierarchy like structure where several parties sign on the prices and push the decision to a higher signatory (single or multiple parties). The problem with this approach is that it can easily be manipulated along the relay chain, which makes it even more susceptible than the original centralized architecture.
In this oracle design, off-chain data is provided by whitelisted staked nodes -- some have touted it as a better option compared to the distributed model. Basically, the whitelisted data providers are given staking incentives to provide accurate data, failure which could result in losing their stake. This is actually the main fundamental on which the DPoS oracle model is pegged.
While the DPoS data providers receive proper economic incentives, this is not a guarantee that all players act in good faith. Smart contract innovators looking for external DPoS data feeds, should pay attention to the fine print on issues such as the whitelisting process and supporting entity. Furthermore, it would be prudent to understand how nodes operate and what risks they are exposed to.
Prediction market oracles take a more betting oriented approach to decide on the credibility of data. Assuming that the ecosystem is at least 51% honest, it means that the participating parties do not want to lose their funds. Consequently, the bets made are decentralized and could be used as credible data points to be fed on-chain.
Some of the main advantages of prediction market oracles include a high degree of liveness and their resilience to manipulation. Nonetheless, they are still largely untenable due to their low speed, liquidity and regulatory uncertainty.
A couple of oracle projects have gone mainstream in the DeFi ecosystem -- they include the likes of Chainlink, Band protocol, API3, Umbrella Network and Nest protocol. Let's discuss some of the innovations by these particular oracle solutions.
Chainlink Defi Oracle
Chainlink is the earliest mover in the oracle market and enjoys over $13 billion in market capitalization as of press time. This oracle solution provider retrieves off-chain data through its data feeds, making it available for integration with any DeFi platform. Some of the high volume projects that use Chainlink oracles include Aave and Synthetic.
The Chainlink design is based on decentralized nodes that are selected by a centralized whitelisting agency. Node operators are incentivized to provide accurate data feeds from various price feeds. Furthermore, the node operators are selected on a reputational basis in order to increase the reliability of the data and decentralization degree.
While the Chainlink design is somewhat decentralized, the team's goal is to achieve full decentralization. Currently, its liveness could be compromised by the centralized white listing agency, should any price feed be tampered with at that level.
Band Protocol Defi Oracle
Band protocol is built on Cosmos, an interconnected network of blockchains that leverages the Cosmos SDK and Tendermint BFT technology to enable blockchain interaction. Developers who build on the Cosmos network inherently acquire the aspect of interconnection across all blockchains. Band protocol is one of the projects that is built on this network, although its application layer focuses on oracle solutions.
This oracle project identifies as a cross-chain oracle whose function to aggregate and connect off-chain data with blockchain smart contracts. Unlike Chainlink whose scope covers the well-known chains; Band protocol can operate across more blockchain ecosystems given that its fundamentals are based on the Cosmos network.
However, the Tendermint technology which is a building part of the Cosmos network does not support protocol consensus or data validation. This limits Band protocol from validating the oracle feeds -- an issue that was raised in one of their previous audits.
API3 Defi Oracle
API3 is another oracle solutions provider, this project bases its infrastructure on a Decentralized Autonomous Organization (DAO) model. The API3 ecosystem provides a platform for API's to run on a first party decentralized network, hence operating dAPIs. This level of decentralization is achieved by API3's Airnode, which they describe as 'a fully serverless oracle node that can be deployed by any API provider for free, and requires minimal day-to-day management.'
Given its DAO governance model, the dAPI's are run transparently and require minimum central oversight to deliver accurate price feeds. In addition, API3 governance token holders can participate in the project oversight by staking their tokens into the platform's insurance contract. This oracle solution touts itself as a multi-layer and cross-chain platform that is compatible with any blockchain environment.
So far, API3 is among the oracle projects that are quite ahead in the decentralization aspect. That said, the model is still nascent and yet to gain significant traction that would inform on its efficiency.
Nest Defi Oracle
Nest protocol is a China based project that touts a completely different approach from the previous oracle solutions. The Nest oracle price feed is designed to facilitate both production and verification on-chain. Ideally, all the off-chain data that is integrated with smart contract ecosystems has already been agreed upon by market validators. This makes Nest protocol one of the seamless oracle solutions when it comes to off-chain and on-chain data synchronization. While Nest protocol presents a strong value proposition, the project is yet to grow past China's market.
Umbrella Network Defi Oracle
Umbrella is among the latest oracle kids in the block - the project made an official debut as recent as 2021. This oracle uses the Delegated Proof-of-Stake (DPoS) design for its scalable community owned solution. Umbrella's decentralized nodes leverage the Merkle Tree data structure -- this tech can bundle thousands of data feeds into one node. That way, umbrella reduces the amount of space required and underlying costs as well.
The oracle is more developer focused, it features data sets that were previously unavailable on-chain. Some of the categories that Umbrella's price oracle feed covers include core pairs, middle & long tail pairs, DeFi Pulse index, Options volatility and Time-weighted average volumes. Given the critical nature of its decentralized infrastructure, Umbrella is governed by its community which includes stakers, validators, developers and the foundation.
As highlighted in this article, oracles provide a solution to the upcoming DeFi niche, although not foolproof. These data price feeds have a serious shortcoming based on the fact that they can easily be manipulated. In fact, such an event completely devalues any underlying smart contract -- this is why DeFi protocols ought to deploy oracles that are highly efficient, trustworthy and accurate.
While the oracle problem cuts across all designs, each type carries its own risk. For example, a centralized oracle could easily be compromised through an attack on the whitelisted agency, which acts as a single point of failure. Their decentralized cousins may not be exposed to such risks, but are also susceptible to network collusions where the data providers can collaborate to provide inaccurate price feeds.
Despite the few challenges, oracles are set to prepare the stage for DeFi's mainstream adoption. It is likely that DeFi protocols will enhance their due diligence process by paying attention to security and decentralization pointers; they include oracle design, liveness and sources of data. Oracle projects are also gravitating towards a more decentralized ecosystem in order to appeal to DeFi projects. This and other innovative changes will likely mark the next phase of oracle solutions in DeFi..