DeFi protocols need oracles: without them, they are not able to get all the data necessary to function properly.
The tools used in DeFi are in fact decentralized, and to remain so they need the data that they use to not be provided by centralized sources, which could falsify, tamper with, modify or hide the information. In addition, the smart contracts on which they are based exist only on the blockchain, and can only access the data available on the blockchain itself.
The solution involves oracles, which are used by DeFi protocol smart contracts as sources of data external to the blockchain, e.g. for asset market prices, results of sports events, weather data, or any other information that is not otherwise available on the blockchain.
Oracles are therefore conceived as a bridge between decentralized protocols and data external to the blockchain, which is why they are essential.
Since smart contracts have no way of controlling the truthfulness of data from outside the blockchain via oracles, this also gives rise to potential new risks, especially when the data provided by oracles is crucial to the functioning of the smart contract. The choice of oracles is therefore crucial, because data feeds can be manipulated, or function incorrectly, which can jeopardize the correct execution of smart contracts.
Some of the most commonly used oracles are those of Chainlink.
Chainlink offers data feeds that can be integrated into any platform, thanks to external adapters able to retrieve data from the feeds made available by Chainlink. But the key point is probably the fact that Chainlink guarantees a good degree of decentralization, thanks to a network of oracles managed by different node operators. These are incentivized to provide correct data, selecting them from different sources in order to guarantee the highest possible reliability.
In addition, in order to provide additional security to the system, Chainlink’s nodes themselves are selected based on their reputation in order to maximize the degree of decentralization and reliability of the data.In fact, Chainlink not only provides data feeds to DeFi protocols but also works with companies by providing reliable data mixed in order to overcome the problem of lack of privacy.
Although all operations on the blockchain are publicly visible, Chainlink has created a special service, called Mixicles, which mixes state changes in such a way that it is impossible for an external observer to catch the link with the recipients.
Band Protocol (updated)
Another provider of on-chain data feeds is Band Protocol. Band has deprecated dataset token model (source) as it’s proven to be overly complicated. Now it’s only one token with direct economic incentive to kick away bad actors and drive the value with oracle activities.
Band will support staking directly with Band token from day one. This makes sure that all data providers and their delegators need to put some skin in the game to serve oracle data.
Band is its own blockchain served as the central brain for all other blockchains. There will be trustless bridging layers to other chains like Ethereum, Cosmos, and more.
Bandchain is very fast and has high throughput due to Cosmos/Tendermint powered consensus with 2–3 seconds block time. Data requests can be served within 5–6 seconds and minimal fee because they are running their own network.
Band has the solution already working with Cosmos. They are hosting hackathon with Cosmos currently and have a workshop that shows how other blockchains on Cosmos and make data requests and get responses seamlessly.
Band supports flexible oracle scripts because they allow anyone to write their own oracle program and upload to the blockchain. I’ve seen the demo and you can actually configure anything from data sources, aggregation methods, and other security parameters.
In addition to Chainlink and Band, there is also Tellor, which operates differently. Tellor uses a network of staked miners that compete to solve a PoW-based competition to send the final value of the required data. It operates in the specific context of price feeds, aiming to provide secure and decentralized data for DeFi protocols.
To properly incentivize reliable data production, Tellor extracts the native Tributes token (TLDR), which is used by customers to send data requests to the oracle. Based on the reward assigned to each request, the oracle selects the best-paid query every ten minutes and creates a puzzle for the miners to solve. Each query collects specific data, such as ETH or BTC prices in USD, and then makes it available on-chain.
The objective is to create a truly transparent and censorship-resistant system that guarantees data accuracy while being completely open to anyone. In short, a system as decentralized as possible that avoids centralized whitelisting, recourse to source reputation or other architectures based on trust.
Oracle market is becoming interesting
The oracle market is a very interesting one because users and developers of DeFi protocols are willing to pay for reliable and tamper-proof data. However, the solutions needed to raise the level of accuracy and decentralization of oracles are complex, making it very difficult to compete in this field.
The fact that this is an interesting, and profitable, market is demonstrated by the fact that even a giant like Coinbase, which certainly does not need to generate new revenue, has decided to venture into it with its own proprietary oracle to provide crypto prices to DeFi protocols.
Clearly, in this case, it is not a decentralized oracle, but a centralized oracle supported by a centralized exchange, but still with the goal of providing reliable data avoiding manipulation and bugs.
If even Coinbase has entered this market, it means that decentralized finance has finally become worthy of attention even from the major world players in the crypto sector and that it is slowly integrating itself bluntly into the global financial markets.