Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
froooze opened this issue Jul 17, 2019 · 49 comments
Open

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

froooze opened this issue Jul 17, 2019 · 49 comments

Comments

@froooze
Copy link

froooze commented Jul 17, 2019

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

Rationale

  • Minimize margin calls
  • Increase circulating supply of debt asset, without increasing system risk

Definitions

  • CR = (debt - extra debt asset)/collateral(external collateral ratio)
  • MCR = maintenance CR or margin call CR
  • ICR = initial CR (amount to borrow from liquidity pool and blockchain)
  • cr = debt/collateral (internal collateral ratio)
  • mcr = internal maintenance cr = target cr (user based)
  • min mcr(MCR, ICR, lp1, lp3)
  • extra debt asset = (ICR - cr) * collateral
  • interest = extra debt asset * a * (1/cr)^b * interest rate
  • interest balance -= interest
  • insurance pool += interest * interest fee
  • interest lender = interest * (1 - interest fee)
  • interest balance lender += interest lender

Boundaries

Margin Position Holder

  • cr > 1
  • mcr > 1
  • interest balance > interest
  • 1 > interest fee > 0

Liquidity Pool

  • cr ≤ 1 (t=0)
  • crmcr (t>0)

Solution

  • The MPLP or liquidity pool reduces margin calls by lowering the mcr without adding extra BTS or decrease the debt of the position
  • The user has the option to increase the CR by locking the extra debt asset next to debt, without paying the current debt back

Pools

  • For every debt asset, there is a separated liquidity pool
  • Every liquidity pool has a reward pool, which collects the interest lender
  • Every liquidity pool has a insurance pool, which is financed by the interest fee

Timing

  • Every liquidity pool has a certain time threshold, which defines the max. linear removing rate by the lender
  • The borrower can remove extra debt asset instantly by setting mcr = MCR
  • The time thresholds defines, how long a borrower has to pay the interest in front

Interest

  • Interest rate is defined by supply/demand of (lp1+lp2+lp3)/(lp1+lp2)
  • Interest is paid in the debt asset. Lender can decide, if he wants to get paid in debt asset or settled debt asset (BTS)
  • Interest is paid from a new interest balance, which must be held in the corresponding debt asset
  • When integrated (Δt) Interest is as big, as the last paid interest, new interest must be paid to cover the interest for time threshold and current cr

Liquidity Pool Portion

Sub pools

  • lp1 is for users with mcr < MCR
  • lp2is for users with CR < ICR
  • lp3 is available debt asset

Distribution

  • The lp2 must be first fully filled, before mcr < MCR
  • The lp1 can only increase, when lp3> 0
  • The lp1 is distributed, to enable everyone the same min mcr
  • Lender removes debt asset from liquidity pool:
    If lp3> debt asset
    than Δlp3 = debt asset
    If lp3= 0
    than Δlp1 = debt asset/time threshold (linear removed)

Margin Call Gap

  • ICR > MCR
  • The ICR must be different from MCR to increase demand in liquidity pool before margin call gets active
  • Every liquidity pool user increases demand from the liquidity pool until CRICR
  • Margin calls happen for liquidity pool and non-liquidity pool users, when CR < MCR

Margin Calls

  • prioritized by cr
  • reduce collateral, debt, debt asset and demand for extra debt asset

Partial 1

  • if cr > 1 and cr < mcr
  • than sell collateral to reach crmcr

Partial 2

  • if interest balance < interest
  • than mcr = MCR and sell collateral to reach CRMCR

Full

  • if cr ≤ 1
  • than sell all collateral

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

  • cr = mcr

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

  • ICR
  • MCR
  • a & b
  • interest fee

Insurance pool

insurance pool += (ICR - cr) * collateral * a * (1/cr)^b * interest fee * interest rate

The insurance pool covers the system risk, when:

  • mcr < MCR
  • cr < MCR
  • cr ≤ 1

Example

  • Total supply: 3 million bitUSD (100%)
  • Total supply in the liquidity pool: 0.6 million bitUSD (20%)
  • Interest rate for 14 days (= time threshold): 2%
  • a = 10, b = 7
  • interest balance = 4 bitUSD
  • ICR = 1.55 | MCR = 1.5

Stage 1

  • BTS price: 0.05 bitUSD
  • 10k BTS as collateral
  • 323 bitUSD debt
  • CR = 1.55

Stage 2

  • BTS price drop to 0.04 bitUSD
  • CR = cr = 1.24

Stage 3

  • 65 bitUSD are needed to reach ICR again
  • Interest: 65 bitUSD * 10 * (1/1.24)⁷ * 2% = 2.88 bitUSD
  • interest balance = 1.12 bitUSD

Stage 4

  • The 65 bitUSD gets locked to the margin position, without paying back the 323 bitUSD debt
  • 10k BTS as collateral
  • 323 bitUSD debt
  • 65 bitUSD extra asset balance
  • 258 bitUSD overall debt
  • CR = 1.55

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

  • Without borrowing from the liquidity pool, the user needs to sell 1178 BTS to cover the MCR
  • With the liquidity pool only 2.88 bitUSD are needed, to cover the interest for CR increase to ICR

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
  • In a bear market the interest lender for the liquidity pool should be higher than BSIP-70
  • In a bull market the interest lender for the liquidity pool should be lower than BSIP-70

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

  • Proof of stake topic added
  • Changed topic from settlement fund to margin position liquidity pool
  • Removed settlement
  • Added interest rate
  • Removed margin call fees
  • CR and debt increase topic added
  • Worker cost reduction topic added
  • Example topic added
  • Comparison topic added
  • Margin call gap topic added
  • Goals topic added
  • Definition topic added
  • Boundaries topic added
  • Interest balance added
  • internal CR = cr added
  • Margin call topic added
  • interest parameters a & b added
  • System risk topic added
  • Abstract topic added
  • Market liquidity topic added
  • Introduced ICR/MCR instead of MCR/CCR (Call CR)
  • Recovery topic for full margin call added

