How is Coinversation's mortgage pool debt ratio calculated and adjusted in real time?
丨密码极客丨
2020-10-15 08:39
本文约855字,阅读全文需要约3分钟
How is the mortgage pool debt ratio calculated and adjusted in real time in Coinversation.

In the last issue, we talked about the liquidity mining example of Coinversation Protocol:Coinversation Protocol operation example series (1)

Today we use several examples to explain to you how the mortgage pool debt ratio in Coinversation is calculated and adjusted in real time.

In Coinversation, users generate synthetic asset stablecoins cUSD by mortgaging CTO or DOT, and the system determines their respective debt ratios according to the ratio of the amount of cUSD generated by each user to the total synthetic assets.

Note that as long as the mortgage rate is met, the calculation of the debt ratio here has nothing to do with the amount of CTO or DOT mortgaged by the user, but only with the amount of cUSD generated.

Example 1: Assuming that there are only two users, A and B, in the entire system, A and B each generate 10,000 cUSD after mortgaging a certain amount of CTO, that is, the system generates a total of 20,000 cUSD.

At this time, the debt ratio of user A is 10000/20000=50%, and the debt ratio of user B is also 10000/20000=50%.

Example 2: Immediately after Example 1, assuming that a new user C joins, 20,000 cUSD are newly generated, and the total cUSD balance of the system becomes 40,000 at this time.

Therefore, the debt ratio of users A and B is adjusted to 10000/40000=25%, while the debt ratio of new user C is 20000/40000=50%.

Example 1 illustrates the generation of the debt ratio in the initial state of the system, and Example 2 illustrates how new users will affect the re-division of the debt ratio. An example of a more general case follows.

Example 3: Assuming that the entire system has generated 10 million cUSD, a new user X joins and generates 10,000 cUSD. Then the debt ratio of user X is 10000/(10000+10000000)=0.0999%.

Assuming that there is an old user A whose debt ratio is 0.2%, then after X joins, the debt ratio of user A becomes 0.2%×10000000/(10000+10000000)=0.1998%. By analogy, we can calculate the change in the debt ratio of all users.

The above is the calculation of the mortgage pool debt ratio in Coinversation. In the next issue, we will continue to introduce how Coinversation uses the debt ratio to calculate the profit and loss of synthetic asset contract users, and what impact asset price changes will have.

丨密码极客丨
作者文库