Learn DeFi lending in 10 minutes

Learn DeFi Lending in 10 Minutes-Unveiling the Mystery of DeFi Lending

1. What is a loan

To understand borrowing, we can start with life. In life, borrowing behaviors often occur, such as student loans, housing loans, car loans, and business loans that everyone is familiar with. So, what is borrowing? The act of a depositor providing funds to a borrower in exchange for deposit interest is a borrowing. This includes both saving money and borrowing money.

2. Why save money?

Very simple, because depositing money will generate interest, and interest can be added to the principal and deposited together to generate compound interest. The result is to make more money, money begets money.

3. Why borrow money?

A very common saying is “because of poverty”, which is a big truth at first glance, but it is not. This is because many companies or individuals that are not short of money will have or have borrowed money to repay. Some people borrow money for investment to get a return far beyond the interest on borrowing; some people borrow money for advance enjoyment; some people borrow money for emergency turnover…

In daily life, there are many scenarios for lending in fiat currencies: go to the bank to deposit a capital-guaranteed wealth management product; buy a Licaitong on WeChat; go to the provident fund center to borrow money to buy a house; Alipay spends Taobao to buy a game console… and so on. So, what about cryptocurrencies?

4. Centralized digital currency lending platform

Centralized lending is also an important application of Centralized Finance. At present, there are many centralized digital currency lending platforms that are also providing lending services for individuals or institutions. A simple example is as follows:

BlockFi (U.S., the largest holder of Grayscale Bitcoin Trust);

Cred (United States, has filed for bankruptcy protection, internal fraud);

Celsius (UK);

NEXO (Switzerland);

RenrenBit (Singapore).

Just like Cred in the example has filed for bankruptcy protection due to fraud, these centralized digital currency lending platforms also have the following risks that may cause loss of customer deposits: hacker attacks, internal bad operations (misoperations, fraud), bad debts, etc. But the core problem is that these centralized digital currency lending platforms are inconsistent with the main value of encrypted currencies, that is, they are not self-custodial property. Therefore, a decentralized cryptocurrency lending platform is even more necessary.

5. Decentralized digital currency lending platform

Decentralized lending is the protagonist of the topic DeFi-Lending (Decentralized Finance-Lending). With the help of decentralized lending, anyone can become a depositor or borrower in a completely decentralized manner without review and approval authority. . At present, most of the lending projects are on the Ethereum public chain, and of course there are projects on other chains, such as HECO’s Lendhub and Conflux’s Flux.

DeFi-Lending is mainly introduced through the following aspects:

  • Types of Borrowing
  • Important borrowing formula
  • The three elements of DeFi-Lending: Depositors
  • The three elements of DeFi-Lending: Borrower
  • The three elements of DeFi-Lending: the platform side

1. Dividing the form of loan

It can be roughly divided into the following forms:

(1) Point to point

ethland (renamed Aave in 19th iteration) adopted a point-to-point format when it went online in 17 years. The point-to-point form is characterized by a stable interest rate, but the disadvantage is that it cannot be accessed freely.

The Dharma contract locks in interest for 90 days. After the borrower borrows, the first and 90th day repayments are the same, and 90 days of interest must be paid.

(2) Point to contract

Point-to-point contracts are also called stable currency types. Take Makerdao as an example. Depositors deposit cryptocurrency into the contract. When borrowing, they can only lend one asset from the contract—DAI. DAI is a stable currency pegged to the US dollar.

(3) Reserve pool

At present, most decentralized lending adopts the method of reserve pool, such as: Compond, Aave, Flux, etc. The advantage of a loan agreement in the form of a reserve pool is that it is free to deposit, borrow, and repay.

2. Important borrowing formula

Important formulas for decentralized lending:

Deposit value * deposit interest rate + Fee = borrowing value * borrowing interest rate

3. The three elements of DeFi-Lending: depositors

As a depositor, there are two issues that I am most concerned about. First, where does the money exist (asset custody), and second, how much money can be made (deposit interest rate). Let’s answer it below.

(1) Asset custody

Asset custody is the question of where the money exists. The assets of the decentralized lending agreement are all hosted in smart contracts, which are deployed on the open blockchain, and the smart contracts of the decentralized lending agreement are generally audited, and most of the audited codes are Open source. Therefore, the contract code is relatively strong and transparent, and naturally avoids the possibility of human error in centralized lending.

(2) Deposit interest rate

How to determine the deposit interest rate is also a question of how much money can be made. Here we need to introduce a word first, capital utilization. The deposit interest rate is related to the fund utilization rate. The higher the fund utilization rate, the higher the deposit interest rate; conversely, the lower the fund utilization rate, the lower the deposit interest rate. The specific calculation formula will be given later (see the example of borrowing rate). I want to remind you that the interest rates of most lending platforms currently fluctuate, so you need to pay attention to interest rate fluctuations at any time in order to suffer unnecessary losses.