Copyright

This document is placed in the public domain.

@abitmore
Copy link
Member

Another related discussion is #164 .

@froooze
Copy link
Author

froooze commented Jul 30, 2019

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?

@froooze froooze changed the title New BSIP: Settlement protection fund New BSIP: Settlement fund Aug 1, 2019
@Inmortak
Copy link

Inmortak commented Aug 5, 2019

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
Copy link
Author

froooze commented Aug 6, 2019

@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
Copy link

Inmortak commented Aug 6, 2019

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
Copy link
Contributor

biophil commented Aug 14, 2019

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
Copy link
Author

froooze commented Aug 15, 2019

@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.

@froooze froooze changed the title New BSIP: Settlement fund New BSIP: Margin position liquidity protocol Aug 24, 2019
@froooze froooze changed the title New BSIP: Margin position liquidity protocol New BSIP: Margin position liquidity fund Aug 24, 2019
@froooze froooze changed the title New BSIP: Margin position liquidity fund New BSIP: Margin position liquidity pool Aug 24, 2019
@MichelSantos
Copy link
Contributor

@froooze

  • Source of funds in the liquidity pool: There is an aspect of the proposal which I think is vague: 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?

  • 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?

  • 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?)

  • Compensation Amount: Will compensation be determine based on some of the interest ideas from the Decentralized Lending Pool article? 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?

  • Withdrawals: Can a deposit be withdrawn?

    • If so, when can I withdraw bitUSD?
    • 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?
    • Is there a concern that a "successful" liquidity pool may consume all of the deposits? How will depositors be compensated?

@MichelSantos
Copy link
Contributor

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
Copy link
Author

froooze commented Aug 27, 2019

@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
Copy link
Author

froooze commented Aug 27, 2019

@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:

  • settlement
  • no interest rate
  • fees on margin calls

@MichelSantos
Copy link
Contributor

* _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
Copy link
Author

froooze commented Aug 29, 2019

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
Copy link

I could support this

(Sapiens)

@MichelSantos
Copy link
Contributor

MichelSantos commented Sep 2, 2019

@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
Copy link
Author

froooze commented Sep 3, 2019

@MichelSantos:

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
  • the interest rate for the liquidity pool does rise
  • every borrower will get less debt asset in the next round, when increased interest rate could not increase the supply of the liquidity pool
  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
Copy link
Contributor

pmconrad commented Sep 3, 2019

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
Copy link
Author

froooze commented Sep 3, 2019

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Author

froooze commented Sep 5, 2019

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
Copy link
Contributor

pmconrad commented Sep 5, 2019

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

  • IMO the trades of the user do not affect the system risk anyway.
  • 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.
  • 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.
  • 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. The extra_debt_asset may not be sufficient to cover the gap.

@MichelSantos
Copy link
Contributor

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
Copy link

shulthz commented Sep 8, 2019

Something like Debt Financing.

@pmconrad
Copy link
Contributor

pmconrad commented Sep 8, 2019

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
Copy link
Author

froooze commented Sep 8, 2019

@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
Copy link
Contributor

MichelSantos commented Sep 8, 2019

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
Copy link
Author

froooze commented Sep 8, 2019

@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
Copy link

shulthz commented Sep 11, 2019

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
Copy link
Author

froooze commented Sep 11, 2019

@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
Copy link
Author

froooze commented Sep 13, 2019

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!

@froooze froooze changed the title New BSIP: Margin position liquidity pool New BSIP: Margin Position liquidity pool Sep 23, 2019
@froooze froooze changed the title New BSIP: Margin Position liquidity pool New BSIP: MPLP (Margin Position Liquidity Pool) Sep 26, 2019
@shulthz
Copy link

shulthz commented Sep 28, 2019

Maybe we need a simple lending for margin first.

@abitmore
Copy link
Member

Maybe we need a simple lending for margin first.

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

@shulthz
Copy link

shulthz commented Sep 28, 2019

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
Copy link
Member

abitmore commented Sep 28, 2019

@ryanRfox please assign a BSIP number. Thanks.

@froooze
Copy link
Author

froooze commented Oct 2, 2019

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
Copy link
Author

froooze commented Oct 15, 2019

  • The ICR (Initial Collateral Ratio) parameter is now merged with the MPLP
  • Recovery allows to buy back the margin position, during a full margin call from the MPLP

@froooze froooze changed the title New BSIP: MPLP (Margin Position Liquidity Pool) New BSIP: Debt Asset feature MPLP (Margin Position Liquidity Pool) Nov 3, 2019
@froooze froooze changed the title New BSIP: Debt Asset feature MPLP (Margin Position Liquidity Pool) New BSIP: Debt Asset Feature MPLP (Margin Position Liquidity Pool) Nov 3, 2019
@froooze froooze changed the title New BSIP: Debt Asset Feature MPLP (Margin Position Liquidity Pool) New BSIP: Debt Asset Feature - MPLP (Margin Position Liquidity Pool) Nov 4, 2019
@shulthz
Copy link

shulthz commented Nov 21, 2019

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
Copy link

shulthz commented Mar 25, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants