It’s becoming harder to ignore the reality that Decentralized Finance (DeFi) is steadily gaining in popularity and usage within the wider blockchain ecosystem. Just on Twitter alone, there’s a plethora of discussion from both established accounts and new users regarding DeFi and the many emerging protocols within it. The growing sentiment doesn’t seem to be solely deriving from excitement over the continual increases in price and network usage but from a genuine interest in the game theory, token economics, and actively participating in the underlying network protocols.

(The total number of USD locked in DeFi according to defipulse.com)

With enthusiasm not really seen since the bull run of 2017, it’s a good idea to go deeper into the importance of oracles within DeFi and how Chainlink is positioning itself both technically and strategically to be a foundational component within many DeFi tech stacks.

What is DeFi?

DeFi is a new sector of blockchain development that uses smart contracts to recreate common financial applications/instruments such as lending, derivatives, exchanges, reserve assets, and more. Instead of the financial system being dominated by private, centralized institutions, DeFi enables trustless end-to-end finance using self-running protocols that function based on the interplay between user interactions and decentralized backend infrastructure. This offers the following advantages not afforded by centralized finance:

Accessibility — Anybody around the world can interact with, build on, and monitor the activity of a DeFi protocol. Conversely, traditional finance often restricts access to users based on geography, political controls, sophisticated investor laws, etc. User-Run and Owned — Users in DeFi can participate on both sides of a financial transaction, as in using the service and providing the service. This comes in contrast to traditional finance where consumers purchase financial services offered by large institutions but often cannot participate in and/or earn profits by providing the service. In this regard, value is mostly captured by the institution, as opposed to spreading equity out through more user-driven participation. Transparency — The open-source code of DeFi protocols allows anyone to verify the security, rules of engagement, and actual network usage. On the other hand, traditional finance is done on privately owned servers where users cannot always verify how a transaction was processed nor control how their data is being handled. As a result, retail investors oftentimes fall victim to information asymmetry because large institutions, especially institutional derivatives players, have more holistic views regarding the health of markets due to greater access when it comes to private processes and recordkeeping. Censorship Resistant — Decentralized backend infrastructure means that financial transactions are computed and stored in immutable ledgers backed by a decentralized network of computers running the same open-source software that reaches constant consensus on the state of the network. However, traditional finance uses a centralized infrastructure that is subject to centralized control over if transactions get processed or not. Automation — DeFi instruments are automated markets governed by software protocols that react to data. Whereas, centralized finance has intermediaries and fallback procedures that get in-between the data, processes, and actions. This often leads to multi-day waiting periods from the time a trade is executed to the time a trade is fully settled whereas the user finally has full access to their funds outside of the exchange.

(An example framework created in early 2019 by the bZx team for classifying DeFi lending protocols based on the amount of decentralization of several important features of the protocol.)

Data-Driven Security

Almost all DeFi applications are data-driven instruments, where the smart contract lays out the coded logic that defines the actions the protocol will take based on a certain input. While the contract, represented in code as boolean logic (if X happens, then execute Y action), can be written perfectly without gameable flaws, ultimately the quality of its actions comes down to the quality of the input it receives. It’s the input that determines the output of the contract and as the famous saying goes, “garbage in, garbage out.”

Each protocol requires knowledge of certain data points in order to run in the manner it’s designed. For example, MakerDAO allows users to stake ETH as collateral for a loan. However, the loan comes with a liquidation price that liquidates the user’s position and issues a 14% penalty fee automatically if ETH falls below a certain USD price. This auto-liquidation mechanism provides MakerDAO with needed security against downward price action, but only if it receives accurate data. Not only must the data reflect true market prices, but it must remain decentralized to avoid bribery and centralized influence. The entire protocol can fail and lose its immutable appeal if the data-driven automation driving it is easily manipulated and inaccurate.

MakerDAO isn’t alone in this challenge. Synthetix is a very intriguing protocol that experienced first-hand the pitfalls of bad data due to a faulty oracle. Synthetix is a decentralized derivatives platform where users can stake SNX in a pool, which serves as collateral to back a contract that users trade against without slippage. The contract acts as a clearinghouse that allows users to take positions against it using synthetic assets that provide them exposure to assets without holding the underlying asset. These synthetic assets can come in the form of fiat currency, cryptocurrency, commodities, etc., and are pegged to market data.

Synthetix needs accurate market data to price these synthetic assets when swapped, as well as for price-triggered liquidations as part of their future proposals. Without accurate data, the SNX-backed contract could trigger absurd swaps that have no basis in reality or become over-leveraged in the future. This puts the security of the entire system at risk, as demonstrated by a faulty oracle price feed in July 2019 that a trading bot unintentionally exploited for a gain of almost $1B. Fortunately, Synthetix was still in its early days of development and was able to roll back the network and negotiate a settlement with the user. The truth is that this can happen to any protocol and the incentive to exploit price feeds only rises as these networks gain value. As stated in their blog post after the incident, the Synthetix team has learned a lot about the best oracle practices for securing their data feeds and has since announced their switch to decentralized oracles via Chainlink. The first iteration of synthetic assets (7 FX and Commodity vs. USD pairs) secured by Chainlink’s decentralized oracles are now live on Ethereum mainnet.

Offloading the Oracle Problem to Chainlink

As stated by Kain Warwick, CEO of Synthetix, in a recent interview with Crypto Finder, “The “oracle problem is an existential threat to every DeFi protocol that uses them (…) Without an oracle, DeFi is fairly limited.” Not only do oracles need to provide accurate data, but they need to do so with a high amount of security to avoid tampering. What’s the point of having a highly secure, high-value smart contract if the oracle triggering that contract is insecure?

One of the issues people fail to realize is that developing smart contracts is hard enough as it is, especially during these early days of development. There are no easy to use templates or extensive guides to developing on blockchain since it’s a very new industry. As a result, developers must devote most of their attention to writing, maintaining, and upgrading the code that underpins their protocol, especially since it’s securing millions of dollars with further ambitions of gaining more adoption.

Oracles are a whole separate blockchain problem with an entirely different set of game theory, market dynamics, and technical challenges. Just because a developer is great at blockchain development, doesn’t mean they are an expert on oracle development. And that’s perfectly fine because most App developers are not experts in every area of development for their applications. Ultimately, it doesn’t make sense for Dapp developers to need to be experts on a completely new subset of the market, especially when they’re already under pressure to pioneer a new industry of secure smart contracts. Kain echoed this sentiment, saying “What Chainlink does is allow people to specialize in oracles, which is a really hard problem. Chainlink is a team of really creative and clever people and that’s all they’re focused on. This allows us to say, ok you guys focus on that and specialize in that and we’ll focus on our own issues.”

That sentiment was also echoed by Brandon Iles, CTO of Ampleforth — a protocol for sound money built using smart contracts that adjust the supply based on market data, specifically the Consumer Price Index (CPI). When asked about the primary benefits of using Chainlink in a recent Reddit AMA in the Chainlink subreddit, Brandon responded saying “Reduced engineering overhead is obviously nice as well, because it frees us up to work on other features, integrations, and projects that might be more directly interesting for users… rather than us spending all our time on backend infrastructure.”

This specialization in development is very similar to App development today, whereas companies focus on their core application code and leverage external APIs that have mastered certain subset domains. Uber is a great example of an application that instead of developing its own GPS, Messaging, and Payment capabilities, it leverages trusted APIs for those functionalities such as Google Maps, Twilio, and Stripe. Not only does it offload complex technical development to proven experts, but it vastly accelerated the development of Uber. Uber can now focus on cultivating its network of users, while the APIs maintain some of their core services.

It is my belief that DeFi Dapps can both improve their security and expedite development by offloading their oracle functionalities to a trusted expert like Chainlink. Backed by an extremely experienced team with an unparalleled academic research arm and sole dedication to building an extensive oracle network that is fully customizable and decentralized, Chainlink makes for a great solution to solve the complex issues teams face in regards to creating secure and scalable oracles that are customized to fit their platforms.

According to Kain, “It creates another advantage (for Synthetix), which is that we can then open up asset creation to the community. At the moment, if we need a new price, we need to bring the price feed in ourselves and we’re responsible for it. With Chainlink, we will be able to have the Synthetix community go to the Chainlink community and say, “Hey, we need a new price feed for this asset.” The Chainlink community can then say “We can provide it,” and then put it together and put it on-chain. The two communities will use that to create a new asset. That will really open it up (asset creation) and make it a more permissionless process.”

Subsidizing DeFi to Jumpstart the Network Effects

When you look at many of the biggest tech companies today, they all have one thing in common, large network effects. The actual size of the network is what makes the platform valuable in and of itself. For example, Facebook is popular because all your friends also use it, and Amazon is the market leader in e-commerce because every retailer you might want access to is selling goods there. The question then becomes how does a decentralized oracle network like Chainlink, which becomes more valuable the denser its ecosystem grows, spark the initial growth in usage?

One of the initial observations of the Chainlink team is their clear strategy to educate new audiences, attract developers and integrate projects. As evident by their recent Asia blog post, they are not only traveling around the western world to educate new audiences about the power of connected smart contracts, but they are establishing a strong presence throughout Asia. They’re also putting resources towards cultivating their developer communities by attending many hackathons and even hosting their own Virtual Hackathon backed by large bounties. Finally, they are accelerating the number of platforms integrated with Chainlink by building external adaptors for different data providers and blockchain platforms to make their services available to other networks.

One of the other apparent strategies employed by Chainlink is the freemium model (free + premium) through the offering of their price reference data oracle networks. The basic idea of the freemium model, which is done by some of the biggest tech companies in the world, especially open-source companies like Redhat, is to provide some basic services for free, while also offering premium services that users must pay for. In this regard, many new users are on-boarded to the platform to access basic services without commitment. As they become accustomed to the network, they build trust in the product offering and begin to purchase premium features, which are absolutely essential for building more robust and specialized product offerings. At the same time, the more projects that come on board and mature as protocols, the need for subsidies decreases until both ecosystems can support one another.

