bitshares / bsips

BitShares Improvement Proposals and Protocols. These technical documents describe the process of updating and improving the BitShares blockchain and technical ecosystem.
https://bitshares.github.io
63 stars 86 forks source link

New BSIP: Debt Asset Feature - MPLP (Margin Position Liquidity Pool) #182

Open froooze opened 5 years ago

froooze commented 5 years ago
BSIP: 
Title: Debt Asset Feature - MPLP (Margin Position Liquidity Pool)
Author: [bench] <https://github.com/froooze>
Status: Draft
Type: Protocol
Created: 2019-08-27
Discussion: https://github.com/bitshares/bsips/issues/182

Abstract

  1. The MPLP enables a lower maintenance collateral ratio (mcr) with mcr < MCR and mcr > 1 by borrowing extra debt asset with interest.
  2. The liquidity pool enables the debt asset holder to earn interest through lending.
  3. The internal maintenance collateral ratio (mcr) is changed, but not the internal collateral ratio (cr).
  4. When extra debt asset is removed mcr = MCR again.

    Motivation

    • No motivation to create bitAssets #189
    • Liquidity is eaten away by BTS shorter and not used to increase the CR of debt holder #181
    • Increasing CR only possible, when collateral is increased or debt is reduced
    • Low balance of the shorting asset by the shorter
    • Small price decrease triggers margin call wall and suppresses price further
    • Increasing MSSR does also increase premium, selling pressure and penalty

Rationale

Definitions

Boundaries

Margin Position Holder

Liquidity Pool

Solution

Pools

Timing

Interest

Liquidity Pool Portion

Sub pools

Distribution

Margin Call Gap

Margin Calls

Partial 1

Partial 2

Full

The full margin call does change the ownership of the collateral, extra debt asset and interest to the liquidity pool. The remaining debt/debt asset is covered by the insurance pool.

Recovery

The MPLP allows during a full margin call, to get the margin position with extra funds back. The cr needs to be increased with extra collateral or debt asset to mcr. This is only possible until all collateral is sold.

System Risk

Parameters

The insurance pool covers the system risk, when:

Example

Stage 1

Stage 2

Stage 3

Stage 4

Stage 5

After 14 days the 65 bitUSD balance gets removed from extra asset balance, if the user doesn't add extra funds to interest balance. Chances to get are margin call are now high because CR gets now reduced to cr.

Conclusion

Comparison

Case MPLP MPL BSIP-70
Motivation interest rate market fee interest rate
Borrower peer blockchain peer
Input debt asset BTS/every asset every asset
Purpose increase CR & debt increase liquidity lending/trading
Collateral no no yes
Order book no no yes

Discussion and Summary for Shareholders

The MPLP provides a free market solution to evaluate the best CR in terms of risk/reward or cost/reward based on the market liquidity. The MPLP enables a voluntary extra risk level for margin position holders, which is fully compatible to our current market mechanics. The amount of debt, which can be borrowed from blockchain and the system risk is here not increased.

Negative Feedback Loops

Proof of stake

The possibility to stake debt asset and profit from the interest, will increase supply of debt asset and demand for BTS. A lot of successful coins have staking options, which is still missing in the BitShares ecosystem.

CR and Debt increase

Because the user gets a third option to increase CR from the liquidity pool with extra asset balance, no debt needs to be paid back.

Interest Rate

The liquidity pool tries to find a fair market price for the inequity of debt asset distribution.
A higher interest rate means more inequity, which results in a higher debt asset supply for the liquidity pool.

Market Liquidity

Markets with lower liquidity have a higher value for min mcr, a, b and interest fee.

Worker Cost Reduction

Worker payments are hold in bitFIAT. The option to earn interest on bitFIAT, does reduce the worker costs and demand for BTS from the reserve pool.

See also

Changes

Copyright

This document is placed in the public domain.

abitmore commented 5 years ago

Another related discussion is #164 .

froooze commented 5 years ago

https://medium.com/aave/decentralized-lending-pool-dlp-protocol-launched-on-testnet-swap-between-fixed-and-variable-e72ae43992c

Decentralized insurance fund, which will collect a small part of the pool income to cover losses in case of liquidation issues.

Why should we not do the same?

Inmortak commented 5 years ago

Hey guys, I wrote the following analysis regarding the issue. GS is only the manifestation of some more profound structural flaws in the Bitshares protocol. It's a pretty long read but, nonetheless worth the time.

