NEW
The Chainlink Fall 2021 Hackathon kicks off October 22. Sign up today.

What Is DeFi (Decentralized Finance)?

DEFINITION

Decentralized finance, or “DeFi,” refers to the emerging blockchain-based ecosystem of permissionless and transparent financial services.

DeFi is one of the most significant advancements enabled by blockchains, smart contracts, and oracles. While DeFi started out as a movement to recreate common financial instruments on decentralized infrastructure, it has rapidly expanded to power an array of entirely new products and markets. 

In the DeFi economy, users can access a similar financial application stack as they would in traditional finance but without requiring the involvement of centralized intermediaries. By using open-source protocols running on censorship-resistant and decentralized networks, DeFi applications provide global permissionless access, mitigate counterparty risk, and interoperate with other applications to enable more advanced financial products. 

In this article, we outline what DeFi is, how it works, and describe the different financial primitives that currently exist. We then discuss the risks inherent to DeFi and how oracles can help mitigate them, as well as how developers can leverage Chainlink decentralized oracle networks to build feature-rich DeFi applications.

How Does DeFi Work?

The global economy today operates on disparate systems that entrust significant amounts of capital and arbitration to large, centralized financial institutions. This often precludes new users from accessing and participating in financial markets and limits developers from easily creating new financial products. Such a fragmented and high-barrier economic landscape results in a stagnant, opaque, and sometimes unreliable financial system that is unable to keep up with user demand while also taking on systemic risks.

On the other hand, public blockchain infrastructure is rooted in the open-source movement, where anyone with an Internet connection can access a global, decentralized, and peer-to-peer financial system without ever needing to entrust a custodian with their assets. Since DeFi applications run on the same infrastructure (i.e., a blockchain), their underlying logic is enforced by an inherently secure and deterministic environment, providing complete transparency around the rules governing the system and facilitating seamless connectivity between different DeFi applications.

Since the code powering DeFi apps is available for anyone to audit, users have greater confidence that their financial agreements will execute exactly as programmed. Having an open access financial system not only reduces development and compliance costs for developers but also allows for bridges in the economy between what would otherwise be distinct economic segments. 

A key property differentiating decentralized finance from traditional financial infrastructure is the design principle of permissionless composability. Composability allows for various different components in the DeFi ecosystem to be combined to create a structure that is greater than the sum of its parts. This allows DeFi developers to focus on their own application’s unique business logic, given they can leverage pre-existing open-source infrastructure for certain components. Since dApp developers can create unique combinations of DeFi protocols without any special permissions, the DeFi innovation cycles generate stronger network effects and move faster than what we have seen in traditional finance. To further understand DeFi, let’s identify the most common use cases.

Overview of DeFi Applications

Stablecoins

Stablecoins are a core component of DeFi that allow fiat currencies like the U.S. dollar and other assets to be represented on the blockchain as digital tokens. A stablecoin is a representation of an underlying asset and tries to maintain a 1:1 peg with it through various mechanisms. The desire for relative stability in the often volatile cryptocurrency markets has propelled the aggregate value of all stablecoins to be over $100B.

There are various stablecoin designs that aim to provide different guarantees for maintaining their peg, including fiat-backed stablecoins, decentralized stablecoins, and algorithmic stablecoins. Fiat-backed stablecoins represent fiat currency on the blockchain and are backed by off-chain collateral. For example, TrueUSD (TUSD) is a U.S. Dollar stablecoin backed by USD in an off-chain bank account, which uses Chainlink Proof of Reserve to present continuous on-chain audits attesting to its 1-to-1 collateralization. Decentralized stablecoins, on the other hand, are often issued as overcollateralized loans using crypto collateral for increased resilience and transparency. The peg is maintained through changing interest rates, which encourage more or less borrowing. 

Algorithmic stablecoins aim to maintain their peg through various cryptoeconomic mechanisms. An example is Fei Protocol, which effectively functions as an algorithmic central bank where the peg is upheld by the protocol on the open market through a process called reweighting. Users can mint the stablecoin FEI with an equivalent deposit value of ETH, which gets added to the protocol’s reserves to be used as Protocol Controlled Value (PCV). PCV represents all assets that aren’t redeemable by users. If FEI is trading below the peg, PCV is used to buy FEI on the open market to push the price up, and if FEI is trading above the peg, more FEI is minted and sold on the open market to push the price down.

Decentralized Exchanges (DEXs)

