利率模型有哪些 利率模型理论与实践

Compound是一个透过Ethereum区块链上的智能合约,达到去中心化借贷的服务。相较于传统的中心化金融,Compound 拥有公开透明的利率模型、高隐私性、即时借款、放贷免绑约的特色。

Compound 基本架构

这边我们以目前放贷年利率最高的DAI 来说明。首先,放贷人将DAI 放入智能合约中,即可立即完成放贷并产生利息,而借款人可以透过抵押资产(这边以ETH 当例子) 的方式借走智能合约的DAI,并依照利率支付利息。

这个架构有几点需要知道:

借款人可以抵押任何Compound上面所列的资产,但为了防止借款人付不出利息,抵押的总资产必须>借出的总资产,且要高于一定比例,下面会有更详细介绍。借款人还款时,所支付多出来的利息,会平均分配给所有放贷人(依放贷资产比例分配),所以不会有一对一借贷的问题。借款人随时可以还款,还款时依照借款的利率与时间,决定总共的还款数量。同样,放贷人随时可以连本带利提出DAI ,但前提是智能合约必须要有足够的DAI (可能部分正在出借),但由于Compound 有保留利率(保留金) 的机制,智能合约多出来的DAI数量越来越多,几乎不可能有提不出钱的情况。究竟Compound 是怎么做到即时放贷、即时还款的呢?

实际上在智能合约里的运作是这样:


当放贷人放入1 DAI 到智能合约时,智能合约会产生出额外的cDAI (compound DAI) 给放贷人。而放贷人随时能以cDAI 换回原本的DAI 以及多出来DAI 的利息。

利息如何产生?

以上面的例子来说,放贷人放入1 DAI,获得40 cDAI,因此当下DAI与cDAI的兑换率是1/40 = 0.025,随着时间与利率增加,此兑换率的值会越来越大,也就是说:

目前1 cDAI 可以换到0.025 DAI随时间过去,兑换率> 0.025,1 cDAI可以换到> 0.025 DAI40 cDAI 可以换到> 1 DAI,多出来的,就是放贷人得到的利息使用Compound DAI智能合约的人,看到的兑换率是相同的

放贷人只需要透过持有cDAI,便可以获得DAI 的利息。

举个实际的例子:

小明于2019 年10 月10 日将1,000 DAI 放入智能合约中,并获得40,000 cDAI。2019年10月10日这天DAI与cDAI的兑换率= 1/40 = 0.0252020年10月10日,小明决定把放贷的钱连本带利提出来。这时候,DAI与cDAI的兑换率增加到0.0275于是小明用之前持有的40,000 cDAI 换回了40,000 x 0.0275 = 1,100 DAI多出来的100 DAI 就是小明这一年放贷所得到的利息。兑换率是怎么增加的?兑换率依照以下数据做计算(以Compound DAI为例子):totalCash=放入智能合约,但还没被借走DAI的总数量totalBorrows=所有借款人,所应偿还DAI的总数量(含本金利息)totalReserves=保留金总数量(借款人所应支付的利息,部分被视为保留金)totalSupply=所有放贷人所得到cDAI的总数量

由此可以看出:

借款(borrow) 量越多,兑换率增加越快。(因为所需支付利息增加越快)

注:totalBorrows 跟totalReserves 主要受到下面会介绍的,借款年利率与放贷年利率影响。借款年利率与放贷年利率

这边更进一步说明放贷年利率与借款年利率。首先,要介绍一个在Compound中重要的指标:使用率

简单来说,使用率就是所有放贷进来的钱当中,已经被借走的比例。


Compound App 利率资讯

上图由Compound App网站可以看出,当前使用率是62.13%,也就是放贷人放进来的DAI有62.13%正被借走当中。

有了使用率,就可以说明Compound的核心利率模型。

借款年利率

在Compound 利率模型里,会计算借款年利率,这个利率会受到以下因素影响:

基础利率(base rate)使用率(utilization rate)加给利率(multiplier)

借款年利率= 基础利率+ (使用率x 加给利率)

以Compound DAI为例,基础利率= 5%,加给利率= 12%,若以目前当下的使用率= 62.13%来计算:

借款年利率= 5% + (12% x 0.6213) = 12.4556%