Eliminating` the negative impact of Global Settlement events (GS) is certainly a priority for the Bitshares ecosystem. Currently, GS is widely regarded by the Bitshares community as a natural consequence of harsh market conditions, bad debtors and poor marketing strategy. Contrary to this perspective, I maintain here, that GS might be the consequence of some other more fundamental factors in the dynamics of the whole Bitshares protocol. I postulate that if these factors are modified, the probability of a GS or a similar event is drastically reduced almost immediately and may even tend to disappear in the long term. These factors include, but may not be limited to, two feedback loops currently present in the dynamics of workers’ financing and Margin calls. This work attempts to elucidate the architectural nature of the problem, out of which GS is only an inevitable result. Also, a new mechanism is proposed.

https://steemit.com/bitshares/@aguerrido/feedback-loops-and-analysis-of-bitshares-architecture-in-relation-to-smart-assets-sustainability

froooze commented 5 years ago

@Inmortak:

First, the Settlement fund takes over the bad position, both the debt and the collateral. The choice of words here is important. The fund doesn’t buy the position, it takes over it. The former holder doesn’t own the position any more, nor he has any debt to pay. Also, the position doesn’t disappear, it still exist with a new owner:

  1. We don't need extra funds to take over positions, partial GS could do this also
  2. We need funds to reduce bad debt, what you did not intended
  3. I would call this swap and not settlement
  4. What happens with the positions, when BTS price falls further and CR goes under 1?
  5. The margin call has also a negative feedback loop you missed:
    • demand for BTS increases, because you need more BTS to cover the margin position
    • buying side has more power with lower price
Inmortak commented 5 years ago
1. We don't need extra funds to take over positions, partial GS could do this also

Hey Froooze!

Where can I get the details of how partial GS would work?

2. We need funds to reduce bad debt, what you did not intended

Why is that? If the system just takes over positions before the fall under CR < 1, what extra funds would be needed?

4. What happens with the positions, when BTS price falls further and CR goes under 1?

Read my complete analysis here. I also consider that case.

5. The margin call has also a negative feedback loop you missed:

* demand for BTS increases, because you need more BTS to cover the margin position

* buying side has more power with lower price

Yep, that's another feedback. But, it is conducted by the debtors under margin call, the feedbacks I consider are conducted by the workers and the debtors. Under the current protocol the debtors, both have their collateral of their position put on sale (first feedback) and have to buy more collateral (another feedback). They appear in both feedbacks, although not with the same force.

biophil commented 5 years ago

As promised on bitsharestalk, here are my quick comments/questions.

I'm afraid the BSIP is written too ambiguously for me to be completely sure what its author intended.

As far as I can tell, the pool seems to be trying to do a lot of things, which makes it very difficult to determine whether those things are likely to have the intended effects. You describe several different ways money gets into the pool, and several different ways money leaves the pool, but none of these mechanisms are clear.

Here are some questions I had after trying to understand the BSIP:

Does the pool buy low-CR positions, or are low-CR positions confiscated and put into the pool? If the latter, how does your mechanism ensure that there is enough collateral for the the smartcoin?

What is the mechanism for the BTS buyback? A market order?

What is the staking mechanism? Are you implying that people will lend money to the pool at interest?

Have you worked out a flow chart for this? I think seeing a graphical picture of the whole system you're proposing would help tremendously.

froooze commented 5 years ago

@biophil: Thank you for your feedback!

Does the pool buy low-CR positions, or are low-CR positions confiscated and put into the pool? If the latter, how does your mechanism ensure that there is enough collateral for the the smartcoin?

The debt asset is used to buy BTS from margin positions, which have a CR of settlement ratio or lower.

What is the mechanism for the BTS buyback? A market order?

Settlement

What is the staking mechanism? Are you implying that people will lend money to the pool at interest?

There is no interest rate only speculation to buy cheap BTS or enable everyone to borrow at lower CR.

Have you worked out a flow chart for this? I think seeing a graphical picture of the whole system you're proposing would help tremendously.

I try to add a flow chart.

MichelSantos commented 5 years ago

@froooze

MichelSantos commented 5 years ago

What is the staking mechanism? Are you implying that people will lend money to the pool at interest?

There is no interest rate only speculation to buy cheap BTS or enable everyone to borrow at lower CR.

@froooze About "enable everyone to borrow at lower CR.": how does borrowing at lower CR happen? Is this a part of the proposal?

Or is the idea that after a depositor gets cheap BTS they might optionally use that compensation to borrow more of the debt asset from their own account?

froooze commented 5 years ago

@MichelSantos

where do the funds from the liquidity pool come from? My reading of the "Proof of stake" section suggests that any holders of a smartcoin (e.g. holders of bitUSD) can deposit some amount of their smartcoin into the liquidity pool. Is this correct?

This is correct every asset, which can be borrowed has a liquidity pool.

* _Which liquidity pools?_: Can the target asset be anything besides BTS?  Which liquidity pair pools will exist?  Who can determine which liquidity-pair pools will exist?

There exists no pair, because you can't trade the debt asset from the liquidity pool. Only locking up next to your debt position is possible to increase the CR.

* _Asset type of compensation to depositors_: Depositors are incentivized to do so because they will be compensated in some way.  Will the compensation be in terms of the "target asset" of the liquidity pool (e.g. BTS?)

The liquidity pool holds only debt assets no BTS. Compensation could be in the specific debt asset or in settled debt asset (BTS).

* _Compensation Amount_: Will compensation be determine based on some of the interest ideas from the [Decentralized Lending Pool article](https://medium.com/aave/decentralized-lending-pool-dlp-protocol-launched-on-testnet-swap-between-fixed-and-variable-e72ae43992c)?  Therefore the interest payment is variable and depends both on the supply provided by the depositors, and the demand of the "bad debt".  If there is no bad debt, then interest will be zero?

This is right, but when there is no demand to cover bad debt, like in an uptrend the requirements to borrow extra debt from the pool, can be lowered. Or you get a higher interest rate for #189?

* _Withdrawals_: Can a deposit be withdrawn?

Yes the deposit can be withdrawn after a certain time from the pool. The withdraw is linear and limited by the size of the whole pool.

  * If so, can the withdrawal be in terms of the original deposit asset, or only in terms of the target asset?  In other words, If I deposit 100 bitUSD into a "bitUSD for BTS Liquidity-pair pool", can I ever withdraw any bitUSD?

After you have withdrawn the 100 bitUSD from the pool, the interest rate for the whole pool will rise.

  * Is there a concern that a "successful" liquidity pool may consume all of the deposits?  How will depositors be compensated?

The lender gets compensated by the borrower with the interest rate of the liquidity pool.

froooze commented 5 years ago

@froooze About "enable everyone to borrow at lower CR.": how does borrowing at lower CR happen? Is this a part of the proposal?

This is part of the old design (settlement fund) and needed a rewrite, because of these flaws:

MichelSantos commented 5 years ago
* _Which liquidity pools?_: Can the target asset be anything besides BTS?  Which liquidity pair pools will exist?  Who can determine which liquidity-pair pools will exist?

There exists no pair, because you can't trade the debt asset from the liquidity pool. Only locking up next to your debt position is possible to increase the CR.

I'm afraid that I'm missing several fundamental ideas so I hope that you don't mind multiple questions.

The CR of "what"? Who owns the "what"? Is it owned collectively, or do different people own portions of the "what"? Is it the lender, borrower, or someone else who own the "what"?

How is CR defined? Is the CR the collateral ratio of all the different debt positions for that asset?

Whose debt position? The lender, the borrower, a third party? Does this debt position exist separate from this liquidity pool? Or does it only exist when this liquidity pool is used?

When someone borrows from the liquidity pool: what are they permitted to do with what they have borrowed?

How does having a liquidity pool change the CR? Is the liquidity pool being used by a blockchain algorithm to purchase margin calls?

* _Asset type of compensation to depositors_: Depositors are incentivized to do so because they will be compensated in some way.  Will the compensation be in terms of the "target asset" of the liquidity pool (e.g. BTS?)

The liquidity pool holds only debt assets no BTS. Compensation could be in the specific debt asset or in settled debt asset (BTS).

Who decides what the compensation will be paid in? Is it an algorithm in the blockchain logic that decides?

froooze commented 5 years ago

The CR of "what"? Who owns the "what"? Is it owned collectively, or do different people own portions of the "what"? Is it the lender, borrower, or someone else who own the "what"?

CR is always tided to a margin position of one debt asset and user. (old)

How is CR defined?

https://how.bitshares.works/en/master/bts_holders/dex_margin_mechanics.html#how-is-the-collateral-ratio-cr-calculated

Is the CR the collateral ratio of all the different debt positions for that asset?

No (old)

Whose debt position? The lender, the borrower, a third party?

It is the debt/margin position, which is created by the borrower. (old)

Does this debt position exist separate from this liquidity pool?

Yes (old)

Or does it only exist when this liquidity pool is used?

It is independent from liquidity pool. (old)

When someone borrows from the liquidity pool: what are they permitted to do with what they have borrowed?

They can increase the CR of their margin position, without paying back the debt in the margin position, by locking separately the debt asset in extra asset balance to the margin position. (new)

How does having a liquidity pool change the CR? Is the liquidity pool being used by a blockchain algorithm to purchase margin calls?

No, the liquidity pool provides the option to borrow the debt asset back to increase the CR without selling collateral or reducing the debt of the margin position. (new)

Who decides what the compensation will be paid in? Is it an algorithm in the blockchain logic that decides?

The lender, who provides the debt asset to the liquidity pool decides, if he wants to be paid in the debt asset or in settled debt asset (BTS).

I'm afraid that I'm missing several fundamental ideas so I hope that you don't mind multiple questions.

The whole liquidity pool doesn't touch the current margin position system. It unites the two parties BTS/debt holder and debt asset holder with the liquidity pool and interest rate for the debt asset lender.

Inmortak commented 5 years ago

I could support this

(Sapiens)

MichelSantos commented 5 years ago

@froooze Thank you for the helpful explanations. To help our discussion further, I'd like to define the following parties:

  1. Blockchain
  2. Account Alice: The blockchain lent 333 bitUSD to Alice in exchange for 10k BTS as collateral (i.e. Alice shorted the 333 bitUSD into existence). This collateral is held by the blockchain until the 333 bitUSD is returned by closing the debt or through force settlement)
  3. Account Bob: Alice then sold the 333 bitUSD to Bob
  4. Account Charlie: Charlie lent 67 bitUSD to the liquidity pool

There are effectively three loans involved with your example:

Original MPA loan: The blockchain lent 333 bitUSD to Alice Funding of Liquidity Pool: Charlie lent 67 bitUSD to the liquidity pool Borrowing from liquidity pool: Liquidity pool lent 67 bitUSD to Alice

This is before any discussion of the CR.

Do we agree on this description?

Stage 5

  • The 67 bitUSD gets locked to the margin position, without paying back the 333 bitUSD debt
  • 9.992k BTS as collateral
  • 333 bitUSD debt
  • 67 bitUSD extra asset balance
  • 267 bitUSD overall debt
  • CR = 1.5

With your example, the CR increases from 1.2 in Stage 2 to 1.5 in Steg 5. This occurs in your example not because the collateral has increased but because the debt owed by Alice to the blockchain has effectively decreased from 333 bitUSD to 267 bitUSD.

For this to be true means that the blockchain must have the option to confiscate that 67 bitUSD to satisfy potential force settlements that require closing Alice's debt by the blockchain.

Do we agree on this point?

Consequently if the 67 bitUSD is confiscated by the blockchain, how can the liquidity pool pay back Charlie?

Stage 4

  • Interest for the 66 bitUSD: 0.33 bitUSD
  • Margin call for the interest: 8 BTS

Margin callling some of the collateral to pay interest results in less collateral which results in a lower CR.

Do we agree on this point?

With enough interest payments, Alice's debt to the blockchain will have less and less collateral. An extreme case could be:

Collateral: 0 BTS Original debt: 333 bitUSD Extra asset balance: 333 bitUSD Overall debt owed by Alice to the blockchain: 0 bitUSD

Overall debt owed by Alice to the liquidity pool: 333 bitUSD Overall debt owed by liquidity pool to Charlie: 333 bitUSD

Do we agree on this description?

froooze commented 5 years ago

@MichelSantos:

Consequently` if the 67 bitUSD is confiscated by the blockchain, how can the liquidity pool pay back Charlie?

  1. I do agree on all your examples
  2. Paying the interest from the margin position is possible, but has its limitations, because system risk is increased
  3. Paying the interest from an external source is more sustainable
  4. The margin position needs always CR > 1 without the extra debt asset, to be able to remove the extra debt asset, when interest is not paid to the reward pool anymore
pmconrad commented 5 years ago

The margin position needs always CR > 1 without the extra debt asset,

But doesn't that requirement make the whole concept moot? When you talk about "lowering the CR" you talk about the CR with the extra debt asset, but the CR that must be maintained in margin calls and settlements is the CR without it. Which means the effective CR is always the same as it would be without the liquidity pool. Or did I miss something?

froooze commented 5 years ago

But doesn't that requirement make the whole concept moot?

No, because user can now trade with a lower internal collateral ration (cr) ≥ 1, without increasing the system risk.

MichelSantos commented 5 years ago

Consequently` if the 67 bitUSD is confiscated by the blockchain, how can the liquidity pool pay back Charlie?

* the percentage of the borrowed part does increase in the `liquidity pool`, by removing the non borrowed part of the `liquidity pool`

I did not understand this comment. May I ask you to re-express it, please?

1. I do agree on all your examples

Thank you for confirming

2. Paying the interest from the margin position is possible, but has its limitations, because system risk is increased

3. Paying the interest from an external source is more sustainable

I agree with both of these points. I actually think that it might be necessary to use external source to pay the interest because, as I see MPA loans, the original collateral truly belongs to the blockchain until either (a) the original debt (bitUSD) is closed by the original MPA borrower or (b) the current holder of the bitUSD redeems the bitUSD for the underlying collateral.

I can write up my understanding, if you think it will help our discussions, of how the assets and liabilities of the blockchain, Alice, Charlie, and the liquidity pool are changing during these different moments in time.

MichelSantos commented 5 years ago

No, because user can now trade with a lower internal collateral ration (cr) ≥ 1 without increasing the system risk.

This might be central to my difference in understanding.

Could you define the internal CR and external CR? And for both CRs, who do you consider to own the collateral (whose asset is it)? And who do you think is the legitimate controller of it (who is authorized to transfer ownership of it)?

If you will indulge me, I will describe how I see the collateral when an account borrows a regular smart coin from the blockchain (and let us ignore the proposed liquidity pool). The collateral that is provided by a smart coin borrower is an asset that belongs to the borrower; but the collateral is escrowed with the blockchain and is encumbered. The borrower may not withdraw the encumbered collateral (below the amount that satisfies the MCR) until the borrower pays it back the loan. However, the blockchain may confiscate it if the holder of the smart coin redeems (force settles) the debt to obtain the underlying collateral. In summary the collateral is an encumbered asset of the borrower. And it is controlled by the blockchain while the debt is outstanding.

froooze commented 5 years ago

Consequently` if the 67 bitUSD is confiscated by the blockchain, how can the liquidity pool pay back Charlie?

