What The Heck is Oracle in Defi & Why it Matters - A Complete Guide - CoinGyan

If you are new to DeFi, this article will help you understand the wonders that this growing niche is trying to achieve while working as a sub-component of the blockchain ecosystem.

“DeFi is short for “decentralized finance,” an umbrella term for a variety of financial applications in cryptocurrency or blockchain geared toward disrupting financial intermediaries.” – Alyssa Hertig.

The primary objective of DeFi is to eliminate the middleman like a third party or a government body while the transactions are being executed. This applies to not only the transaction having the nature of direct purchase but also covers loans, crowdfunding, insurance, derivatives, and many other transactions that have a middleman.

What are Blockchain Oracles

Let’s try to break down the decentralized oracles in the simplest manner for you all. If you understand the basics of blockchain, then you must be aware that this technology does not have the data which is off-chain (out of the blocks). So, if a smart contract is created on the blockchain, then it might never execute itself if it relies upon the data that does not live on the blockchain. The example illustrated below will help you out-

Let’s assume that you have developed a betting application on the top of the Ethereum blockchain, which is a smart escrow contract. David and Ellie deposit ETH into this smart escrow contract and make a specific bet on the ADA/USD price over a period of three months. David predicts that the price at the end of the quarter would be more than $2,000, but Ellie says that it would be less than $2,000. Both of them lock ADA into the smart contract, and after three months, it automatically distributes the locked accumulated funds to the winner.

So as you can see, there was no need for any third-party escrow bank to ensure the fair distribution of funds to the winner. However, the most important question that we need to discuss here is how the smart contract calculated the price of ADA against USD before it got executed? Especially after the fact that the data determining the price of ADA does not exist on Ethereum. This is where oracles jump in and help the smart contract.

Various cryptocurrency exchanges in the market, such as Coinbase, Binance, Kraken, etc., can be used as a source to collect the information of cryptocurrencies. All these exchanges have APIs that can be integrated to fetch the information on prices. So an Oracle in our example migrated the real-time data of ADA price from a cryptocurrency exchange into the betting application to help the smart contract execute itself. It is not a data source but simply an intermediary that connects the blockchain application to real-world information (which is not available on the blockchain). To put it in the most simple words, Oracles build a bridge between off-chain and on-chain data.

Blockchain Oracle - CoinGyan

Many companies today working in the decentralized finance ecosystem rely upon the Oracles to collect real-time data. You might not know, but seven of the top ten DeFi applications take the help of the oracles to access vital external information.

Let’s have a look at another infographic shared below that explains how Chainlink can connect smart contracts on a blockchain to any input (API) and output (Payout) they need to complete the smart contract life cycle:

Chainlink Oracle - CoinGyan

Blockchain oracles have a deep impact on the DeFi, and the same can be verified from the total value locked (TVL). The total value locked (TVL) in DeFi is an indicator of the total balance of ETH, BTC, and ERC-20 token held in all the smart contracts of DeFi apps. The impressive rise in the TVL from $675 million at the beginning of the year 2020 to more than $58 billion in June 2021 indicates why DeFi space needs blockchain oracles more than ever to fulfill the expectations of the end-users using the DeFi product.

Types of Oracles

The oracles can be classified based on multiple factors like the source of the data, the direction of the data, and the degree of trust. Based on the degree of trust, the Oracles can be classified into two categories, i.e., Centralized Oracles and Decentralized Oracles. Let’s find out more about them.

Centralized Oracles

A centralized oracle operates as a single entity that renders information to a smart contract working with a bunch of security features. These oracles are controlled by a single authority which is the sole provider of the data to the smart contracts. As a result of this nature, these centralized oracles suffer from the problem of a single point of failure among many others as listed down below:

  • Simple architecture with the limited investment
  • Low maintenance and infrastructure standards
  • Prone to a few security vulnerabilities

Centralized oracles can be categorized under the “secure but slow” category. These oracles are secure as they use manual voting and “dispute rounds” to crush down the attacks that try to modify their data. Still, at the same time, they have high latency when it comes to accumulating accurate data, which might sometimes take days and even weeks.

Decentralized Oracles

Decentralized oracles are not dependent on a single source of truth for the collection of data. Instead, they accumulate data from multiple external sources to achieve trustlessness. The decentralized oracles use the ShellingCoin mechanism, where all the independent sources provide the data without interacting.

However, decentralized oracles are prone to several problems such as:

  • Collusion between parties
  • Signaling
  • Bribing
  • Prone to game theory attacks
  • Prone to data corruption

Decentralized oracles can be categorized under the “fast but insecure” category. These oracles are fast when transferring data but are vulnerable to game theory attacks and data corruption.

Does a DeFi Need Decentralized Oracles?