也就是上图所显示的12.46% 的由来,也就是说,借款人所需要支付利息的年利率,在这个当下是12.46%。

放贷年利率

放贷年利率同样会受到以下因素影响:

借款年利率(borrow rate) (上述所计算出来的)使用率(utilization rate)保留利率(reserve factor)

放贷年利率≈ 借款年利率x 使用率x (1 – 保留利率)

同样以Compound DAI为例子,上述算出借款年利率= 12.46%,使用率=62.13%,保留利率= 5%

放贷年利率≈ 12.46% x 62.13% x (1 – 5%) = 12.46% x 0.6213 x 0.95 = 7.3543281%

同样也是上图所显示的7.35% 计算方式的由来,也是指放贷人会收到利息的年利率,在这个当下会是7.35%

这边需要注意的是,在compound利率模型里面,每个币种的基础利率、加给利率、保留利率可能不尽相同,但都是智能合约里的常数。

智能合约里有可以让管理者(admin) 修改这些常数的权限,因此Compound 组织可以视情况做调整。而任何调整,都能在区块链上公开透明的查询到。

所以我们能看出什么?

在Compound利率模型里面,若常数不变,单一币种借款年利率与放贷年利率是存在最大值或最小值的,因为会变动的因素基本上只有使用率一个因素。

以Compound DAI 来看:

基础利率= 5%加给利率= 12%保留利率= 5%

借款年利率= 基础利率+ (使用率x 加给利率)

因此,当使用率= 0%,借款年利率= 5%,当使用率=100%,借款年利率= 17%。

借款年利率最小值= 5%,借款年利率最大值= 17%

放贷年利率≈ 借款年利率x 使用率x (1-保留利率)

同样可以算出,放贷年利率最小值= 0% ,放贷年利率最大值= 16.15%

以下稍微整理了几个Compound币种的借款年利率与放贷年利率当下之最大值、最小值:


实际年利率会根据使用率的值而介于两者之间。

利率的更新周期

上述提到了借款、放贷的年利率,那在Compound里面,随着使用率的变化,利率多久更新一次呢?

实际上,只要使用率一有变化,Compound利率就会立即更新,而利率更新的最小单位就是Ethereum上面透过挖矿产生的一个区块(block)。

在Ethereum 区块链上,平均15 秒会产生一个区块(block),因此利率的变化大约15 秒就有可能改变一次。

在Compound 里面,会使用年利率除以一年预估的总区块数量,Compound 决定为一年会有2102400 个区块产生。

举个实际的例子:

假设实际上刚好15 秒产生一个区块,也就是1 分钟产生4 个区块,1 小时产生240 个区块。

小明于10 月10 日11:00 在Compound DAI 智能合约借了100,000 DAI,这个时候的借款年利率= 10%在10 月10 日12:00 时,由于使用率的更新,小明的借款年利率变成15%小明于10 月10 日13:00 决定连本带利偿还所有债务

请问小明总共需要支付多少钱呢?

在11:00~12:00中,借款年利率= 10%,因此小明需要多支付:100,000 x 0.1 x 240 / 2,102,400约= 1.14 DAI
(1小时产生240个区块,一年产生2,102,400个区块)在12:00~13:00中,借款年利率= 15%,因此小明需要多支付:(100,000 + 1.14) x 0.15 x 240 / 2,102,400约= 1.71 DAI
(注意这边需要把上一次的利息也算进去)所以,小明还款时总共需要支付:
100,000 + 1.14 + 1.71 = 100,002.85 DAI如何保证借款人还钱?

上面提过,借款人需要抵押资产。若不够还钱,抵押的资产会被拿去用比市价低的价格卖出(清算)。

每个Compound上面的资产都有其抵押率,也就是你抵押了这个资产,你能够用这个资产的多少比例借其他资产。


抵押率(Collat​​eral Factor)

以上面的例子来说:

假设小美想要抵押ETH 来借DAI,于是小美抵押了3 ETH ,假设目前市价1 ETH = 200 USD,于是小美抵押了相当于600 USD 的资产。由于ETH抵押率= 0.75,因此小美实际上能借的最大资产= 600 x 0.75 = 450 USD小美于是借走了445 DAI (假设目前市价1 DAI = 1 USD)假设经过一段时间后,小美需要偿还6 DAI 的利息,而6 + 445 = 451 USD,已经超过了小美能借的最大资产量,但小美尚无偿还的动作。于是,小美抵押的部分资产将会被清算(liquidate),由于总共需要偿还451 USD,于是在Compound的清算机制下,最多会有一半(451 / 2)的借出资产被清算。例如:小美的200 USD 被清算,乘以一个比例,假设为1.1,小美的220 USD 的ETH,也就是1.1 ETH 会被没收,然后偿还小美200 USD (200 DAI) 的债务。于是清算后,小美被扣除了1.1 ETH (相当于220 USD),偿还了200 USD的DAI后,剩下451–200 = 251 USD需要偿还。
(实际运作上是开放给任何人,若帮小美偿还200 DAI,可以获得小美抵押的1.1 ETH,于是有了10%的获利)而此时小美抵押的ETH 剩下1.9 ETH,于是目前可以借的最大资产= 1.9 x 200 x 0.75 = 285 USD > 需要偿还的251 USD,清算结束。结论

这边总结一下,在Compound 的利率模型的重点与好处:

即时放贷生利息、即时借款还款,没有一对一借贷媒合的问题只要持有cDAI 就可以收到DAI 的利息,等同于放贷成功使用率(Utilization Rate)是主要影响Compound借贷利率的因素利率、利息每15 秒(1 个block) 更新一次,相当于放贷每15 秒给息清算机制能避免借钱不还,保障放贷人的权益


Compound is a decentralized lending service through smart contracts on the Ethereum blockchain. Compared with traditional centralized finance, Compound has the characteristics of an open and transparent interest rate model, high privacy, instant borrowing, and no binding for lending.

Basic structure of Compound

Here we use DAI, which currently has the highest annual lending rate, to illustrate. First, the lender puts DAI into the smart contract to immediately complete the loan and generate interest. The borrower can borrow the DAI of the smart contract by pledging assets (here, ETH is used as an example) and pay according to the interest rate. Interest.

There are a few things you need to know about this structure:

The borrower can mortgage any of the assets listed above on Compound, but in order to prevent the borrower from being unable to pay interest, the total assets pledged must be > lent The total assets must be higher than a certain proportion, which will be introduced in more detail below. When the borrower repays the loan, the excess interest paid will be evenly distributed to all lenders (distributed according to the proportion of loan assets), so there will be no one-to-one lending problem. The borrower can repay the loan at any time, and the total repayment amount is determined based on the interest rate and time of the loan. Similarly, lenders can withdraw DAI at any time with interest, but the prerequisite is that the smart contract must have enough DAI (may be part of it is being lent), but because Compound has a mechanism to retain interest rates (retention funds), the extra DAI in the smart contract The number is increasing, and it is almost impossible to fail to withdraw money. How does Compound achieve instant lending and instant repayment?

This is how it actually works in a smart contract:


When a lender puts 1 DAI into the smart contract, the smart contract will generate additional of cDAI (compound DAI) to lenders. The lender can exchange cDAI for the original DAI and the interest on the extra DAI at any time.

How is interest generated?

Using the above example, the lender puts in 1 DAI and gets 40 cDAI. Therefore, the current exchange rate between DAI and cDAI is 1/40 = 0.025. As time and interest rates increase, the value of this exchange rate will increase. It gets bigger, that is to say:

Currently, 1 cDAI can be exchanged for 0.025 DAI. As time goes by, the exchange rate is > 0.025, 1 cDAI can be exchanged for > 0.025 DAI, and 40 cDAI can be exchanged for > 1 DAI. The extra is The interest received by lenders. People who use the Compound DAI smart contract will see the same exchange rate

Lenders only need to hold cDAI to obtain interest on DAI.

Give a practical example:

Xiao Ming transferred 1,00 on October 10, 2019Put 0 DAI into the smart contract and receive 40,000 cDAI. The exchange rate between DAI and cDAI on October 10, 2019 = 1/40 = 0.025 On October 10, 2020, Xiao Ming decided to withdraw the loan money with interest. At this time, the exchange rate between DAI and cDAI increased to 0.0275, so Xiao Ming used the 40,000 cDAI he previously held in exchange for 40,000 x 0.0275 = 1,100 DAI. The extra 100 DAI was the interest Xiao Ming received from lending this year. How does the exchange rate increase? The exchange rate is calculated based on the following data (taking Compound DAI as an example): totalCash = the total amount of DAI that has been put into the smart contract but has not been borrowed yet totalBorrows = the total amount of DAI that all borrowers should repay (including principal and interest) )totalReserves=Total amount of retention money (interest paid by the borrower, part of which is regarded as retention money) totalSupply=Total amount of cDAI received by all lenders