Charlie needs to wait time threshold, before he can remove the bitUSD. During the time threshold every new contract for a borrower gets less bitUSD addressed and interest rates rises also for every new lender.

  1. Paying the interest from an external source is more sustainable

I introduced for this interest balance, which needs to be filled with debt asset

I can write up my understanding, if you think it will help our discussions, of how the assets and liabilities of the blockchain, Alice, Charlie, and the liquidity pool are changing during these different moments in time.

The blockchain holds always the bitUSD, until Alice or Charlie decides to remove the extra debt asset from the margin position or liquidity pool

Could you define the internal CR and external CR?

Yes, I did now above.

And for both CRs, who do you consider to own the collateral (whose asset is it)?

Collateral and extra debt asset is owned by blockchain

And who do you think is the legitimate controller of it (who is authorized to transfer ownership of it)?

The extra debt asset can immediately be removed from margin position by transferring to the liquidity pool, but needs time threshold to be available in the user account of the lender.

And it is controlled by the blockchain while the debt is outstanding.

The right system of the liquidity pool, is only controlled by parameters and blockchain.

pmconrad commented 5 years ago

No, because user can now trade with a lower internal collateral ration (cr) ≥ 1 without increasing the system risk.

froooze commented 5 years ago
* IMO the trades of the user do not affect the system risk anyway.

