IOSG Research: Oracles Are Opening an Ubiquitous Golden Age
Author: Bryan, IOSG Ventures
The Application of Oracles in DeFi: Price Feeds Are Not Simple
There are mainly two types of oracles widely adopted in DeFi. One type is the general-purpose oracle represented by Chainlink, which provides Volume Weighted Average Price and collaborates with mainstream DeFi protocols like Aave and dydx. The other type is DEX itself, which can serve as a source for Price Feeds, utilizing TWAP (Time Weighted Average Price) to automatically derive prices and open interfaces for other protocols.
In the DeFi space, the primary use of oracles is as Price Feeds. A qualified oracle needs to update the prices of underlying assets in a timely and accurate manner. For example, in Chainlink's price feedback mechanism, a price update is automatically triggered whenever the price of an underlying asset changes by 0.5%. The real-time accuracy of prices is crucial for DeFi, especially as DeFi protocols increasingly employ complex models; untimely prices can lead to chain reactions that cause significant losses or even collapse of the protocol.
Just last week, Inverse Finance suffered a major blow due to an oracle failure, with hackers exploiting the flaw to gain $15.6 million. By leveraging a design flaw in the TWAP oracle, the exploit resembled typical malicious price manipulation seen in flash loans. However, it did not occur within a single block but across multiple blocks. The total value of the tokens (INV) in the hacker's hands soared to $644,000, while the market fair value was only $17,000. This incident serves as an important warning: providing accurate and secure prices is vital for oracles, especially as the variety of collateral types increases, and the trading depth of smaller category tokens on DEXs remains far less than that on CEXs.
Another fundamental condition for becoming a publicly recognized oracle is decentralization, meaning whether it allows for a single point of failure. Many advocates of decentralized oracles claim that centralized oracles render blockchain efforts meaningless. The most widely used protocols in the market, such as Chainlink and Band Protocol, emphasize their decentralized network architecture while acquiring off-chain data. For instance, Chainlink divides nodes into two distinct parts, with one group responsible for uploading off-chain data and the other independently responsible for further verification. Most DeFi protocols in the market have already integrated or are planning to integrate with third-party oracles, primarily due to their extensive market coverage and decentralization, except for Compound, which still uses its centralized oracle.
Oracles May Be Key in GameFi
Cryptomines is a case where oracles are practically used in the crypto gaming space. The most unique feature reflected in this use case is that token payments and minting amounts can be automatically adjusted through oracles to ensure the stability of their dollar value, allowing even newcomers who are not fully familiar with the project to easily predict their return days with simple math. This novel mechanism, referred to as "pancho" in the case of Cryptomines, enables the game to continuously attract new players. However, the aforementioned oracle is specifically built for managing token prices rather than reporting prices as seen in most use cases, so it may not be a universal solution needed by every game.
Another widely adopted oracle feature is known as VRF (verifiable randomness function). Randomness is a crucial component of blockchain, both at the infrastructure and application levels. For example, Axie uses Chainlink VRF to provide security for minting scarce NFTs. During the minting process, it can resist predictable determinism that could be manipulated by attackers. For gamers, VRF can be implemented in situations where rewards must be distributed fairly and randomly, or when opening loot boxes containing random game assets.
Oracles Will Become Bridges Connecting Different Ecosystems in the Future
Although DeFi has recently become somewhat saturated, we believe that as new infrastructure joins the game, oracles will have the opportunity to play a larger role. The off-chain data transmitted to the chain will be much more than just price feed data. For example, to expand the current insurance protocol scope, there are many types of off-chain data that have yet to be utilized, such as a person's bank account history, global market indicators, actual interest rates, and pricing indicators like inflation rates/CPI, etc.
NFT oracles can serve as a bridge connecting DeFi and NFTs. We have seen some projects moving in this direction, but we have yet to see practical milestones. Imagine borrowers being able to use their NFTs as collateral, where mainstream tokens (like Eth) are no longer the only option, significantly increasing capital utilization. The tricky issue with using NFTs as collateral is that either the liquidation process for NFTs may not be as smooth as for tokens, or borrowers have not yet developed the habit, meaning no one can bear the risk of potentially losing their punk. Given that the attributes of Gaming NFTs are relatively close to tokens, we expect that Gaming NFTs may be more suitable for lending compared to PFP NFTs. Additionally, as we see Coinbase opening its own market and even Opensea enabling Moonpay, NFTs priced in fiat will take off on a large scale. Oracles would be more than happy to share in this opportunity.
Another direction where oracles may play a more positive role is in data indexing. Led by The Graph, we are witnessing a surge in unicorn applications in the market, making API calls more frequent. However, a major criticism is that the imbalance between API curation and calls remains a significant obstacle. We have seen many curators staking Subgraphs, but the actual API calls that occur are random and sparse. Analyzing the cases we observe, we can identify several reasons for the lack of sustained calls. 1. Dapps may only occasionally need to call a certain API rather than doing so regularly. 2. Dapps may find that using the underlying API is not as useful as imagined, leading them to stop querying.
Taking Twitter's API as a reference, the suggested average call interval for APIs is 15 minutes. However, for most popular subgraphs, the calling patterns are quite random— for Livepeer, which is the second most curated Dapp, the volume of call requests peaked from June to August last year, while in the past six months, we have had very few requests. Moreover, users sending call requests currently do not need to pay any $GRT tokens (or very few), even though The Graph's original model assumes that users need to pay a certain amount of tokens to reward indexers. Currently, we speculate that The Graph itself is subsidizing indexers.
As intermediaries between The Graph and Dapps, oracles can enable web3 API queries to achieve activity levels comparable to or even higher than what we see in web2. Specifically, oracles can provide two forms of assistance to create a stronger and more stable binding for the entire dynamic process. To help eliminate the current issues with The Graph, oracles can gain access to all subgraphs and then provide the most reliable subgraphs that Dapps need the most. Additionally, just as oracles initially excelled at, they can drive off-chain APIs on-chain, thereby expanding The Graph's ecosystem. Imagine a decentralized social application being able to access Twitter's database in a decentralized manner, while personal data remains protected from misuse.