4. The three elements of DeFi-Lending: the borrower

As a borrower, there are four main issues that I am most concerned about. First, do you need a mortgage, second, how much money you can borrow, third, how much money you need to repay (borrowing interest rate), and fourth, the risk of liquidation during the borrowing process. Let us solve the above questions one by one.

(1) Whether to mortgage

Do decentralized lending agreements require collateral? The answer is yes, a mortgage is required. Moreover, all current periodic borrowings of decentralized exchanges need to be over-collateralized. So, why do you need collateral? The main reasons are the large volatility of cryptocurrency prices, insufficient transaction depth of some currencies, and delays in chain operations.

At present, the decentralized lending platform’s periodic lending basically adopts over-collateralization, which is conducive to the risk control of all parties on the platform. In view of poor liquidity, tokens with small liquidity will require more collateral; tokens with better liquidity and large liquidity require less collateral. At present, there are platforms that are exploring non-over-collateralization models. This requires the help of KYC on the chain, so I will not discuss it here.

(2) What is the upper limit of the loan amount

To know the value of the maximum amount X that can be borrowed on the platform, a simple calculation is required.

The formula is: X = deposit amount / mortgage factor (different platforms have slightly different names for mortgage factor).

For example: On the Flux lending platform, the collateral factor of stable coins such as DAI and USDT is 130%, that is, if the deposit amount is 130 USDT, you can lend a maximum of 100 USDT equivalent cryptocurrency; the collateral factor of ETH, BTC, etc. 140%, that is, if the deposit amount is 14 ETH, you can lend up to 10 ETH equivalent cryptocurrency.

(3) Borrowing interest rate

Before explaining the borrowing rate, we need to explain a problem and a concept.

  • Question: Why is the deposit interest rate always less than the borrowing interest rate?

Some people say that according to the formula “deposit value * deposit interest rate + fee = borrowing value * borrowing interest rate”, because of the existence of handling fees, the deposit interest rate is less than the borrowing interest rate. This may seem correct at first glance, but even if fee is 0, the deposit interest rate will still be less than the borrowing interest rate. The reason is that in order to meet the requirement that depositors can withdraw money at any time, the lending platform will not lend out all the deposited money, so the deposit interest rate must be less than the borrowing interest rate. On the other hand, when the demand for borrowing rises, it will adjust the market borrowing demand by increasing the borrowing interest, and increase the utilization rate of funds.

  • Fund utilization

There is also the following formula in the lending platform: Supply + fee = Cash + Borrow.

among them:

Supply is the deposit account balance (deposit + interest)

Borrow is the loan balance (loan + interest)

fee to collect fees for the platform

Cash is the amount of remaining assets that have not been lent

Coinworld-learn DeFi lending in 10 minutes

Then the capital utilization rate (Ua) = Borrow / (Cash + Borrow). At present, the DeFi-Lending market uses the “fund utilization rate” indicator to adjust the borrowing rate, that is, the higher the capital utilization rate, the higher the borrowing rate.

  • Market interest rate model classification

The first is the linear interest rate model, which represents Compound and Fulcrum. The formula type and function diagram are roughly as follows (X in the formula is the capital utilization rate, the abscissa in the interest rate graph is the capital utilization rate, and the ordinate is the loan interest):

Coinworld-learn DeFi lending in 10 minutes

The second type, the polynomial interest rate model, represents dYdX and DDEX. The formula type and function diagram are roughly as follows:

Coinworld-learn DeFi lending in 10 minutes
Coinworld-learn DeFi lending in 10 minutes

The third type, the index interest rate model, represents Flux. The formula type and function diagram are roughly as follows:

Coinworld-learn DeFi lending in 10 minutes
Coinworld-learn DeFi lending in 10 minutes

Here is a note to explain that the interest rate model seeks a balance between the interests of depositors and borrowers based on the market and other conditions. Therefore, the interest rate model will be adjusted. The above interest rate model is not necessarily a model used by related projects. . In addition, the interest rate model does not have a certain type of model that is necessarily good. It is just the result of a balance between depositors and borrowers.

In addition, most projects to modify the interest rate model need to be approved by the Decentralized Autonomous Organization (DAO) to take effect. Generally, the DAO will be managed by the development team in the early stage of the project, and the relevant management authority will be gradually transferred to the community DAO after the agreement is completed and stabilized.

  • Example of borrowing interest rate calculation

Here is still an example of FLUX platform, its latest interest rate model formula and diagram are as follows:

Coinworld-learn DeFi lending in 10 minutes
Coinworld-learn DeFi lending in 10 minutes