System risk is covered through reserve pool

* IMO the system risk is increased if you take into account the fact that the `extra_debt_asset` (plus interest!) has to be paid back at some point.

extra_debt_asset has to be never paid back, unless the borrower violates the boundaries or a higher interest rate reduces the supply of the liquidity pool.

* The risk of an individual user's position varies, e. g. depending on ccr. This is not reflected in the interest rate the user has to pay. IMO this is an invitation for abuse.

Wrong: interest = extra debt asset (a 1/cr + b (1/cr)² + c (1/cr)³ ) * interest rate

* Selling all collateral in a full margin call is a bad idea IMO because a large dump will crash the price, with the result that only a small fraction of the debt will be recovered from the market. 

Wrong:

pmconrad commented 5 years ago

Wrong: interest = extra debt asset (a 1/cr + b (1/cr)² ) interest rate

You just made that up, didn't you? I'm sure that line read differently yesterday. So I wasn't wrong.

The dump is only one account and not the whole market as price drops

So? One large debt position that is resolved can easily crash the internal market. Note that this happens when cr < 1, i. e. selling the collateral will definitely not recover the full debt.

A user, who already has paid interest to maintain cr of 1, has a higher interest to increase collateral and not loose the whole margin position

I don't think so. He has paid the interest and it's gone. To a rational investor, the situation is the same as before.

froooze commented 5 years ago

You just made that up, didn't you? I'm sure that line read differently yesterday. So I wasn't wrong.

Yes and no. I original posted the basic equation with, before you answered.

So? One large debt position that is resolved can easily crash the internal market.

No debt position does crash the market, people with liquid BTS crash the market. Margin positions suppress the market, after price has crashed, but it is not the reason for price movement.

Note that this happens when cr < 1, i. e. selling the collateral will definitely not recover the full debt.

Because of this risk there is a reserve pool mainly financed by interest from positions whit low cr, to cover these risks.

I don't think so. He has paid the interest and it's gone. To a rational investor, the situation is the same as before.

When he is gone, his margin position gets called and removed from blockchain.

ioBanker commented 5 years ago

I really appreciate your great efforts @froooze

I believe solving this issue is very important for the future of BitShares.

pmconrad commented 5 years ago

No debt position does crash the market, people with liquid BTS crash the market.

Right now the 10 least collateralized positions on CNY have a total collateral of more than 2M BTS and a CR of less than 1.61. If these 2M were sold on the internal market as proposed here, the price (CNY/BTS) would instantly jump 10% down. This also means that you'd end up with perhaps only 95% of the debt covered.

And CNY is our most liquid market. On an illiquid market the situation could be catastrophic in the sense that the whole collateral is sold for 1 satoshi of debt.

froooze commented 5 years ago

If these 2M were sold on the internal market as proposed here, the price (CNY/BTS) would instantly jump 10% down.

This was only the case when MSSR was 1.1, but with 1.01, this is not valid anymore. Margin calls suppress price and removes liquidity, but no margin call does decrease price by itself.

This also means that you'd end up with perhaps only 95% of the debt covered.

And CNY is our most liquid market. On an illiquid market the situation could be catastrophic in the sense that the whole collateral is sold for 1 satoshi of debt.

pmconrad commented 5 years ago

This was only the case when MSSR was 1.1, but with 1.01, this is not valid anymore. Margin calls suppress price and removes liquidity, but no margin call does decrease price by itself.

I'm talking about margin calls as per OP:

if cr ≤ 1 than sell all collateral and remove extra debt asset

Selling all collateral into the market will crash the price, like any other big sell order will. This has nothing to do with MSSR. By selling a large amount you'll end up with an average price much worse than current market price, in other words you recover much less debt than you'd think when looking at the current market price.

Ending up with less is not a problem, when reserve pool covers the losses

I doubt that the pool will be able to cover all losses.

Bad liquidity is the biggest problem on the bitAssets markets and the liquidity pool does increase liquidity

