DeFi terms and basic concepts [developer must read]

There are several different types of Defi protocols, but since Leding Protocols like Compound have the most attention,
this article will focus on the basic concepts, common patterns and risks in Defi lending protocols. These concepts are not only applicable to lending agreements, but also to other types of Defi products, such as option agreements Opyn. In order to facilitate the understanding of software developers, we will try not to use financial terminology.

The Defi project began to explode in 2019. The total locked value of that year increased by 137.23%, which means that every 37.12 ether is locked in the Defi protocol, so it is regarded as a key field of blockchain applications. Click here to view more than 100 DeFi protocols and application development resources.

Use their own familiar language learning Ethernet Square DApp development : the Java | Php | Python | .Net / C # | golang | Node.JS | Flutter / Dart

1. What is DeFi Lending Protocol/ Lending Protocol

A lending agreement is a platform that connects lenders and lenders in a decentralized manner. On the one hand, it allows lenders to borrow cryptocurrency from the platform and pay interest, on the other hand, it allows depositors to deposit cryptocurrency on the platform to earn interest. Compared with bank deposit accounts, Defi loan agreements can usually provide much higher interest rates. For example, at the time of writing this article, Compound provides DAI loans with an annualized interest rate of 7.58%, while most banks have very low deposit interest rates. Some of them even have negative interest rates. But on the other hand, the lender needs to pay interest on its loan. For example, the current annual interest rate for loaning DAI from the Compound agreement is 8%, which is quite expensive.

2. Are Defi loan agreements and P2P loans the same thing?

So, are DeFi loan agreements and P2P loans the same thing?

no.

These Defi lending agreements usually operate based on a pooled structure. For example, when you deposit DAI to Compound, your money enters a pool of funds instead of a specific lender, and the lender borrows from the pool of funds instead of a specific borrower. The advantages of this design are as follows:

  • The borrower does not need to wait for the lender to show up
  • The agreement supports the use of different incentives to balance supply and demand. For example, when the demand of the lender is low, it can affect the interest rate of the borrower
  • The agreement can balance risks, so the borrower does not have to be 100% tied to the specific risk of the borrower

3. Why are people still using DeFi loan interest rates so high?

There are many possible answers, but one common reason is that traders engage in leveraged trading. Leverage is a very simple concept, the consciousness is to borrow money to invest. For example, I have some BAT tokens and detailed that it will rise, but I still want to buy some REP because I think REP will also rise, I don’t want to sell BAT and then buy REP, then I can use my BAT as a collateral (Collateral ) Lend some ether from the Defi loan agreement, so that you can use the borrowed ether to buy REP.

In the above case, I hold BAT and REP at the same time, and I need to bear the annual interest of the ether loan. If the price of REP increases, I can sell REP in exchange for Ether, and then return the Ether lent to the Defi protocol. The remaining Ether is profit.

4. Collateral / Collateral

Mortgage is a basic concept in the financial industry. Its function is what you use as a guarantee when you borrow money. If you cannot repay as agreed, your collateral will be used to pay the debt. A simple example is housing mortgage. When you buy a house with a bank loan, the house you buy is collateral. If you cannot repay the loan, the bank will take your house.

The same is true in Defi. If you want to lend some assets from the Defi agreement, then you need to provide some assets to the agreement as collateral; if you cannot repay the loan, the agreement will not return your collateral. Since we are discussing decentralized finance, the acceptable collateral is usually digital encrypted assets.

5. Mortgage rate/ loan-to-collateral ratio

Since the price of digital cryptocurrency is unstable, using encrypted assets as collateral is risky, because when the price of collateral falls, there may not be enough loans. For example, suppose the price of BAT and REP are both $1 today, I use 1 BAT as collateral and borrow 1 REP from a Defi agreement. The next day the price of BAT fell by $0.5, but REP was still $1. Now if I do not repay, then when the Defi agreement tries to sell my pledged BAT to cover the 1 REP I borrowed, there will be a loss of $0.5.

This is why most Defi agreements require a mortgage, which means you can only borrow part of the value of the collateral (less than 100%). The Defi agreement is usually called the mortgage rate, which is also a common requirement for risk control. Now when you borrow money, you can only borrow, for example, 75% of the value of the collateral, which creates a 15% buffer for the price change of the collateral.

