The Ultimate DeFi Protocols Guide
I want to share with you a workflow of the most important DeFi protocols and how to interact with them.
Let me first explain where this comes from. My name is Juan. I’m a developer from Argentina living in New Zealand. I run a Youtube channel called CryptoSheinix, where I explain different aspects of crypto, DeFi and Blockchain technology. I usually create Spanish content, but every now and then I post in English as well.
Crypto Sheinix DeFi Starter Kit
I have created a workflow that explains some of the most popular interactions that you can have in DeFi. I hope this can be helpful for all sorts of DeFi users, whether you are an experienced "DeFi degen" or a newbie to the space. Hopefully, this workflow will give you an overall idea of the things you can do with DeFi and how everything is put together. But first, let’s try to understand a few concepts of DeFi.
Breaking down the DeFi space
DeFi is a space in crypto that is getting bigger at a tremendous pace, and new projects and protocols come up every day. Sometimes it can be a bit overwhelming when you are starting, or even if you are familiar with DeFi, and it’s hard to keep up with everything that is happening.
A good way of understanding everything that is going on is by learning about some of the most common protocols and concepts that DeFi has. While there are many, in this post, we are going to explore five ideas:
- Money Markets
- Automated Market Makers
- Decentralisation & Governance
- Liquidity Mining
- Yield Farming
Money Markets are one of the foundational stones of DeFi. They handle borrowing and lending in a decentralised way. As a user, you can deposit crypto into these liquidity pools and obtain a return for locking your money in. Also, you can borrow money from these pools, but bear in mind that most borrowing cases need collateral to borrow against.
It is important to understand that any person or company does not control these liquidity pools; they are fully automated and governed by Smart Contracts in the Blockchain. They handle everything related to interest rates, incentives for borrowers to pay their debts, and for lenders to provide liquidity.
Some of the most common protocols are Compound, AAVE, dY/dX and Cream.Finance.
There is a particular case of loans in the DeFi space called "Flash Loans". With Flash Loans, you can borrow money without collateral, the only condition being that you need to pay for the loan on the same Ethereum transaction. Let me explain: On Ethereum a transaction can have multiple "steps", the nature of DeFi makes these composable protocols pretty much like a "money lego, where you can put together different protocols to interact with each other. On Flash loans, you can borrow money from one protocol, use it to take advantage of some arbitrage opportunity and repay the original debt in the same Ethereum transaction. The beauty of it is that if any of the steps fail, the whole transaction rolls back and it is like you never got the loan in the first place. This means that there is a reduced risk of getting stuck with a debt or a bunch of tokens you can’t sell.
This particular type of loan is very powerful and only intended for developers. There's no User Interface for the final user, as the nature of a flash loan is more like a tool that helps different protocols to interact. To be able to execute a Flash Loan, one has to be able to use the public APIs of specific protocols that offer this type of loan.
Automated Market Makers
An automated market maker, or AMM, is a fancy word to describe a specific type of decentralised exchange, where the price of a trading pair is given by a mathematical formula involving the size of the trade and the size of the pool.
In classic exchanges, it is common to have buy and sell orders, and the exchange tries to match them and infer a price based on the demand and supply.
In the AMMs, there aren't any order books. Instead, there’s two main actors and a liquidity pool managed by a Smart Contract.
There are liquidity providers, who have two different tokens which are provided as liquidity for a specific trading pair to a liquidity pool of that pair. In that liquidity pool, depending on the protocol, there’s a distribution of those pairs (it could be 50/50, 80/20, etc.).
Liquidity providers, "provide" the liquidity to the pool so that traders can swap their tokens later on in that specific pool. For each swap a trader makes, they must pay a fee that goes to the liquidity providers as a reward for providing liquidity.
As an example, let's say there’s a Liquidity provider named Bob; he has ETH and DAI on equal proportions (50/50). He can deposit in Uniswap (a common AMM) the ETH and DAI on the ETH/DAI pool. Alice has some ETH that wants to swap for DAI. She goes to Uniswap and changes her ETH for DAI paying a fee for that swap. The DAI that Alice received is coming from the liquidity that Bob previously deposited. Now, Bob also gets a percentage of the fee that Alice paid for using that liquidity pool.
Some of the most common AMM are:
There’s also some decentralised exchanges with a mix of order books and AMMs, like Loopring and dY/dX.
Decentralisation & Governance
Generally speaking, the goal of DeFi protocols is to become a Decentralised Autonomous Organisation or DAO. This means there’s no central point of power, and the community can make decisions on which way the protocol should go through voting with governance tokens.
Most DeFi protocols start as a Foundation, or a company, or can even be a group of developers, but the main goal is to give control to the community by becoming a DAO. To achieve this, at some point of the lifecycle, these protocols start to issue governance tokens.
A governance token is a crypto token where the only goal it has is to be used for creating proposals and voting inside the governance module of the protocol that issued it. They don’t have any other value whatsoever, although they are subject to speculation in the market; hence they have a price, and you can trade them in the open market.
Some of the most popular governance tokens and their protocols are:
- YFI (yearn.finance)
- UNI (Uniswap)
- COMP (Compound)
- MKR (MakerDAO)
Governance tokens introduced another incentive to DeFi users that we will explore in the next section.
Liquidity Mining refers to the obtainment of rewards by Liquidity Providers (LP) and users who interact with DeFi protocols, usually in the form of governance tokens.
While there are many forms of liquidity mining, the most common way is to distribute the governance tokens of a protocol to its users. This is how liquidity mining started. A protocol called Compound decided to reward all the users of the platform by giving them COMP tokens that could be used for voting and proposing new changes in their governance module. This way, the protocol started to become even more decentralised.
Many other DeFi projects now follow this trend, and many of them provide more complex types of liquidity mining programs.
A common but rather complex type is staking the tokens of a Liquidity provider for a particular protocol to obtain its governance token in the form of reward. This is what is called Farming a token.
Every time a user provides liquidity to an AMM, it receives what is called a “Liquidity Provider Token” which represents the portion of the pool that the user has. It is the proof the user has that they have provided liquidity to a specific pair.
These "LP" tokens can be staked inside the governance module of the protocol in exchange for governance tokens as a reward. The reason behind this is that the LP tokens are proof that the user provided liquidity of a specific token to the markets, hence is supporting the project, so the protocol rewards him or her with governance tokens.
Now, governance tokens as we’ve seen them can be used for proposals, trade, to vote, or even provide liquidity to an AMM trading pair.
Yield Farming refers to the activity of seeking the highest yield on different DeFi protocols. It can encompass all sorts of interactions with DeFi protocols, for example, taking a loan, using it to provide liquidity on a money market, obtaining a governance token and selling it for a profit. There are endless ways of combining different strategies to seek the highest yield. Usually, when a strategy is no longer profitable, or a better approach comes along, “yield farmers” will move the funds and use the new strategy.
The composability of the protocols, the growth in their use and the constant change in their returns makes manual yield farming a challenging task. Users need to continually check which protocols offer the highest yield, calculate fees, and decide whether to move their funds or not. That is why a new set of protocols started to emerge, led by yearn.finance, in which users have automated yield farming strategies. It starts with automated money market robots, where users deposit funds into these mutual crypto funds managed by a smart contract (robot) that always checks the highest yields and moves the money automatically to the most profitable protocol. After a while, the strategies executed by these smart contracts started to get more complex, and now they are reviewed and voted by the community before implementation by developers.
Ultimately, automated yield farming strategies are services that are delivering on one of the biggest promises DeFi has: make accessible complex financial instruments, which were traditionally reserved for high network individuals, to anyone.
I hope you’ve learned more about the DeFi space. I have tried to explain the main concepts here for you to give you an idea of the possibilities out there.
A word of warning though, all of these protocols are highly experimental, and you should be aware of that. They are interconnected and rely on each other, so if any of them fails, it can lead to a domino effect on the others. This is a very early stage of a new industry, and it is expected to hit some bumps in the way. Nevertheless, the potential to become the new financial paradigm that will free a lot of people from the current system is enormous.
About the author:
A software developer by profession, and a traveller by heart, Juan Nuvreni has lived and travelled in many countries. Once he recognized the power of Bitcoin and Blockchain technology there was no way back. Driven by the potential to create a fairer world through technology, he is now on a mission to educate and spread the word of Blockchain.
The above references an opinion and is for informational purposes only. Do not take this as personalised financial advice or investment advice. The views expressed by the author do not necessarily represent the opinion of BitPrime.
Last updated: 10/11/2020