Decentralized exchanges allow for any developer launching a token to instantly access liquidity and large existing user bases without having to manage centralized exchange listings. Users can swap between digital tokens without needing the involvement of any centralized entity, interacting only with permissionless and non-custodial smart contracts.

A subset of DEXs called Automated Market Makers (AMM) fundamentally alter the mechanism underlying electronic exchange and are one of the most impactful innovations in decentralized finance. Instead of using a traditional central limit order book (CLOB), where buy and sell orders are paired by the exchange’s matching engine, both sides of the trade are pre-funded using on-chain liquidity pools. Liquidity pools allow users and other smart contracts to instantly swap between the tokens contained in the two-sided pool (e.g., the ETH/USDC pool contains ETH and USDC tokens) in a completely automated and non-custodial manner. Any user can become a liquidity provider and earn passive income from trading fees derived from users making swaps within the pool. 

Since pricing is determined by an algorithm instead of transactions in an order book, AMMs allow for immediate liquidity for any digital token. Available in a permissionless manner for anyone with an Internet connection, AMM-based DEXs have contributed significantly to price discovery in what would otherwise likely be illiquid markets. AMMs such as SushiSwap, Bancor, and more have experienced immense growth in trading volume, number of users, and value locked in their liquidity pools. With continuous improvements to capital efficiency, more customizable liquidity provision parameters, and innovative ways of mitigating impermanent loss, they are primed to attract more capital in the future.

Decentralized Money Markets

Money markets are one of the fundamental components of a well-working economy. They are venues where borrowers and lenders are connected. The ability to borrow funds or earn a yield on idle capital generates a significant amount of economic activity. Money markets have traditionally been facilitated by centralized entities, which grants them significant power over this key segment of the global economy and the funds flowing through it. 

Decentralized money markets enable users to borrow and lend digital tokens using blockchain-based smart contracts in a permissionless way without custodians. These decentralized money marketplaces are governed by open-source code that is managed by a community of distributed stakeholders, democratizing the supply and demand side.

Applications like Aave, Compound, and CREAM have seen tens of billions of dollars of value flow through their protocols thanks to their non-custodial nature that reduces single points of failure. Decentralized money markets rely on overcollateralization, where users are required to deposit more collateral than what they intend to borrow. They then use on-chain price feeds supplied by oracles to determine users’ current collateralization ratio—the ratio of users’ collateral value to their outstanding loan value—which is then used to issue fair market loans, liquidate undercollateralized positions, and calculate interest payments.

Synthetic Assets

Synthetic assets are financial instruments that derive their value from an underlying asset or benchmark (e.g. synthetic gold tracks the price of gold). Historically, the creation of these kinds of financial instruments has been the privilege of large institutions since a large degree of trust is required with the involved capital at risk. However, with the permissionless framework of DeFi, anyone can build an open-source financial primitive that is available to the public and provides strong guarantees for its intended execution.

A fundamental aspect of the security of blockchain-based synthetic assets is access to high-quality, tamper-proof pricing data. Since the management of synthetic assets and the settlement of swaps is determined by external data sources for the underlying assets, oracles are foundational infrastructure for providing reliable on-chain valuations when it comes to these blockchain-based assets.

Yield Farming

Yield farming (or liquidity mining) is a new primitive enabled by DeFi that can be effective in incentivizing liquidity for a project, launching a fair distribution of a new token, and growing an active and long-lasting community. Yield farming incentives reward users who provide liquidity or otherwise contribute to the health of a decentralized protocol. The two main goals of yield farming are often to incentivize users to bootstrap usage of the project or to distribute newly launched tokens with governance rights over the protocol to a decentralized set of participants. 

Yield farming has proven to be an effective way of kickstarting a DeFi ecosystem by cultivating a network effect, bootstrapping supply-side liquidity for a project, and creating a community of stakeholders primarily made up of users of the protocol. Yield farming incentives come in many forms based on individual project goals, but they often involve leveraging existing infrastructure to establish unique reward schemes that are the most effective at achieving their intended purpose. DApp developers have a great amount of creative freedom over what distinct protocol parameters they would like to leverage in their liquidity mining schemes to infuse their ecosystem with a strongly aligned community of active stakeholders.

If you’re a developer looking to build a yield farming dApp, check out how to build a DeFi yield farming application using Chainlink Price Feeds.

While DeFi is already reshaping how transactions happen in the on-chain economy and how value flows between what otherwise would be isolated economic environments, there are inherent risks involved that need to be identified and mitigated.

Related articles

Stay updated on the latest Chainlink news