Since the price instability of each type of encrypted asset is different, it is common practice to set the mortgage rate for different asset pairs. For example, Compound calls the mortgage rate the Collateral Factor and sets different assets separately.

6. Protocol tokens and underlying assets

We often see the Defi protocol issuing its own tokens. For example, when you deposit into the Compound protocol, you will get cTokens, such as cEther, cDAI, etc. These Defi protocol tokens are usually standard ERC20 tokens, and they play an important role in the operation of the Defi protocol. For example, in the Compound protocol, cEther or cDAI are used to represent the ether or DAI that you deposit into the protocol, respectively, and are called underlying assets. These cTokens are like receipts issued to you by the Defi protocol, so that you can use them to redeem your deposits in the future. Another function is to track the interest on your deposit. Therefore, if you transfer these cTokens to others, it means that you give the deposit receipt to others, and they can redeem your target assets. So be careful with this one.

One thing to note in Compound is that when you use deposits as collateral to lend other assets, the cToken sent to you cannot be transferred. This is also easy to understand, because since it is used as collateral, your underlying assets will be locked until your debt is paid off. If cToken can still be transferred during this period, there is a problem, because the recipient of these tokens may not even know that these cTokens have been mortgaged.

7. Price Oracle / Price Oracle

Price oracle machine is a common concept in Defi protocol. When a Defi protocol deals with different assets, it often needs to know the current prices of these assets. Basically, the price oracle is used to provide asset prices to the Defi protocol. In the Defi ecosystem, the price oracle is a key component, but Defi users usually do not pay attention to the operation mechanism of the price oracle, but in fact, if the price oracle is not properly designed, it may cause serious security problems-in short, If asset prices are attacked, then the entire Defi protocol will fail.

At present, most Defi protocols use their own price oracles. Before investing in these agreements, it is necessary to check the implementation code of these price oracles and understand how they deal with prices. However, Compound has released Open Oracle, which is a good start for industrial standardization solutions. It can replace its own price oracles of different Defi protocols, thereby removing the potential risks of these oracles.

8. Interest

The interest in Defi is the same as the concept in traditional banking. There are usually two types of interest: Simple Interest
and Compound Interest. However, the calculation of interest in Defi is more complicated, because Ethereum transactions need to rely on external triggers, and Defi protocols usually need to rely on user operations to calculate interest. For example, Compound calculates interest in each block, but it does not automatically complete the calculation in the background, but relies on key user behaviors (such as deposits, loans, liquidation, etc.) to trigger the interest calculation process-if the user does not operate , Then the Defi protocol itself will not perform interest calculations.

9. Liquidation

Liquidation means that when the value of your collateral drops to close to the debt or even unable to support the debt, the Defi agreement will allow others to buy your collateral. For example, suppose the price of 1 REP is equivalent to 1 BAT, and you deposit 1.5 BAT as collateral and lend 1 REP, then when the price of BAT drops to 1.3 BAT = 1 REP, there is a contribution to the Defi protocol, because if If BAT continues to fall, the Defi agreement will not be able to repay the debt, so at this time the Defi agreement will allow others to buy your collateral, which is 1.3 BAT. Generally speaking, Defi agreements will provide rewards to liquidators in order to encourage timely liquidation. This is called Liquidation Bonus or Liquidation Incentive. This is in the interest of the Defi agreement, because it can be liquidated in time before the price of the collateral drops too much. It is worth pointing out that once the price of the collateral falls below the price of the debt, it will no longer make sense for the lender to repay the loan, and in this case the
Defi agreement will not be able to repay the debt.

10. Does this mean that liquidation is a good way to make money?

Yes. The Defi protocol usually provides incentives for loan liquidation. As a liquidator, you can get transactions that are better than the market price during the liquidation process. Therefore, technically speaking, you can make a profit by monitoring the Defi protocol to find out the collateral allowed for liquidation in time of. However, this process requires continuous monitoring of the Defi protocol, and you have to compete with other liquidators (usually robots) to ensure that the liquidation occurs in a timely manner. At the same time, understand that the collateral you want to take over is an asset whose price has fallen, and holding this asset is usually dangerous.


Original link: Basic concepts of DeFi — Huizhi.com

Guess you like

Origin blog.csdn.net/shebao3333/article/details/106979408