Decentralized finance is one of the areas in crypto that has received notable traction. At a high level, DeFi aims to re-create the financial system that we use today but in a way that removes the need for intermediaries like banks. Bitcoin, the first decentralized network, laid the foundation for this movement by facilitating trustless peer-to-peer payments in a way that doesn’t require people to know or even trust each other.
Ethereum, which came a bit later extended these trust properties to a broader range of use cases by allowing developers to build “smart-contracts” which are applications that move assets according to pre-specified set of rules. Because these smart contracts exist on the Blockchain, they can be accessed by anyone and people can trust that the code specified in the contract will be executed. The promise of the DeFi space is that this new financial system, contrary to the current one, will be global, transparent, fair and open for anyone to build upon.
To give you an idea of the type of financial applications that are built already today on Ethereum we’ll cover some of the most interesting projects.
What is MakerDao?
In short, MakerDao is a financial protocol consisting of a set of smart contracts on the Ethereum Blockchain. The main function of the MakerDAO protocol is to supply DAI, a token and currency that tries to always be worth $1. DAI is generated through a process called Collateralized Debt Position (CDP), in which any person can send Ether into a smart contract where it’s temporarily locked and receive DAI in return. If a user sends $150 of Ether he receives 100 DAI, i.e ⅔ of the Ether locked in the smart contract as collateral.
After, the user can send the DAI to anyone in the world or sell it and buy something with the money. Effectively, the user has borrowed DAI from the smart contract but since the smart contract holds the user’s Ether back as security there’s no default risk whatsoever. When the user wants to get the Ether back he needs to pay back the principal of the loan as well as the accrued interest over the loan period.
Now, like any currency that’s traded on free markets, DAI derives its value from demand and supply. If too many people sell DAI the value of DAI can fall under $1. In that case, there are two forces that bring the market price back to $1. One is that people who have taken out loans will use the opportunity to pay back their debt at a discount, buy DAI for cheap on the market (e.g $0.95) and close their debt position. The 100 DAI that were initially borrowed will only be worth $95 so there is an arbitrage opportunity to be seized. This increases the market demand for DAI and at the same time, the supply of DAI is stifled because DAI is being paid to the smart contracts and burnt there.
If the market forces alone don’t bring the price back to $1 the Maker Organization which is governed by thousands of individuals who collectively vote on policies, can additionally raise the interest rate, making it more expensive to borrow and thereby affecting supply.
In other words, these smart contracts work like a decentralized “central bank” that mints currency and makes sure that the currency is backed by a reserve of Ether to maintain it’s stable value.
What is Compound?
Compound is a decentralized protocol that lets people borrow & lend assets by providing a liquidity pool that anyone can either borrow from or lend to. Users wishing to lend money, can send their assets to the liquidity pool and immediately start earning interest. The interest generated from the entire pool is distributed across all suppliers so even when funds are not being used, suppliers receive interest.
Users wishing to borrow money from the liquidity pool have to provide collateral just as in the MakerDAO system, which guarantees the security of the loan at any point. The interest rates are set algorithmically based on supply and demand which means that they fluctuate. If a lot of DAI is supplied to the pool and there is not enough demand to match it - the interest rate for DAI will be lowered. Low supply and high borrowing demand, on the other hand, will lead to an increase in the interest rate.
These are just two examples of decentralized finance applications. There are others and many more joining every week developed by young developers. The magic with decentralized finance is that it is global by definition and it can be used by anyone in the world with a smartphone - even by the 1.7B people without a bank account. They are powered by open-source code produced by communities and auditable for anyone. Compare this to the highly centralized, opaque and rent-seeking financial system that we live in and you’ll understand why this vision fascinates the crypto community.