The following picture is a screenshot of the DAI deposit and loan interface of the Flux platform:

0xbzphhgo.jpg” data-img-size-val=”569,90″/>

Several data can be obtained from the above figure:

A. The deposit interest rate of DAI on the left is 4.02%;

B. The borrowing interest rate on the right is 9.22%;

C. DAI’s remaining unlending assets Cash is US$158.714;

D. The Borrow loan balance of DAI is $122.727.

Based on the known information, we use the Flux interest rate model to verify whether the interest rate is accurate.

Step 1: Calculate the utilization rate Ua

Ua=Borrow / (Cash + Borrow)=122.727 / 281.441 = 0.43607

Step 2: Calculate the borrowing interest rate (e in the interest rate formula is a mathematical constant about 2.71828)

(e20Ua-1)/(e20-1)*0.995+0.2* Ua+0.005

=(6132.722966-1)/ (485158668.4999-1) * 0.995 + 0.2 * 0.43607 +0.005



Step 3: Calculate the deposit interest rate (the fee of the Flux platform is 0)

Deposit value * deposit interest rate + fee = borrowing value * borrowing interest rate




Through the above calculation steps, the correctness of the deposit interest rate and borrowing interest rate in the picture can be verified. Thus we have completed the explanation of borrowing interest rate and deposit interest rate.

(4) Liquidation

As a borrower, we must be clear about liquidation issues. We need to understand the source of the currency price of the borrowing platform, understand the platform’s liquidation line, and understand how the liquidation proceeds. Let’s introduce them one by one below.

  • What is liquidation

In order to reduce the risk of the agreement and protect the depositor, when the ratio of the borrower’s loan value to the value of the mortgaged asset reaches a certain value, the borrower will be liquidated by other users of the agreement, so that the ratio of the loan value to the value of the mortgaged asset returns to a reasonable range . When liquidation occurs, the mortgaged assets of the account become sellable assets, and the price is the current market price. Any person (liquidator) can repay part or all of the outstanding loan on behalf of the borrower. In return, the liquidator can obtain the collateral held by the borrower, which is defined as a liquidation incentive.

  • Source of currency price

Currency prices are derived from oracles. If there is a problem with the oracle, there will be a problem with the source of the platform currency price, which is catastrophic for the platform. So the oracle is very important. Different platforms use different oracles. For example, platforms such as Compound and Flux use their own oracles, and the currency price is taken from the weighted average of the leading exchanges; Aave uses Chainlink as the oracle provider.

  • Liquidation line

As the name implies, when the ratio of the borrower’s loan value to the mortgage asset value reaches a certain value, the borrower’s assets will be liquidated, and this value can be called the liquidation line. The liquidation lines of different lending products are also different. Take the Flux platform as an example to explore the platform’s clearing line and clearing incentives:

The liquidation mortgage rate in the Flux agreement is a set value, which is currently 110%. When your account loan mortgage rate is lower than the liquidation mortgage rate, it will trigger your deposit liquidation. In other words, then the asset liquidation line is 100/110 about 90.91% (accurate to 0.01).

Without considering the interest on borrowings, if the price of ETH borrowed increases by 1.82 times to a price equal to 182 DAI, then the value of his borrowing is divided by the value of the mortgaged assets, that is (182 DAI / 200 DAI)*100%= 91%, this value exceeds 90.91% of the liquidation line set by Flux. The assets may be liquidated.

Assume that the liquidator repays the entire loan, that is, the current amount of 182 DAI of ETH (the amount of ETH has not changed).

In return, the liquidator can get the 200 DAI deposited by Zhang San.

Then the liquidation incentive is 18 DAI (200 DAI-182 DAI), and the incentive percentage is 18 DAI /200 DAI = 9%.

5. DeFi-Lending three elements: platform

Different DeFi-Lending platforms charge different fees. List a few briefly:

Compound: Based on 10% or 5% of the interest rate paid by the lender (depending on the asset);

Lendf.me: 0.05% of the total loan amount will be used as a handling fee;

AAve: A 0.25% handling fee is charged for loans, and a flash loan handling fee is 9/10,000. 80% of the commission is used to buy back Lend, and 20% goes to the team;

Flux: 0 handling fee.

Of course, the main headache at present is not the handling fee, but the gas fee of the Ethereum network. This makes the lending platform of the non-Ethereum network more friendly and friendly, such as the Flux lending platform on the Conflux public chain.

At present, DeFi-Lending’s lock-up volume is stable at around 5 billion U.S. dollars. 2020 is a year of DeFi outbreak. Lending lending is a “real” demand for DeFi, and it will inevitably be known to more and more people in the future. DeFi shines on the road ahead.

Source: conflux chinese community


Please enter your comment!
Please enter your name here