It can be seen from this:

The greater the amount of borrowing, the faster the exchange rate increases. (Because the required interest payment increases faster)

Note: totalBorrows and totalReserves are mainly affected by the annual interest rate of borrowing and the annual interest rate of lending, which will be introduced below. The annual interest rate for borrowing and the annual interest rate for lending

Here is a further explanation of the annual interest rate for lending and the annual interest rate for borrowing. First, let’s introduce an important indicator in Compound: utilization rate

To put it simply, utilization rate is the proportion of all the money that has been loaned out that has been borrowed.


Compound App Interest Rate Information

As can be seen from the Compound App website in the above figure, the current utilization rate is 62.13%, which is the lender 62.13% of the DAI put in is being borrowed.

With the usage rate, Compound’s core interest rate model can be explained.

Annual interest rate of borrowing

In the Compound interest rate model, the annual interest rate of borrowing will be calculated. This interest rate will be affected by the following factors:

Base rate (base rate) utilization rate (utilization rate) plus interest rate ( multiplier)

The annual interest rate of borrowing = base interest rate + (utilization rate Calculated based on the usage rate = 62.13%:

The annual interest rate of the loan = 5% + (12% x 0.6213) = 12.4556%

That is, the 12.46 shown in the above figureThe origin of %, that is, the annual interest rate that borrowers need to pay is currently 12.46%.

The annual lending rate

The annual lending rate will also be affected by the following factors:

The annual borrowing rate (borrow rate) (calculated above) utilization rate (utilization rate) retention rate (reserve factor)

The annual interest rate of lending ≈ the annual interest rate of borrowing Interest rate = 5%

The annual interest rate for lending ≈ 12.46% x 62.13% x (1 – 5%) = 12.46% x 0.6213 x 0.95 = 7.3543281%

It is also shown in the above figure The origin of the 7.35% calculation method also refers to the annual interest rate at which the lender will receive interest. At this moment, it will be 7.35%.

It should be noted here that in the compound interest rate model, each currency The base interest rate, added interest rate, and retained interest rate may be different, but they are all constants in the smart contract.

The smart contract has permissions for the administrator (admin) to modify these constants, so the Compound organization can make adjustments as appropriate. Any adjustments can be openly and transparently queried on the blockchain.

So what can we tell?

In the Compound interest rate model, if the constant remains unchanged, there is a maximum or minimum value for the annual interest rate for borrowing and lending in a single currency, because the only factor that changes is basically the utilization rate.

Looking at Compound DAI:

Basic interest rate = 5% Added interest rate = 12% Retained interest rate = 5%

Borrowing annual interest rate = Basic interest rate + (Usage rate x Added interest rate )

Therefore, when the utilization rate = 0%, the annual borrowing interest rate = 5%, and when the utilization rate = 100%, the annual borrowing interest rate = 17%.

Minimum annual interest rate for borrowing = 5%, maximum annual interest rate for borrowing = 17%

Annual interest rate for lending ≈ Annual interest rate for borrowing x Usage rate x (1-Retained interest rate)

p>

It can also be calculated that the minimum annual interest rate for lending = 0% and the maximum annual interest rate for lending = 16.15%

The following is a brief summary of the annual interest rates for borrowing and lending for several Compound currencies. The current maximum and minimum values:


The actual annual interest rate will be between the two based on the usage value.

Interest rate update cycle

The above mentioned annual interest rates for borrowing and lendingRate, in Compound, as the usage rate changes, how often is the interest rate updated?

In fact, as soon as the usage rate changes, the Compound interest rate will be updated immediately, and the smallest unit of interest rate update is a block generated through mining on Ethereum.

On the Ethereum blockchain, a block is generated every 15 seconds on average, so the interest rate may change once every 15 seconds.

In Compound, the annual interest rate is divided by the estimated total number of blocks in a year. Compound determines that 2,102,400 blocks will be generated in a year.

To give a practical example:

Suppose that a block is actually generated in exactly 15 seconds, that is, 4 blocks are generated in 1 minute, and 240 blocks are generated in 1 hour.

Xiao Ming borrowed 100,000 DAI from the Compound DAI smart contract at 11:00 on October 10. The annual interest rate of the loan at this time = 10%. At 12:00 on October 10, due to the update of the usage rate, Xiao Ming’s The annual interest rate on the loan became 15%. Xiao Ming decided to repay all the debts with interest at 13:00 on October 10th

How much does Xiao Ming need to pay in total?

In 11:00~12:00, the annual interest rate of borrowing = 10%, so Xiao Ming needs to pay more: 100,000 x 0.1 x 240 / 2,102,400 approximately = 1.14 DAI
(240 blocks are generated in 1 hour , 2,102,400 blocks are generated in a year) from 12:00~13:00, the annual interest rate of borrowing = 15%, so Xiao Ming needs to pay more: (100,000 + 1.14) x 0.15 x 240 / 2,102,400 approximately = 1.71 DAI
(Note that the last interest needs to be included here) Therefore, Xiao Ming needs to pay a total of:
100,000 + 1.14 + 1.71 = 100,002.85 How does DAI ensure that the borrower repays the money?

As mentioned above, borrowers need to mortgage assets. If there is insufficient repayment, the mortgaged assets will be sold (liquidated) at a price lower than the market price.

Each asset on Compound has its mortgage rate, that is, if you mortgage this asset, you can use the proportion of this asset to borrow other assets.


Collateral Factor

Take the above example:

Suppose Xiaomei wants to mortgage ETH to borrow DAI, so Xiaomei mortgages 3 ETH, Assume that the current market price is 1 ETH = 200 USD, so Xiaomei mortgaged assets equivalent to 600 USD.Produce. Since the ETH mortgage rate = 0.75, the maximum asset that Xiaomei can actually borrow = 600 x 0.75 = 450 USD. Xiaomei then borrowed 445 DAI (assuming the current market price of 1 DAI = 1 USD). Assume that after a period of time, Xiaomei 6 DAI of interest needs to be repaid, and 6 + 445 = 451 USD, which has exceeded the maximum amount of assets that Xiaomei can borrow, but Xiaomei has not yet made any move to repay it. As a result, part of Xiaomei's mortgaged assets will be liquidated. Since a total of 451 USD needs to be repaid, at most half (451 / 2) of the loaned assets will be liquidated under Compound's liquidation mechanism. For example: Xiaomei's 200 USD is liquidated, multiplied by a ratio, assuming it is 1.1, Xiaomei's 220 USD of ETH, that is, 1.1 ETH will be confiscated, and then Xiaomei's debt of 200 USD (200 DAI) will be repaid. So after the liquidation, Xiaomei was deducted 1.1 ETH (equivalent to 220 USD). After repaying 200 USD of DAI, there is still 451–200 = 251 USD that needs to be repaid.
(In actual operation, it is open to anyone. If you help Xiaomei repay 200 DAI, you can get 1.1 ETH of Xiaomei’s mortgage, so you have a 10% profit) At this time, the remaining ETH of Xiaomei’s mortgage is 1.9 ETH, so the maximum asset that can be borrowed currently = 1.9 x 200 x 0.75 = 285 USD > 251 USD that needs to be repaid, and the liquidation is completed. Conclusion

Here is a summary of the key points and benefits of Compound’s interest rate model:

Instant lending generates interest, instant loan repayment, there is no problem of one-to-one loan matching, as long as you hold cDAI you can receive The interest rate of DAI is equivalent to the successful loan utilization rate (Utilization Rate), which is the main factor that affects the Compound lending rate. The interest rate is updated every 15 seconds (1 block), which is equivalent to the interest paid every 15 seconds for lending. The liquidation mechanism can avoid borrowing money. If you don’t repay, protect the rights and interests of the lender

本文来源: 网络 文章作者: 网络投稿
    下一篇

目前全球已经有很多行业领域都在积极探索区块链技术,作为一个分布式账本式的去中心化数据库,区块链运用在现实生活中的很多领域,比如金融、互联网、医疗、房地产、旅游、司法、票务等各个企业。区块链怎么赚钱?以