A suite of permissionless, open applications and infrastructure that seeks to revolutionize and replace finance as we know it.
Software has been chipping away at the walled castles of finance for a while now...but over the past couple of years a set of protocols and products built on top of the blockchain have emerged that threatens to disrupt the sector entirely. Decentralized finance or DeFi as it has come to be known promises to usher in an era of transparent and secure financial services which can potentially bank the unbanked, eliminate high level corruption and flip our existing models of sectors ranging from banking and exchange to insurance entirely on it's head.
DeFi is not a single product or company but is instead a set of products and services that together compose stacks which can act as a replacement for institutions ranging from banking, insurance, bonds and money markets. Let's take a look at the products that create this stack and weigh the pro's and cons of traditional systems vs. their decentralized equivalents.
Currently, even with its limited applications, an equivalent of 600 million USD is locked into decentralized finance applications and the number is only set to grow in the future.
Replacing traditional financial models with composable stacks built with smart contracts-
A bank is essentially an entity which you lend your money to and give them for safekeeping. In turn the bank gives you a rate of interest compounded annually.
The bank in turn lends the money to borrowers at a higher interest rate. Banks also act as an intermediary that lets you convert assets of one class to another. All of these services can be automated with immutable contracts on the blockchain removing the need for such an intermediary. Let us take a deep-dive and explain how the pieces fall into place to construct this jigsaw puzzle.
Ethereum is the base layer not only as the EVM which run the code for the smart contracts used by the layers above, but also as a with the Eth2.0 upgrade, holders can stake their tokens and earn interest in the base layer proportional to amount and time that they have staked their tokens, just like bond markets are the backbone of the FIAT economy  Ethereum staking will be the backbone of such a DeFi infrastructure.
In Ethereum 2.0, the functions of the centralized government and its federal reserve have been consolidated into the code of protocol. The fixed, predetermined staking rate in Ethereum 2.0 solves the issue of a central party from printing money. - David Hoffman, Ethereum: The Digital Finance Stack
Lending and borrowing-
Over the past couple of years many services have emerged which allow you to lend your assets and earn an interest or borrow assets for margin trading/arbitrage etc. the primary disadvantage of current systems is that since there are no mature reputation systems, loans can be accessed only via over-collateralizing i.e. in order to borrow another asset (typically a stable-coin) you will typically need to put 150% value collateral and at the end of the maturity period once you pay back the loan, you get back your collateral minus interest that is owed. Regardless of this disadvantage, it is still appealing, if the borrower believe that the price of the collateralized asset will go up over time and doesn't want to sell the underlying asset. Also selling the asset generates a taxable event in most jurisdictions while using a CDP to borrow a stable coin against Ether provides them with liquidity without generating a taxable event.
Some of the biggest lend/borrow markets currently in the ecosystem are-
Dharma is a direct matching peer-to-peer lending platform i.e. users can lend their tokens but must wait for their orders to be matched. Interest rates are determined through a non-transparent black-box process. Users can borrow supported assets for a 90 day period and can pay it back at any time by paying the interest for the entire duration of 90 days.
Compound is a protocol that creates algorithmic money markets. It uses an intermediary token known as cToken to the token being lent and interest is accrued and paid off in the cToken upon each block creation. The interest rates are calculated based on market dynamics, for eg. if there is more demand for loans than there are lenders, lenders would get higher interest rates and vice-versa.
Maker allows users to mint the Dai stable-coin against a collateral paid in crypto. So if a user wanted to mint the Dai stablecoin that would have to put a collateral in crypto in the Maker CDP and upon maturity they can pay back the stable-coin along with a stability fee to retrieve their asset.
Asset backed stable-coins-
Stable-coins are tokens whose value remains stable with respect to FIAT over time. This is achieved via algorithmic collateral placed either in FIAT (USDC, Paxos etc.) or in Crypto (Dai). Stable-coins form a vital part of the ecosystem, since it allows users to use it as a base currency equivalent to Fiat while staying in crypto and additionally not generating a taxable event for transfers and exchanges.
Dai, generated through Maker is currently the biggest stablecoin by volume and the value is held stable against the USD through a stability fee mechanism which is charged from the borrowers when they mint new Dai by collateralizing their Ethereum assets.
USD Coin by Coinbase is a Fiat backed stable coin, meaning that the collateral responsible for keeping the value stable is placed in USD.
Paxos is another USD backed ERC20 compliant stable-coin which is unique in that it is regulated and approved by the New York State Department of Financial Services. Recently they also announced a decision to mint up-to 100 million USD worth of stable-coins on the Ontology chain.
Derivatives, peer-to-peer margin and prediction markets-
Smart contracts also allow applications like insurance on crypto assets, second or third order derivative markets for real world events, and peer-to-peer margin trading and leverage.
Augur is a prediction market which allows users to stake tokens and bet for or against future outcomes of real-world events. Such markets are still in their infancy buy with enough users can also serve as accurate predictions for the outcome of future events.
CDx aims to provide the crypto version of a deposit insurance. It also provides crowd-sourced transparency about exchange security and default risk by allowing users to bet against exchanges which are likely to get hacked.
dYdX is a protocol that provides margin trading and leverage opportunities in a decentralized peer-to-peer manner. It allows traders to short or long an ERC20 token without having to sell the underlying asset.
Decentralized exchanges form a vital part of the DeFi ecosystem, as they allow users to exchange assets without requiring to transfer custody of their assets to a third party. Decentralized exchanges can be categorized as either having order-books, settlement and liquidity either on-chain or off-chain.  Let's take a look at some of the biggest decentralized exchanges and protocols out there.
ox protocol is set of libraries that allows peer-to-peer to trading and transfer of assets. It uses on-chain settlement with off-chain order-books and pooled liquidity. This method allows trades to be decentralized without needing any intermediary while also allowing sufficient liquidity and transaction throughput without clogging the Ethereum network. There are currently multiple decentralized exchanges built on top of 0x protocol each of which can theoretically share liquidity and access price discovery mechanisms etc.
Kyber network is a swapping mechanism for exchanging ERC20 tokens and uses on-chain settlement and on-chain pooled liquidity. All swaps are transparent and peer-to-peer without needing a trusted third-party or intermediary of any sort. KNC is Kyber network's token which is used to pay fees for each transaction.
Bancor allows for peer-to-peer swapping of supported assets and is unique because it also supports some non ERC20 tokens such as EOS to be swapped for regular ERC20 assets. It uses on-chain settlement of swaps along with on-chain pooled liquidity.
Advantages over traditional financial equivalents-
- Full custody of capital-
When you deposit deposit your money in a bank or a centralized exchange, you lose custody of your assets and are exposed to high levels of counter-party risk. With fully decentralized services all transactions are executed from your wallet and you do not lose custody of your assets at any given point of time.
- Security and transparency-
With fully decentralized platforms all transactions are recorded on the public ledger and open to software audit by any interested party, contrast that with centralized exchanges and financial institutions which operate in a black-box environment and thus have an incentive to cheat.
- Higher annual rate of returns than comparable FIAT bond schemes-
The Fed policy rate offers interests at 2-3% APR on government bonds. Collateralized stable-coins however offer higher interest rates and APRs along with advantages such as greater transparency and services which are easier to access.
- Increased capital access-
Much of the world, particularly the poor and the unbanked and those living in countries run by authoritarian regimes or ones hit by sanctions do not have access to liquidity or capital in the form of USD. They are thus left out of the global prosperity. Decentralized services can bring capital access to these masses since these are not censorable and there are typically no location requirements to sign-up for these services.
Risks and limitations-
Perhaps the biggest limitation of current DeFi systems is the lack of a credible reputation/credit system. As such most loans must be taken out against Overcollateralized crypto assets. This is not appealing to many traders since they would rather not collateralize on a peer-to-peer platform. This does not help the unbanked since without a crypto collateral which in turn requires a Fiat gateway, they cannot access liquid capital.
2. Technological risks-
There are several general technical as well as blockchain specific risks, for instance -
Smart-Contract code bugs and Software errors-
There have been several high-profile bugs and exploits found in DApp code in the recent years and such bugs are notoriously hard to fix and in the worst case may even cause the chain to split and become unstable. In financial applications in the absence of exhaustive and thorough code-audit of the smart contracts, may cause the entire stack to topple like dominoes and cause significant losses to investors.
Network congestion and transaction fees on the blockchain-
One of the biggest limitations of applications running on the blockchain is that because of the way blockchains work, they can only commit a limited number of transactions per second, compared to centralized providers. This is an active topic of research and is popularly known as the scalability trilemma. As such doing every operation on-chain would be slow and expensive. Several second layer solutions have been developed or in works to overcome this including DeXes using off-chain orderbooks and only broadcasting orders when finalized and other solutions are being actively researched and implemented.
3. Competing blockchains and protocols-
Several established blockchains such as EOS and Oncology as well as newer blockchains and protocols such as Cosmos and Polkadot are rushing to kickstart DeFi ecosystems on their own platforms, this may pull some developers and liquidity away from Ethereum based DeFi systems.
However healthy competition and increased interest just goes on to demonstrate the potential and use-cases of the ecosystem and only adds value. Furthermore many of the applications are being designed in such a way that they are interoperable with the Ethereum based ecosystem.
Regardless of where you stand on the spectrum of whether tokenization of assets and services is a good roadmap for mankind, it is easy to agree that a world where commodities, goods and services are tokenized and the need to a trusted third party intermediary is removed will be much more efficient and transparent than the systems of today.
In a hyper-tokenization scenario, blockchain based peer-to-peer protocols have eliminated the need for institutions that exist today solely because of the need for trust and verifiability between parties executing a transaction.
In the near future, when some of the promising projects come to fruition you can potentially access credit on the the blockchain with reputation systems, buy and sell tokenized stocks versions of stocks and futures such as S&P and commodity markets (UMA Protocol), predict outcomes of future events with a surprising degree of accuracy (Augur) and witness hundreds of millions of people being lifted out of poverty as they get access to capital, start businesses and get education without needing a bank account or paper documents.
The great driving force behind this movement is it's transparency. Since the code is open and allows anyone to contribute, it incentivizes individuals and teams to create products to provide solutions and address the shortcomings and potentially build a businesses around them.
Although the ecosystem is still in it's infancy but there is great promise and development to address the shortcomings and each potential disadvantage is seens.
This is of-course not an exhaustive list of apps and frameworks that comprise the DeFi ecosystem, nor are these the only products targeting their particular niche but merely used to illustrate the composition and functionality of the parts of the stack. For a more exhaustive list visit DeFi network.
References and Further reading-
According to a World bank report released in 2018, 1.7 billion people across the world are unbanked.
- DeFi Network portal
- DeFi weekly newsletter
- Decentralized Finance: Thematic insights
- Binance research: Decentralized Cryptoasset lending and borrowing
- How Decentralized is DeFi? A Framework for Classifying Lending Protocols
- The next FinTech: Global “Open Finance” Infrastructure
- Decentralized Finance (#DeFi): A Quick Walkthrough of the Ethereum DeFi Stack
- DeFi Expectations: Game-changer For Modern Finance
- Ethereum: The Digital Finance Stack
- Ethereum DeFi products Hit Milestone as ETH falls against Bitcoin