The Oracle Connection in DeFi

welcome to the tenth issue of "alpha unhashed", aarnâ's fortnightly newsletter on a decentralized & intelligent financial future.

In this edition, we discover how oracles serve as the invisible bridge connecting smart contracts to the real world. In our DeFi roundup, we cover:

📊 CoinMarketCap's Q3 Insights 

🔗 Oracle connects with DeFi’s Marketplace

Smart contracts \. are the infrastructure backbone of DeFi. Their ability to autonomously execute agreements opened up a whole new world built on top of crypto. As these lines of code supplanted traditional intermediaries, the ecosystem witnessed an infusion of efficiency, cost reductions, and heightened transparency. Entire exchanges, investment product structures, and complex financialization and incentivized participation have been made possible by smart contracts. But here's the rub – they cant’s venture out into the wild web to interact with data and systems beyond the blockchain world. 

Enter oracles - the digital bridge, linking smart contracts to real-world data. They opened doors to endless applications, enabling blockchain to interact with data beyond its native environment. Let’s understand how oracles have become the invisible backbone of DeFi.

> What are oracles?

Oracles connect blockchains to external systems, so smart contracts can execute outcomes based on data from the real world. Oracles, the rad gateway for  decentralized Web3 to access current data streams, legacy systems, and advanced computations. 

Oracles have a broad information-gathering scope, from event outcomes to geo-data and random numbers. Among these data mavens, price oracles stand out by monitoring price fluctuations. They are a crucial connection between blockchain and data sources, unlocking virtually endless financial use cases. This function is indispensable to DeFi where precise, real-time pricing data of crypto assets is the backbone of secure and transparent transactions.

There are two main discernable categories for price oracles:

> On-chain oracles, also known as software oracles, fetch their data directly from on-chain sources, enabling real-time updates. Uniswap, for instance, offers time-weighted average price oracles integrated into numerous DeFi projects, ensuring a constant stream of timely and accurate data.

> In contrast, off-chain or hardware oracles gather and process information external to the blockchain, subsequently making inputs onto the blockchain. For example, Compound relies on the Open Price Feed for off-chain price data. Chainlink is a leading price oracle powering the crypto ecosystem. 

To clarify with an example, imagine you're participating in a DeFi lending platform where you want to borrow cryptocurrency, using another cryptocurrency as collateral, and the value of your collateral frequently fluctuates. To ensure that the loan is safe for both parties, the smart contract governing this transaction needs to know the real-time value of your collateral.

This is where a price oracle comes in. It continuously gathers data from various sources like cryptocurrency exchanges, calculates the average price, and sends this information to the smart contract which uses this data to ensure that the value of your collateral always exceeds the value of the loan. If the collateral's value drops below a certain point, the smart contract can automatically trigger actions, like liquidating some of the collateral to repay the loan, to maintain a safe loan-to-value ratio.

Think of it this way: without oracles, blockchains are akin to solitary computers, valuable but largely powerless without connectivity and interoperability.

The blockchain oracle problem highlights a fundamental constraint of smart contracts: they lack the inherent capability to interact with data and systems that operate beyond the boundaries of their host blockchain. 

However, blockchains derive their key attributes, such as robust consensus on user transaction validity, protection against double-spending attacks, and resilience against network disruptions, by deliberately isolating themselves from external systems. So, if the oracle is enabling interoperability, both its security and data authenticity are critical for ensuring that your agreement plays out precisely as planned. 

The accuracy of the oracle mechanism is absolutely vital because it's the data they serve up to blockchains that ultimately steers the course of smart contracts. The question is, how can this accuracy and security be achieved?

According to BIS authors, centralised oracles based on trust are the only alternative as its decentralised counterpart could be a major impediment to DeFi’s real-world adoption. Their bulletin highlights two primary concerns with decentralised oracles: DeFi anonymity that tempts malicious actions and lack of oracle regulation threatening costly errors. 

Yet, entrusting a centralised entity with the task of supplying data to a smart contract creates a critical vulnerability - the trustlessness is lost, which stands in stark contrast to the fundamental tenets of decentralisation. Additionally, if a single oracle experiences downtime, it can disrupt the smart contract's access to essential data, causing it to execute improperly based on outdated information. 

To effectively address the oracle problem, we need to move towards decentralised oracles as a solution. These decentralised oracles act as your trusty watchdogs, keeping an eye out for data tampering, errors, and those pesky system hiccups. 

Decentralised Oracle Network (DON) is a game-changer in this context. The DON approach involves a network of independent oracle node operators, each maintaining their unique data sources. This multiplicity of sources and operators ensures a high degree of decentralisation throughout the entire process. In essence, DON minimises the risk of a single point of failure, enhancing the integrity and reliability of data used within smart contracts. This setup is geared towards providing a more secure and robust foundation for dApps. Hybrid smart contracts  could blend on-chain code with off-chain infrastructure, enabling a new generation of dApps that could interact with real-world events and coexist seamlessly with traditional systems.

In addition to DON, the integration of AI with smart contracts presents a powerful solution. AI can empower oracles to validate data from various sources, spot anomalies, and stay agile in dynamic markets. This multi-source cross-referencing ensures data reliability and trust. Additionally, AI's pattern recognition capabilities bolster data integrity, while its ability to adapt to evolving market conditions keeps information current. 

Consequently, users can engage in DeFi transactions with enhanced confidence, equipped with trustworthy data for well-informed decision-making. While AI-driven oracles offer substantial DeFi advantages, they also raise privacy and data sensitivity issues. To address these concerns, oracles can employ privacy-preserving methods like federated learning and differential privacy, ensuring data analysis without compromising user privacy, as data remains decentralized and inaccessible.

> So, Oracles serve as the seamless bridge connecting the blockchain to the tangible world. Through decentralization, they reinforce DeFi's infrastructure, eliminating vulnerabilities, and strengthening data integrity. They go beyond merely solving the blockchain-oracle puzzle, unveiling a future with security, resilience, and trust. aarnâ’s tokenization platform uses a price feed from a Uniswap, the top most and most secure decentralized exchange, ensuring that underlying assets of â_fi vaults are always valued properly and NAV reflections of â_fi vault tokens are accurate.

With a Q3 dip of 8.56%, the YTD crypto market cap stands at $1.07T, still growing YTD 

top DeFi tweets

@LiquityProtocol dives into Push-based, Low-latency, and TWAP oracles – unpacking industry approaches and their pivotal role in selecting the perfect oracle for Liquity v2

@waterfall_mkt Liquidity protocol

Did @pmarca just pull a 'crypto-Houdini' amidst all that techno-capital talk? @pmarca pmarca tweet

aarnâ's mission is to decentralize the alpha value chain, empowering everyone to benefit from DeFi’s transformative potential, and helping manage one’s crypto & digital assets wealth. >> Join our beta

hope you liked Alpha unhashed. If you’d prefer to see it in your inbox at a particular time, click here & select a time slot.

Other Links