If a DeFi application is using oracles that retrieve the information using a centralized source of information, then it would fail to serve the entire purpose of building a decentralized product in the first place. Let’s go back to our example of a blockchain-based betting application, where the price of the ADA is migrated into the smart contract via an Oracle. Now let’s assume that Oracle is using the API of Binance (a centralized exchange) to retrieve ADA prices. So, in this case, it is not wrong to say that the outcome of the DeFi betting application is based on the data supplied to the oracles by a centralized exchange. Isn’t it weird that a centralized body can influence the decision of a decentralized finance application?

Hence, most of you would agree that the DeFi products should use decentralized oracles instead of using centralized oracles to supply data that does not lie in the hands of a centralized body or organization. However, if we make a deeper analysis, the picture turns out to be something else.

As we uncovered the concept of centralized and decentralized oracles above, we learned that both have their pros and cons. A centralized oracle is secure but slow, whereas a decentralized oracle is fast but insecure at the same time. Hence, selecting the less evil of the two is a challenge that needs to be cracked.

Popular DeFi protocols running Oracles

Some of the most popular DeFi protocols, such as MakerDAO, Compound, and Aave, are using Oracles to collect external information while operating on the Ethereum blockchain.

MakerDao is one of the most popular DeFi lending protocols. Its native token, i.e., Dai, is pegged against the United States dollar and backed by cryptocurrency assets. MakerDao uses the oracles module to calculate the real-time prices of the assets. This module is made of whitelisted addresses of oracles along with aggregator contracts. The oracles periodically relay the latest price data to an aggregator that calculates a median price, which helps set up a reference price on the platform.

You might not know, but Compound, a money market protocol, also uses Orales to collect price data which is then forwarded to its price feed. The oracles are controlled by the administrators who are holders of COMP, a native token of the Compound.

Future scope of blockchain oracle

Blockchain Oracle is an essential catalyst for pushing the decentralized finance concept, especially smart contracts, beyond limits. There is no doubt in the fact that the future scope of oracles holds diverse opportunities, and a few instances can be provided to justify the claim.

Emerging Economies

You can take a moment and revisit the history to verify that whenever the society improves the working mechanism of a contract via certain amendments in its legal infrastructure, the society has allowed all categories of economic trades to be observed through it to experience improved business standards.

Now coming back to the modern financial era, there is a huge financial risk that is born from information asymmetry. Information asymmetry is a scenario where one party has more data than the opposite party in a contract. If a single party in a deal has the edge over access to business data, it creates an imbalance and can also lead to exploitation, for which the rest of the society would have to pay. This needs to be eliminated, and this is where the blockchain oracle would come into play to stem smart contracts that restore the information balance.

Smart contracts are reliable when it comes to exchanging data. It is an efficient and honest system that enables the market to work in a secure ecosystem where the information is trustworthy and locks out any arrangement that can exploit it for personal benefits or dent to society.

A lot is there in the future for oracle based smart contracts also because of the way emerging markets work. The emerging markets take giant leaps when it comes to innovations, as was seen in the case of the telecom and internet industry. For example, when cell phones made their way into the emerging markets that never had seen the landline before, it gave an ultimate boost to it and transformed the business conduct in the economy for the better. Similarly, it is anticipated that the smart contracts will cause a similar business transformation by taking a giant leap against broken legal infrastructure in emerging economies.

Use Cases

There are many future-oriented projects that are based on smart contracts and Oracles, and one such project is AIRS: Automated Incentives for Reforestation Stewardship. This project aims to reward the users participating in the consistent supervision of the environment by fetching the satellite data. The data fetched from the satellite can be used for monitoring the condition of the environment using a trusted execution ecosystem. AIRS then incentivize the users who undertake the responsibility of supervising the land.

In this project, the smart contract uses an Oracle that retrieves the satellite data and supervises the forest conservation. The project specifically measures a forest’s carbon capture capacity, its ability to isolate carbon, how perfectly it can sync carbon, etc. If a forest is conserved and expanded, then the project would release the payouts to users responsible for land supervision and reforestation.

The objective is to pool money into the smart contract so that it is distributed to the users who have successfully fulfilled their roles of maintaining and expanding the natural resource. This use case is just an example of what lies ahead in the future for Oracle. There are many other diverse use cases that would need Oracles integration in the future for faster and safe execution.

Final Words

Oracles DeFi are paving the path for the future to redefine business operations by eliminating the middleman like a third party or a government. Also, there are two types of Oracles, i.e., centralized and decentralized. Although it makes more sense to go forward with decentralized oracles, game theory attacks and data corruption are difficult to scrub. However, the characteristics of Oracles to help smart contracts label this concept with “immense opportunities” to shine in both present and future.

Post Contents

About Author

I am a tech enthusiast & Digital nomad from Dhenkanal, India I've been dealing with Bitcoin since 2014.I started CoinGyan to help users around the globe to learn about popular Cryptocurrencies. Here at CoinGyan, I write about Bitcoin Wallet, Cryptocurrency wallets, & making money from Crypto.

Related Article

Leave a Reply

Free Subscription

Join our free newsletter & stay update about all the cryptocurrencies.