Kopalnie Krypto Team - Friday 25 August 2023
Decentralized Finance - how do loans work in DE-FI?
Some time ago, one of our editors has been tasked with creating an article about stablecoins in the Chia ecosystem. After our team's verification, it turned out that the article did not meet our website's standards. Not because our editor lacks writing skills but due to the lack of sufficient knowledge, they slightly overdid the article's conciseness. It appears that explaining the workings of stablecoins requires presenting additional information. Let's embark on a journey with our editor to understand the intricacies of decentralized finance. In this part, we will touch upon the definition of DeFi and also explain the principle of how loans function in this financial system. This will serve as a solid foundation for our further analysis.
What are decentralized finances?
Decentralized finances, also known as DeFi, are nothing else but a financial system. However, they are quite specific, as there are no traditional financial institutions here, such as banks or intermediaries. In DeFi, transactions, loans, trading, and other financial operations take place using blockchain technology and smart contracts, which are publicly accessible and independent of central authority. Decentralized finances prioritize transparency, accessibility, and democratization of financial services. As a result, people have control over their resources and financial operations without the involvement of traditional institutions.
How do loans work in DeFi?
Decentralized finances offer many mechanisms that exist in their centralized version. Loans are not an exception here, of course. We will explain the principle using the example of the largest DeFi lending protocol - AAVE.
The AAVE platform, like most financial applications in DeFi, uses smart contracts to operate. These are computer programs that automatically execute specific operations or transactions on the blockchain without the need to trust any intermediaries. Well-programmed smart contracts ensure secure and trouble-free financial operations on the blockchain. Blockchain here serves as another form of security, as its transparency allows anyone to trace the journey of their own or others' assets.
How does this work in practice? Let's explain using the example of Ethereum, the Tether stablecoin, and dollars. For now, we need to know that the price of Ethereum fluctuates, while Tether aims to maintain the value of the US dollar.
Let's imagine that we turn to AAVE for a loan. First of all, we need to provide collateral - for example, let it be $100 in Ethereum. Will we get an equivalent value of Tether stablecoins in return? Not entirely, as it may turn out that this value will be $80. But how? $100 for $80? Something doesn't add up. Well, it turns out that loans in the crypto world must be overcollateralized. We'll come back to this later.
Let's say we now want to repay the borrowed Tether stablecoins and reclaim our pledged Ethereum. However, it turns out that in the meantime, the value of Ethereum has doubled. So, we receive our ETH, but in reality, it is now worth $200. A great way to make a profit, right? Unfortunately, this is a double-edged sword because the value of Ethereum could just as well fall. In that case, the mechanism of liquidation threshold comes into play. Once this threshold is crossed, the collateral is automatically sold to cover the costs associated with the funds borrowed by us. This way, the investors on the other side of the smart contract never lose money.
Let's be honest with ourselves: at this point, we understand a bit, but we don't quite grasp it all. Let's explain it in simple terms. We put up $100 in Ethereum, get $80 in Tether. The missing $20 is like a safety buffer. Suddenly, the value of Ethereum starts to drop and approaches $80. AAVE needs to repay the investors on the other side as quickly as possible to prevent losses. This is where the liquidation threshold comes in. Our collateral is lost, but we can keep the loan, and the investors are happy because they haven't lost their investment. The moral of the story? It's better to repay the loan before the collateral value decreases too much.
It's also worth mentioning that AAVE loans don't work in a traditional way. Firstly, there is no specific repayment deadline. Over time, interest accrues. This means that the value of the borrowed loan increases, but the collateral remains the same. Ultimately, the value of this collateral will equal the value of the loan, and there will be no overcollateralization. This is when we cross the liquidation threshold again, and AAVE returns the collateral to investors.
This is where the investors, mentioned several times above, come into play. They are on the other side of each smart contract. Let's use the previous example again.
If someone wants to borrow $80 worth of Tether, there must be an investor on the other side of the smart contract who locks up that $80 in the AAVE protocol. After the loan is repaid or the liquidation threshold is crossed, such an investor retrieves their investment.
Okay, but what does such an investor get out of it? Satisfaction from helping someone get a loan? Nothing could be further from the truth. No one operates here as a charitable organization, so when investors retrieve their contribution, they get something extra. Remember the interest we mentioned above? That's what goes into the investor's wallet as well. This way, those providing liquidity to AAVE can prosper.
Lending protocol or something more?
We learned that the AAVE protocol uses smart contracts to operate, which are computer programs working on the blockchain. The protocol itself is also a piece of code functioning on the blockchain. But someone had to create and publish it. Does that mean AAVE is controlled by a closed group of programmers? Does that make it a centralized protocol? After all, DeFi aims for decentralization!
Indeed, initially, AAVE consisted only of its creators. However, they gave users the opportunity to buy management rights to the protocol. This way, AAVE began to function as a decentralized organization. Any proposed changes to the protocol must be supported by a vote, where the strength of each vote depends on the contribution of each "shareholder."
Does such a decentralized organization profit from running the protocol? Absolutely, and the same interest rates we wrote about in the previous section are responsible for it. It turns out that liquidity providers don't receive the full value of the interest. Some of it goes into the AAVE treasury.
In this article, we've learned what decentralized finances are. We've also uncovered the workings of loans in DeFi based on one of the most popular lending platforms. In the next article in this series, we will address the topic of stablecoins and explore their history in the Chia ecosystem. Both of these articles will be an excellent introduction to the third part of the saga, where we will combine all our knowledge and describe the emerging protocol that will enable Chia blockchain users to acquire decentralized stablecoins.