Chainlink seems to have recognized the current demand, yet untapped potential of DeFi, and therefore has decided to subsidize the cost of basic data feeds by providing the price reference oracle networks to the market. These reference contracts aggregate pricing data about a particular asset using a collection of independently verified nodes and then put that single, aggregated datapoint on-chain. DeFi Dapps only need to call the on-chain contract for the data, which can then be used to trigger their smart contracts. This decentralized data only requires one on-chain transaction to access, something that would usually take numerous on-chain transactions to aggregate on-chain.

What’s great is that Dapps don’t have to completely give up control of their oracle mechanism either if they don’t feel comfortable. Instead, they can use Chainlink as an additional oracle client for data. In such a design, the Dapp can feed data into the contract themselves or through another third party oracle mechanism, which is then aggregated with an oracle feed from the Chainlink network (which is decentrally aggregated itself). Ampleforth is a recent example of doing so as seen in the diagram below.

(The basic architecture of the Ampleforth oracle mechanism)

Chainlink initially launched the ETH/USD reference contract, which updates the price of ETH in USD every 5 minutes based on an aggregation of 21 independent and security reviewed nodes. While some may argue that these nodes are subject to bribery, given that their identity is known, it’s arguably much more advantageous to build trust over time through maintenance of the initial quorum than having potentially random, insecure nodes. It’s also substantially harder to infiltrate 11 nodes that have economic incentives to build a good long-term reputation, especially as some of the only security reviewed nodes, than it would be to penetrate one team managing the data feeds themselves.

(The public dashboard for the ETH/USD price reference oracle network)

This quorum of 21 nodes that make up the reference contract is the most decentralized publicly verifiable oracle mechanism for the ETH price. This is important because ETH/USD is one of the most in-demand price feeds in the DeFi ecosystem. MakerDAO, Compound, and Synthetix, especially once ETH staking is allowed, are all examples of popular DeFi Dapps that require consistent access to the ETH/USD price to trigger important protocol actions. With ETH being the most popular collateral asset and most prices being denominated in USD, it’s a vital price reference that Chainlink is providing to the DeFi ecosystem.

Chainlink has also recently launched its second price reference oracle network, BTC/USD, with the same secure quorum of 20 nodes. It’s important to not understate this achievement for DeFi because up until this point there is no open-source, publically viewable and verifiably decentralized price reference oracle for BTC/USD. Most price oracles for BTC/USD are either centralized or aggregated using a proprietary system unavailable to the public. Whether people like it or not, Bitcoin is one of the foundational pillars of the crypto ecosystem and has major impacts on the space, specifically the price action of all crypto-assets. DeFi Dapps like Compound, Synthetix, and wBTC can now use this reference contract to bring greater trust to the security of their BTC/USD price feeds.

(The public dashboard for the BTC/USD price reference oracle network)

Lastly, Chainlink is looking to launch more networks by making an adjustment to the update mechanism of their reference contracts. In their first iteration, the price feed was updated based on time intervals of 5 minutes. However, the time-interval updates look to have scaled down to every 10 minutes for the “Heartbeat” (ETH/USD and BTC/USD) requests. Additionally, Chainlink has recently added a price deviation model called the “Flux Monitor,” which updates the price every time there is a 1% change in the price. This brings two advantages: 1) It allows for DeFi Dapps to stay up to date during times of high market volatility, which is currently the biggest security concern; 2) It enables Chainlink to save on on-chain costs during times of low volatility, effectively allowing the expansion of more oracle networks for different assets using the Flux Monitor design. They already announced at Devcon 5 that reference contracts would be launched in addition to ETH and BTC for LINK, BAT, ZRX, REP, DAI, and USDC.

Building a Foundation for Long-Term Success

By providing the market with free access to high-quality market data for common price references, Chainlink is wedging itself deep into the foundation of DeFi. This multi-strategic approach brings substantial awareness, usage, and trust to the Chainlink ecosystem. While projects may enjoy free access to a subset of their data needs, the reality is that most DeFi projects have far greater data needs than what’s provided by the reference contracts, along with customization requirements to sufficiently satisfy their unique oracle problems.

In a sense, Chainlink subsidizes some of their basic data needs, which in turn frees up capital for them to scale their business and pay for those customized data requirements. As Defi projects grow, their data-needs grow; and as their data-needs grow, the Chainlink network stands to grow, especially with it already being widely referenced to for data. It’s a mutually beneficial feedback loop that helps both ecosystems mature and reach the network effects needed to ultimately sustain themselves through bi-directional value flow.

At the same time, supporting and growing with DeFi allows Chainlink the perfect environment to build up trust in their network, so that they can then approach enterprises with verifiable and time-tested proof of providing a functional network that’s been successfully securing real value over an extended period of time. As stated in the last article, The Seven Requirements for a Viable Decentralized Oracle Network, “It’s from this carefully crafted trust dynamic that Chainlink is set up to succeed both in the current moment and long into the future.”

Follow me on Twitter: @Crypto___Oracle