DEOR: Solving The Oracle Problem
Today we will take a look at DEOR and how it offers a decentralized solution to the oracle problem.
What is DEOR?
DEOR is a decentralized oracle system that aggregates data from multiple oracles to ensure that the information provided to a smart contract is correct in a completely trustless fashion.
DEOR is actually the very first project to solve the oracle problem, allowing smart contracts to safely get correct real world information.
What is the oracle problem?
A blockchain is composed of individual blocks that contain transactional information. Let’s say wallet A transfers an asset to wallet B, so the balance of wallet A needs to go down and the balance of wallet B needs to go up. Over time, these blocks are added together and that forms a chain. Blockchains are isolated networks by design and cannot interact with the real world.
The only way to get real world information onto the chain is by using third-party devices or entities known as oracles.
Some examples of real-world information include market prices, temperature or individual data queries from a data set.
Particularly in the case of a smart contract, oracles are absolutely crucial because a smart contract is a digital agreement between two parties that can execute in a completely trustless fashion based on a certain condition . Most often, this condition is based on real world data, so oracles have to provide that information. Based on real world information, the contract executes or not. This provides a high degree of control over smart contracts because the results of an oracle essentially dictate the outcome.
The question is, how do we know that the information being provided to the oracle is correct? The answer is, you don’t; trust is required. This is the heart of the oracle problem because smart contracts (which are meant to be trustless digital agreements) have to trust that the input from oracles is correct because the outcome of the contract is dictated based on that input.
Centralized oracle solutions have failed in the past. This is really problematic because oracles can go offline. As an example, in March of 2020, due to gas prices skyrocketing, Chainlink transactions became so expensive that the oracle stopped updating and went offline, which wreaked havoc in the DeFi space.
In another incident, MakerDAO lost 4.5 million dollars worth of ETH when their oracle just stopped updating. Many flash loan attacks have also happened in the DeFi space. One of the first ones that gained notoriety was the bZx hack. bZx was using the oracle of kyber for a particular stablecoin. In this case, the hacker was able to manipulate the price of that stable coin on kyber because the pool on kyber was very small. Then bZx used this data as the general price because it relied on one single oracle of kyber network and consequently it was hacked.
Even more than individual reasons, oracles by design seem to be a central point of failure and can be targeted because everything is contingent on the result of an oracle. This is where DEOR comes in to solve all of those problems.
How does DEOR solve the oracle problem?
DEOR is just like any other oracle; it interacts with a smart contract like any other use case, but what it does uniquely is that it pulls information from multiple oracle systems and then this information is aggregated internally. The aggregated result is thenprovided to the smart contract. This means that the influence of any single pool is mitigated or averaged out across multiple pools.
It is important to note that not all oracles are equal. Some have been in the space for a longer period of time and are better maintained. Others may be more adept at a specific task (for example a project that only exists on Uniswap might get more accurate price results if you ask the Uniswap oracle).
In addition to aggregating the results from the oracles, DEOR implements a reputation score and a voting system. As a simplified example, we will demonstrate four different oracles pouring information into DEOR.
We can see that weights have been assigned to these four oracles. 50% of the weight goes to oracle one, 25% of the weight goes to oracle two, 12% of the weight goes to oracle three and 13% of the weight goes to oracle four. If we imagine a scenario where we request the US dollar price of a particular asset, let’s assume that oracle 1 gives a price result of 1.312, oracle 2 gives a result of 1.7, oracle 3 gives a result of 1.313, as does oracle 4. In this example it’s very easy to see that oracle 2 is an outlier, so there’s something wrong with the results being provided from this oracle. The impact of that incorrect response was diluted as a result of the multiple oracles providing data for aggregation.
Additionally, DEOR holders also engage in voting. When they see the discrepancy between the result of oracle 2 and the rest, they vote to increase the reputation of oracles 1, 3 and 4 and thereby increasing the weights, while oracle 2 gets downvoted, so its reputation goes down, as does its weight in the aggregation.
Based on the reliability of the data, the weights will change and in this case, more weight is given to oracles that provide the correct answer. This of course is constantly shifting as a result of the votes, which creates a really resilient extra layer of security for results from an oracle.
The DEOR token
The DEOR token has two main use cases:
- The voting on the reputation and weight of the oracles as shown in the previous example.
- Paying for aggregated oracle services using a single token.
Let’s look into the second main use case. DEOR also provides a unique advantage for developers and project owners to pay for aggregated oracle services. A project typically has to pay for its oracle services in the form of one token, because most projects use a single token. If they try to add an extra layer of security by including multiple oracles for example, they have to pay multiple tokens. With the DEOR customized oracle, you get all the advantages, with a single token, without having to be liquid in multiple projects, which means that DEOR tokens can also be used to pay for these services.
In summary, DEOR solves the oracle problem by aggregating data from multiple oracle systems and by implementing a reputation score and a decentralized voting mechanism. Because the real world data is also fully decentralized, systems that use DEOR have enhanced security over ones that use traditional centralized oracles. The impact of one wrong or faulty oracle is diluted since results are aggregated and there’s a dynamic shifting of weights based on reputation and the good behavior of the oracle.
The DEOR token is a very versatile token and can be used to vote on the reputation of the oracles included in the aggregation and also to pay for services from DEOR (like customized oracle services and contract upgrades).
This article is not meant to cover the full details the full technical details of DEOR. There’s a lot of features that were not explained in this very quick introduction (e.g. the randomization of the oracles in the pool, the contract upgrade services, etc.).
In future articles we’ll go over the technical points in more detail, so don’t forget to follow us. For more details, feel free to check out our whitepaper.
Website: https://www.deor.io/
Twitter: https://twitter.com/deor_io
Telegram: https://t.me/DecentralizedOracle
YouTube: https://www.youtube.com/channel/UCZ1EtarhQuu3vfGSrZeSXBQ
GitHub: https://github.com/computercybersecurity/DecentralizedOracle/
Whitepaper: https://github.com/computercybersecurity/DecentralizedOracle/blob/master/DEOR.pdf