The pool does not increase liquidity by itself. It provides a certain incentive for traders to increase liquidity, but incentives do not always work (as we have learned in the past, otherwise we wouldn't be talking about this).

froooze commented 5 years ago

Selling all collateral into the market will crash the price, like any other big sell order will. This has nothing to do with MSSR. By selling a large amount you'll end up with an average price much worse than current market price, in other words you recover much less debt than you'd think when looking at the current market price.

  1. Only the collateral from one position gets sold at once
  2. Selling collateral as a maker does suppress the price, but does not decrease price
  3. Selling collateral as a taker does decrease price (which is not the case here)
  4. MSSR is an important part here
  5. Because you can set ccr = 1.01, doesn't mean you should do this, because after a small price drop you loose your collateral, the paid interest and extra debt asset

I doubt that the pool will be able to cover all losses.

This has nothing to do with doubt, but with the right parameters for the liquidity pool and how insurance works. The current insurance (collateral) is 100% dependent on the collateral price. The reserve pool insurance is 100% independent from the collateral price.

The pool does not increase liquidity by itself. It provides a certain incentive for traders to increase liquidity, but incentives do not always work (as we have learned in the past, otherwise we wouldn't be talking about this).

It does by allowing margin positions with less collateral and creating a motivation (interest) to borrow debt asset for the liquidity pool, without extra risks/tasks (trading) for the extra debt asset lender.

pmconrad commented 5 years ago

Only the collateral from one position gets sold at once

The situation in CNY shows that many shorters keep their CR on a similar (low) level. I think it is safe to assume that a price drop by a couple of % can lead to many positions being sold at once (or within a very short timeframe).

Selling collateral as a maker does suppress the price, but does not decrease price Selling collateral as a taker does decrease price (which is not the case here)

Wording of OP implies a taker order. Otherwise please specify sell price.

This has nothing to do with doubt, but with the right parameters for the liquidity pool and how insurance works.

It has to do with the question if the pool will hold enough funds. In a BTS downtrend, people will be unlikely to lend bitAsset to the pool.

It does by [...] creating a motivation [...], without extra risks

That's what I said. Motivation != action. And of course there is an extra risk, namely that the fund has to cover shorter's losses and is then unable to pay back the lent assets.

froooze commented 5 years ago

The situation in CNY shows that many shorters keep their CR on a similar (low) level. I think it is safe to assume that a price drop by a couple of % can lead to many positions being sold at once (or within a very short timeframe).

  1. Amount to borrow from blockchain is still limited and higher (1.55)
  2. Because we allow at the moment only one risk level, with limited consequences (partial margin call), doesn't mean every user will set the maximum risk limit on the liquidity pool.
  3. People with low ccr will lose most of the time, the biggest amount, because of market manipulation (visible stop loss)

Wording of OP implies a taker order. Otherwise please specify sell price.

Margin call is a maker sell order with discount (MSSR)

It has to do with the question if the pool will hold enough funds. In a BTS downtrend, people will be unlikely to lend bitAsset to the pool.

  1. In a downtrend more people will violate the boundaries than in an uptrend, therefore more extra debt asset gets available
  2. When pool has not enough funds interest rate increases
  3. In a downtrend user, who wanna stake debt asset will choose a higher CR
  4. User can be borrower and lender at the same time for extra debt asset

That's what I said. Motivation != action.

The right motivation gives always the right action. At the moment we have no motivation and no action.

And of course there is an extra risk, namely that the fund has to cover shorter's losses and is then unable to pay back the lent assets.

We have this problem already today. Extra risk is covered by reserve pool, which has debt asset and is independent from collateral price. Even short term shortage on the reserve pool is only a problem, when everyone wants to remove liquidity at the same time and no new liquidity comes.

MichelSantos commented 5 years ago

Could you define the internal CR and external CR?

Yes, I did now above.

Thank you @froooze

Consequently` if the 67 bitUSD is confiscated by the blockchain, how can the liquidity pool pay back Charlie?

Charlie needs to wait time threshold, before he can remove the bitUSD. During the time threshold every new contract for a borrower gets less bitUSD addressed and interest rates rises also for every new lender. ... The blockchain holds always the bitUSD, until Alice or Charlie decides to remove the extra debt asset from the margin position or liquidity pool

I am seeing two problems in this reply:

  1. If Alice's 333 bitUSD debt position is the least collateralized debt position when a force settlement comes due, and if the debt position's collateral (e.g. BTS) is valued at only 200 bitUSD, how will the blockchain pay 333 bitUSD worth of BTS to the force-settler?

  2. Elsewhere you wrote "Because of this risk there is a reserve pool mainly financed by interest from positions whit low cr, to cover these risks." and in "Extra risk is covered by reserve pool, which has debt asset". How will the reserve pool pay the force settler in the collateral asset (e.g. BTS)?

shulthz commented 5 years ago

Something like Debt Financing.

pmconrad commented 5 years ago

Margin call is a maker sell order with discount (MSSR)

But that's just the mechanism that we have now! Reality shows that in a downtrend margin calls are not bought up sufficiently quickly, which leads to global settlement. Your proposal does not change that then. Also you haven't answered how a forced settlement request is fulfilled in that situation.

When pool has not enough funds interest rate increases

Even if the interest rate increases that does not guarantee that more debt asset is being lent to it, nor that the income is sufficient to cover the losses. Except perhaps if the interest rate is so ridiculously high that nobody will use the pool.

In a downtrend user, who wanna stake debt asset will choose a higher CR

The current situation in CNY disproves that. Many short positions are kept deliberately at the lowest allowed CR.

User can be borrower and lender at the same time for extra debt asset

That doesn't even make sense. In a downtrend, a rational user would/should use debt asset to pay back his loan and make his position more secure. Lending it to the pool exposes him to extra risk, with no chance to profit from that (interest paid will exceed interest received due to fee).

Except perhaps if his position is already so far below MCR that his long position would not cover it sufficiently. In that case he'd probably prefer his short position to be rescued by the pool, while he uses the long position to profit from that. I don't think this is desirable.

The right motivation gives always the right action.

This is a meaningless generic answer. Obviously, there are limits to what motivation we can offer. The result is that we cannot enforce "the right action". We can only provide limited incentives and hope that people react on them. History (MSSR/settlement offset/MCR discussions during the past 2 years) shows that they don't, or at least not necessarily in the right way.

froooze commented 5 years ago

@MichelSantos

1. If Alice's 333 bitUSD debt position is the least collateralized debt position **when a force settlement comes due**, _and_ if the debt position's collateral (e.g. BTS) is valued at only 200 bitUSD, how will the blockchain pay 333 bitUSD worth of BTS to the force-settler?

He has always to maintain a cr > 1

2. "Because of this risk there is a reserve pool mainly financed by interest from positions whit low cr, to cover these risks." and [in](#issuecomment-529117931) "Extra risk is covered by reserve pool, which has debt asset".  How will the reserve pool pay the force settler in the collateral asset (e.g. BTS)?

When cr ≤ 1 his margin position gets removed from the list. All his collateral, extra debt asset and the interest he paid in front is now owned by the liquidity pool. The collateral is sold in form of a margin call and the difference in debt/debt asset is covered by the reserve pool.

@pmconrad

But that's just the mechanism that we have now! Reality shows that in a downtrend margin calls are not bought up sufficiently quickly, which leads to global settlement. Your proposal does not change that then.

The mechanism works in a liquid market very good and in an inliquid market very bad. I made in my proposal very clear how liquidity is improved. A market with increases demand for debt asset, which tries to sort out the best ccr dependent on extra debt asset and market liquidity.

Also you haven't answered how a forced settlement request is fulfilled in that situation.

I did now above.

Even if the interest rate increases that does not guarantee that more debt asset is being lent to it, nor that the income is sufficient to cover the losses. Except perhaps if the interest rate is so ridiculously high that nobody will use the pool.

I added: min ccr(cr, liquidity pool 1 & 2) -> no liquidity pool 1 ccr = CCR

The current situation in CNY disproves that. Many short positions are kept deliberately at the lowest allowed CR.

This shows the current mechanic is not flexible enough. With the liquidity pool the 1.5 user are than split in 1.1, 1.2, 1.3, 1.4 and 1.5. The free market can decide dependent in liquidity, which position has the best risk/reward.

That doesn't even make sense. In a downtrend, a rational user would/should use debt asset to pay back his loan and make his position more secure. Lending it to the pool exposes him to extra risk, with no chance to profit from that (interest paid will exceed interest received due to fee).

This makes sense, because I don't need to sell my collateral, but I can close my debt position by removing debt asset from the liquidity pool.

Except perhaps if his position is already so far below MCR that his long position would not cover it sufficiently. In that case he'd probably prefer his short position to be rescued by the pool, while he uses the long position to profit from that. I don't think this is desirable.

Why should he pay interest in front, when he will loose 100% of his position? Losing the long position is much worse than winning the short position.

This is a meaningless generic answer.

Yes, but I already wrote a lot about this.

Obviously, there are limits to what motivation we can offer. The result is that we cannot enforce "the right action". We can only provide limited incentives and hope that people react on them. History (MSSR/settlement offset/MCR discussions during the past 2 years) shows that they don't, or at least not necessarily in the right way.

I agree here, tuning MCR/MSSR does not improve the situation, because these parameters are already optimized. I also did not touch the MCR/MSSR parameter. Adding a complete new abstraction layer, which is fully compatible to our basic layer, does change a lot of things. It gives traders more flexibility (liquidity) and gives borrower more motivation (interest) without taking risk/action (trading).

Why does bitAsset suck and DAI not? Because user can earn interest through lending. The user needs a simple solution for this!

MichelSantos commented 5 years ago
1. If Alice's 333 bitUSD debt position is the least collateralized debt position **when a force settlement comes due**, _and_ if the debt position's collateral (e.g. BTS) is valued at only 200 bitUSD, how will the blockchain pay 333 bitUSD worth of BTS to the force-settler?

He has always to maintain a cr > 1 (boundaries)

2. "Because of this risk there is a reserve pool mainly financed by interest from positions whit low cr, to cover these risks." and [in](#issuecomment-529117931) "Extra risk is covered by reserve pool, which has debt asset".  How will the reserve pool pay the force settler in the collateral asset (e.g. BTS)?

When cr ≤ 1 his margin position gets removed from the margin position list. All his collateral, extra debt asset and the interest he paid in front is now owned by the liquidity pool. The collateral is sold in form of a margin call and the difference in debt/debt asset is covered by the reserve pool.

@froooze This is logically consistent. But it also decreases the collateral that is available for the blockchain for subsequent redemption calls. For example,

  1. Alice's debt position has cr = 1.01
  2. The collateral valuation drops in price which makes Alice's debt position become cr=1.00. The margin position gets removed from the margin position list. Her collateral is offered for sale to purchase debt asset on the market. The offering for sale reduces the pool of collateral that is held by the blockchain to cover all potential redemption/force settlement calls by people such as Bob. The CR of the "regular pool" (of the debt assets that exist outside of this liquidity pool) decreases because of the reduction of collateral.

In other words, the offering for sale of the collateral does not eliminate the debt asset that exists and is held by other parties such as Bob. Bob may still come around and request a force settlement but now there is even less collateral available for redemption.

While the sale offer of collateral is outstanding, my understanding of this mechanism (the margin calling of liquidity pool borrowers) is reducing the cr of all other debt assets held outside of this liquidity pool.

froooze commented 5 years ago

@MichelSantos

In other words, the offering for sale of the collateral does not eliminate the debt asset that exists and is held by other parties such as Bob. Bob may still come around and request a force settlement but now there is even less collateral available for redemption.

The margin call mechanic is the same with liquidity pool as with no liquidity pool. Debt and debt asset gets removed through margin call. When Bob did not participate in the margin call other debt asset holder did.

While the sale offer of collateral is outstanding, my understanding of this mechanism (the margin calling of liquidity pool borrowers) is reducing the cr of all other debt assets held outside of this liquidity pool.

Increasing cr through a margin call does decrease the amount of collateral and debt asset outside the liquidity pool and decreases demand for extra debt asset in the liquidity pool.

shulthz commented 4 years ago

MCR=1.6

  1. Alice cr>1.6,
  2. Price drop,
  3. Alice's cr is close to 1.6, she will be margin called soon,
  4. Alice can borrow bitasset/bts from Bob to keep her debt not be margin called when her cr>=1.5 or other parameter(set by community member),and she must keep her synthetic cr >=1.6 with the lend asset.
  5. Alice must pay Bob interest every day in advance,
  6. Price drop again,
  7. Alice's cr is close to 1.5, if she didn't add more asset to keep her cr >=1.5, when her cr <1.5 or her synthetic cr <1.6, her will must be margin called.
  8. When Alice was margin called, the asset which borrow from Bob reback to Bob.
  9. The interest was determind by the market.
  10. If the Bob didn't want frequent operation, he can put his asset in a liquidity pool let the system do this, but he maybe get less interest than market. The interest of liquidity pool will be average of the market interest(>0).
  11. If Bob lent his asset to Alice, he will can't get back his asset except Alice closed this contract or been margin called or set a time threshold.
  12. If Bob lent his asset, his asset will be locked in his account or locked in a special pool.
froooze commented 4 years ago

@shulthz : Yes, Alice gets margin called dependent on her personal ccr. min ccr is defined how much liquidity is in the liquidity pool. Alice has to give the extra debt asset away, when cr ≤ 1 and the interest/insurance is highly defined by the personal cr (risk level).

froooze commented 4 years ago

Our current bitUSD market situation is worse than with liquidity pool:

  1. No motivation to create bitUSD
  2. No punishment for positions which have a lower cr < CCR (=1.5)
  3. No income from positions with lower cr < MCR (=1.55)
  4. No insurance when BTS price drops further

The result is bad liquidity and bad debt!

shulthz commented 4 years ago

Maybe we need a simple lending for margin first.

abitmore commented 4 years ago

Maybe we need a simple lending for margin first.

You mean bsip 70? https://github.com/bitshares/bsips/blob/master/bsip-0070.md

shulthz commented 4 years ago

Maybe we need a simple lending for margin first.

You mean bsip 70? https://github.com/bitshares/bsips/blob/master/bsip-0070.md

Not bsip 70,bsip 70 is Leveraged Trading.

I mean to make some changes in the "Margin Position Liquidity Pool", let the "Margin Position Liquidity Pool" simple, need more consideration for something yet.

abitmore commented 4 years ago

@ryanRfox please assign a BSIP number. Thanks.

froooze commented 4 years ago

I mean to make some changes in the "Margin Position Liquidity Pool", let the "Margin Position Liquidity Pool" simple, need more consideration for something yet.

You mean BSIP78 or BSIP70? What do you mean with more simple ?

froooze commented 4 years ago
shulthz commented 4 years ago

I mean to make some changes in the "Margin Position Liquidity Pool", let the "Margin Position Liquidity Pool" simple, need more consideration for something yet.

You mean BSIP78 or BSIP70? What do you mean with more simple ?

My idea is the same as yours, but have some different places, i will make some detais for your reference later.

shulthz commented 4 years ago

I read the other's design of stable coin yesterday, you can check it, maybe we can redesign a new mechanism for the debt.

MOV Stable Financial System

https://cdn.bytom.io/res/MOV-Stable-EN.pdf