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

BSIP71: Add "Prevent Global Settlement" Flag for Smartcoin (old title: Global Settlement Protection via core code) #179

Open
bitcrab opened this issue Jul 2, 2019 · 90 comments

Comments

@bitcrab
Copy link
Contributor

commented Jul 2, 2019

Abstract

This BSIP proposes a new solution to handle bad debt: the core idea is, while bad debt appears, the system does not take over the bad debt positions; instead, it accepts the smartcoin devaluation caused by bad debt and it lets borrowing, margin call, and force settlement all operate referring to the BTS/devaluated smartcoin price. This solution avoids any global/partial settlement, and keeps the borrowing, margin calls and force settlement features to continue and allow the market to decide how to finally remove bad debt, either by BTS price restoration or by debt position adjustment/ margin call order filling/force settlement.

Motivation

BitShares has a mechanism to handle debt positions whose collateral is valued less than the debt itself ("bad debt"). This mechanism is called global settlement ("black swan") and is triggered when the published feed price (FP) is less than or equal to the product of the global settlement price (Pgs) and the maximum short-squeeze ratio (MSSR).

FP ≤ Pgs × MSSR

If this does occur it means that the collateral ratio (CR) of at least one debt position is less than the MSSR.

Global settlement is not a good way to handle bad debt, as can be seen to what happened to bitUSD. After global settlement was triggered for bitUSD in December 2018:

  • traders could no longer borrow bitUSD;
  • the price of bitUSD dropped below USD because of insufficient collateral; and,
  • it will take a long time for bitUSD to be revived.

The community has had extensive discussions about how to handle the bad debt in a better way in the future. However an easy way, BSIP58, has been implemented for smartcoins like bitCNY and bitUSD; it has worked successfully to prevent GS from happening with no other obvious impact. However, BSIP58 has some issues - it is suspected of market manipulation and it risks witnesses independence. Moving forward, this BSIP will be built based on BSIP58 and eliminate all its disadvantages.

Rationale

We now have several choices on handling bad debt:

  1. Global Settlement
  2. Global Settlement Protection via Price Feeding
  3. Convert Bad Debt Positions to Limit Orders
  4. Take Over only Under-Collateralized Debt Positions without GS (aka Partial GS)
  5. Prevent Global Settlement

We need to do a deep review on bad debt before evaluating above solutions.

Bad debt means in some debt positions the debt cannot be fully paid by selling the collaterals via margin call/force settlement at the market price. In other words, the relevant smartcoin loses sufficient collateral to back the value and will possibly devalue.

At this moment, the system should accept the fact that the smartcoin will possibly devalue, find ways to minimize the impact to different parties in the market and the time to revive.

In my view, a good way to handle bad debt need to follow below principles:

  1. Do not punish good traders who have managed to maintain their collateral ratio well.
  2. Do not stop the smartcoin features, including borrowing, margin call and force settlement, and all these operations should refer to the same price.
  3. Ensure the debt positions/margin call orders be settled in the order from lower CR to higher CR.

In above mentioned 5 solutions, only "5. Prevent Global Settlement" fulfills all 3 principles.

Partial GS is another attractive solution: it is similar to Global Settlement but differs in that (a) only takes over the bad debt positions and moves them to a settlement pool without touching the debt positions with CR>1, and (b) users can issue force settlement from the pool, from the margin call orders, or from the good debt position depending on which has the lowest CR.

The problem of Partial GS is that borrowing and force settlement may refer to different prices which will lead to obvious confusion and unfairness.

The "Prevent Global Settlement" solution adopts a new idea to handle bad debt: while bad debt appears, the smartcoin will be devaluated at a ratio of the lowest CR from among the bad debt positions, yet all the smartcoin trading features, including borrowing, margin call and force settlement, will all switch to refer to GS price to ensure the continuity and fairness of all the features.

Specifications

Add one flag "Prevent Global Settlement" to each smartcoin asset.

Introduce a new parameter: settlement price. Its value shall be calculated as:

if flag "Prevent Global Settlement" is enabled
	setlement price =  max(FP_M, P_gs)
else
	settlement price =  FP_M

where FPM is the median of the prices published by witnesses; witnesses should always feed the real market price.

All calculations of debt position collateral ratios and trading price determinations in borrowing, margin call and force settlement shall refer to the settlement price instead of directly to the feed price.

Potential Risks

References

Discussion

Summary for Shareholders

It is important to eliminate concerns about global settlement. This is currently achieved with the technical options that are available to the witnesses. A more advanced solution as proposed here is needed.

Copyright

This document is placed in the public domain.

@bangzi1001

This comment has been minimized.

Copy link

commented Jul 14, 2019

I agree asset owners should able to enable Global Settlement Protection for their assets.

At this moment, BitCNY and BitUSD Global Settlement Protection are done by witnesses in their price feed script but due to high turnover of witnesses, nobody can ensure after 1-2 years how many new witnesses enable Global Settlement Protection in their price feed script.

@abitmore

This comment has been minimized.

Copy link
Member

commented Jul 15, 2019

@abitmore

This comment has been minimized.

Copy link
Member

commented Jul 15, 2019

FWIW earlier discussions about BSIP58: #135

@clockworkgr

This comment has been minimized.

Copy link
Member

commented Jul 15, 2019

Completely disagree. Not even sure how this is even a discussion.

@matle85

This comment has been minimized.

Copy link

commented Jul 15, 2019

GS protection completely undermines how the assets are meant to work.

Disagree.

@CryptickCryptick1

This comment has been minimized.

Copy link

commented Jul 15, 2019

For context and understanding of the prior global settlements I would like to share the 20 plus page article I wrote for last global settlement. While not directly having all the answers, I think this pulls a few noteworthy ideas into the discussion. https://www.dexbot.info/2019/05/21/understanding-trading-activity-and-potential-causes-of-bitasset-settlement/

@abitmore

This comment has been minimized.

Copy link
Member

commented Jul 17, 2019

The basic idea of this issue is that we should not punish the good traders who are maintaining their collateral ratio well (E.G. always above 175% even 200%).

Actually there are 3 topics (questions) here:

  1. whether to punish good traders who have managed to maintain their collateral ratio well
  2. whether the system would take over positions of traders who have failed to maintain their collateral ratio up to a level (I don't say this is a punishment since some traders may just want it)
  3. protect debt asset holders to what level when there appears a debt position with CR below 100%

The original GS rule

Answers to the questions:

  1. yes
  2. yes
  3. low (let the debt asset float with the collateral asset immediately, although there are chances that one bitUSD could worth more than 1 fiat USD)

IMHO the answer of this rule to the 1st question is stupid, and the 3rd answer is not ideal.

Current voted-in GS protection rule

Answers:

  1. no
  2. no
  3. medium (after the under-collateralized (CR<100%) debt positions are closed due to margin calls or force settlements, the rest debt holders can get full-valued collateral via either margin calls or force-settlements)

I think the main reason that some people are against this rule is the 2nd "no".

Some people are against it due to the appearance (adjusted feed price showing on UI). Actually if it's implemented in core, witnesses will no longer need to publish "fake" price feeds, thus UI will show a normal feed price, and an adjusted "settle price" (which is already showing in UI).

A few people are against it due to the 3rd answer, since it doesn't 100% guarantee that debt asset holders could get fully-valued collateral via force-settlement.

The "convert bad debt positions to limit orders" rule

The mechanism is proposed in forum https://bitsharestalk.org/index.php?topic=27273.0. The answers are:

  1. some (they still expose to force-settlements and margin calls instead of the took-over positions)
  2. yes
  3. high (they can always get full-valued collateral if there are positions not took over)

The main debate is whether this rule favors debt asset owners too much.

The "take over only under-collateralized debt positions but no GS" rule (aka partial GS)

Answers by this rule:

  1. no
  2. yes
  3. medium (same as the GS protection rule)

This is a new idea.

When CR of a debt position drops below a threshold (E.G. 110%), the system take over the debt by moving the collateral and debt to a special "debt-watcher" account, the original borrower's debt position would be closed and he'll lose all the collateral. The debt position of the special account still exposes to margin calls and force-settlements, same as other debt positions, if it has the lowest CR, it gets filled first.

Related topics

I think it's better to change related things at same time. One thing is #164, with this, we can use some fees to fund the special "debt-watcher" account, so it would be slower to a global under-collateralization situation when price of collateral asset drops.

@CryptickCryptick1

This comment has been minimized.

Copy link

commented Jul 17, 2019

Interesting Idea...
Can I suggest adding a slow moving time frame such as 24 hours before this happens? Reasoning: First, people have lives and might be unhappy to see all positions disappear overnight or while they are at work. Second, markets are volatile, and one would not want to see all positions wiped out by a sudden down tick and or temporary market manipulation. If might also make it easier for coding as those calculations would only need to happen periodically. As far as what time frame to use, would be open to various ideas just don't want to see it misused.

@abitmore

This comment has been minimized.

Copy link
Member

commented Jul 17, 2019

I am against introducing a time frame, since it may greatly add complexity, also it's somehow unfair to the opponents. For traders, if they put money in margin trading, they should be prepared that one day the money may lose suddenly. Great efforts are required for individual traders to maintain their debt positions well, if one is not prepared, don't join. Cryptocurrency markets aren't like traditional futures markets which only open a few hours a day (so you have lots of time to sleep) and you can sue someone to get some money back if something went wrong.

@froooze

This comment has been minimized.

Copy link

commented Jul 17, 2019

I like to convert bad debt positions to a limit order, which is also a kind of GS protection + #182

@Inmortak

This comment has been minimized.

Copy link

commented Jul 17, 2019

I am all against the current Global Settlement Protection (or its new fake name: Active Smartcoin Devaluation) embedded at the core level. I find it a pretty sloppy mechanism. It brings falsehood to the system. Falsehood whose consequences would accumulate over time and are totally unpredictable. For starters, it creates the stimulus for bad debtors to become even worst debtors.

A solution to the problem of bad debtors, though, needs to be embedded in the core level. Partial GS with a debt-watcher account may just do the trick. If that debt-watcher account collects fees from certain transactions, so that it tends to increase its collateral over time, it would prevent bad positions to hit the market immediately and the ensuing amplification of the downward trend of the collateral's price.

Interesting Idea...
Can I suggest adding a slow moving time frame such as 24 hours before this happens? Reasoning: First, people have lives and might be unhappy to see all positions disappear overnight or while they are at work. Second, markets are volatile, and one would not want to see all positions wiped out by a sudden down tick and or temporary market manipulation. If might also make it easier for coding as those calculations would only need to happen periodically. As far as what time frame to use, would be open to various ideas just don't want to see it misused.

This, because we are interested in bringing people to the platform, which needs to be friendly. We don't want to scare the hell out of borrowers due to their natural human incompetence and weakness, and send them back home penny-less and humiliated in a matter of the few seconds the market takes to fluctuate.

@froooze

This comment has been minimized.

Copy link

commented Jul 18, 2019

@Inmortak: We are talking here, what is the best way to handle debt, when every thing else failed before.
This should be part of the core, because it is a fundamental security risk and should not relay on other parties.

Debt potions are only converted to a limit order, when ...

  • no margin call happened
  • settlement protection fund is empty #182

The limit order can be removed by three different ways:

  • market buys the limit order
  • settlement protection fund buys the limit order, when balance is bigger than 0
  • debt holder adds enough BTS to reach a CR of 1.15 or more
@remedycoin

This comment has been minimized.

Copy link

commented Jul 18, 2019

@bangzi1001

This comment has been minimized.

Copy link

commented Jul 19, 2019

@abitmore Does add the option for Global Settlement Protection via core code required a hard fork? If no hard fork required, then make this as feature release for asset owners to decide whether want to enable Global Settlement Protection (Once BSIP Pass).

@abitmore

This comment has been minimized.

Copy link
Member

commented Jul 19, 2019

@bangzi1001 Yes it requires a hard fork.

@sschiessl-bcp

This comment has been minimized.

Copy link
Contributor

commented Jul 19, 2019

@abitmore I liked your overview and picked up on it. Here are my thoughts, and another possibily

Questions for rules that handle CR < 1:

  1. Does it punish positions that maintain CR > MCR?
  2. Does the blockchain take over positions that failed to maintain their CR up to a level?
  3. Does it protect BitAsset holders?
  4. Does it protect bad margin position holders?
  5. Does it directly influence the peg?
  6. Does it avoid the undercollaterization?
  7. Is collaterization transparency maintained?
  8. Can the bad position holder recover?
  9. Is there incentive for the community to remove all CR < 1 positions?

1. Global settlement occurs

  1. Yes
  2. Yes, even the ones with CR > 1
  3. Low: See 2., switches to global settlement mode with fixed settlement price for all, and big gab from CR < 1 to revival (CR >= MCR)
  4. No: All positions are confiscated, leverage for the user is lost
  5. Yes, instant force settlement allows arbitrage and margin position creation is not possible to react to demand
  6. No, it gets distributed among all positions (one pool is created)
  7. Yes
  8. No, only through collateral bidding
  9. No (collateral bidding only gives incentive after CR >= 1 and before CR < MCR)

2. GS protection rule through price feed adjustment (currently active)

Answers:

  1. No, only through margin call and force settlement like before
  2. No
  3. Low-Medium:
    • Force settlement gives you less value due to manipulated price feed while there are positions with CR < 1
    • Normal usage instantly after price feed normalizes after CR >= 1
  4. High: Only margin call and force settlement can affect
  5. No
  6. No
  7. Hidden through manipulated price feed (hidden in the sense of not visible on the blockchain)
  8. Yes, still owns the positon and can replenish collateral
  9. No, but possible through margin call and force settlement

3. The "convert bad debt positions to limit orders" rule

The mechanism is proposed in forum https://bitsharestalk.org/index.php?topic=27273.0.

  1. Party. Margin call and force settlement like before, on top of that the CR<1 can't be affected by force settlement and thus CR >= 1 are being force settled instead
  2. Yes
  3. Medium-High: Normal usage through the whole incident
    • Force settlement still takes from a CR >= 1 position because the ones with CR < 1 are a converted to constant sell order
    • Last people that want to settle must instead sell to the converted limit order
  4. No: Positions are confiscated
  5. Minimal, order wall when price rises
  6. No, because not all bitassets could be force settled anymore. Essentially, the "last" to settle would be punished
  7. Yes, but holders need to know how to look for the converted sell order
  8. No, position is converted and lost
  9. No, and removal also not possible

4. The "take over under-collateralized debt positions and prevent GS" rule

Answers by this rule:

  1. No
  2. Yes
  3. Medium:
    • Force settlement may give you less value due to fixed settlement price
  4. No: Position is confiscated, leverage for the user is lost
  5. No
  6. No
  7. Yes
  8. No
  9. No, and removal also not possible

5. Global Settlement Protection via Core Code(aka simple GSP)

Same like 2.

6. Prevent GS rule through flag with force settle incentive

Add bitasset flags "prevent global settlement" and "reverse force settlement offset during margin call". Both flags would be turned on for bitCNY and bitUSD after upgrade.
First flag is obvious, simply don't globally settle. Second flag add incentive to maintain CR by switching the behavior of the force settlement offset: If CR >= MCR, use offset as is now. If CR < MCR, offset benefits the bitasset holder and not the margin position holder. This reversal may or may not be used, but it provides incentive to the community to deal with bad margin positions.

EDIT: Forgot one aspect. If "prevent global settlement" is turned on, a margin call of a position with CR < 1 would still seek to buy exactly the debt, and not at current feedprice.

Answers by this rule:

  1. No
  2. No
  3. Medium:
    • Force settlement applies to undercollaterized position
  4. Medium: Margin call and force settlement affect, if CR<MCR force settlement includes a penalty
  5. No
  6. No
  7. Yes
  8. Yes, still owns the positon and can replenish collateral
  9. Yes, incentive is present to force settle when positions are being called and CR between 1 and MCR

What do you think about my idea?

@sschiessl-bcp

This comment has been minimized.

Copy link
Contributor

commented Jul 19, 2019

@bitcrab thanks for the update on the text! I adjusted my numbering to match yours.

Is there any difference in 2. and 5. (minus witness-fed vs. core-enforced)?

@abitmore

This comment has been minimized.

Copy link
Member

commented Jul 19, 2019

@sschiessl-bcp

5.7: if it's me to implement the 2nd mechanism into core, I won't adjust price feed, instead, I'll add a flag and another price field, just like your 6th option. So collateral transparency can be kept.

3.1: it does punish good debt position holders to an extent, because they can no longer hide behind the bad debt position holders, thus expose to force-settlements and margin calls.

4.9: no incentive (so far) but it's able to remove via force-settlements and margin calls.

@abitmore

This comment has been minimized.

Copy link
Member

commented Jul 19, 2019

The text @bitcrab added is mostly copied from BSIP58. If to implement into core, some can be different.

@bitcrab

This comment has been minimized.

Copy link
Contributor Author

commented Jul 19, 2019

@bitcrab thanks for the update on the text! I adjusted my numbering to match yours.

Is there any difference in 2. and 5. (minus witness-fed vs. core-enforced)?

poll worker or smartcoin tag to enable the feature.

I found European people like "political correctness" so much? you insist to feed market price, but if the margin call or/and force settlement will not refer the feed price, what sense does it make?

@sschiessl-bcp

This comment has been minimized.

Copy link
Contributor

commented Jul 20, 2019

@bitcrab thanks for the update on the text! I adjusted my numbering to match yours.
Is there any difference in 2. and 5. (minus witness-fed vs. core-enforced)?

poll worker or smartcoin tag to enable the feature.

I found European people like "political correctness" so much? you insist to feed market price, but if the margin call or/and force settlement will not refer the feed price, what sense does it make?

Feed price is something everyone sees (passively) and uses as the everyday reference. The most critic I heard from reports is that the everyday traders are misled with an adjusted price feed. It is also very hard to sell price feed manipulation, and this is where all the resistance come from (independent what their reason for it is).

Currently we have one price feed coming from the witnesses and is put on-chain, and the force settlement price and margin call price are derived from it. My suggestion would alter how the force settlement and margin call price are derived. Your suggestion already alters the price feed that is put on-chain, and the "truth" is only known to witnesses. It must be clear for traders to know what's the feed price (produced by witnesses) and what's the settlement/margin call price of positions with CR < 1 (decided by the blockchain).

Questions:

  1. Can we agree that in the outcome both our approaches produce the same effect? Or do you see any problems with keeping the natural price on-chain?

  2. Like abit said in the forum, the main question remains if the blockchain should take over margin positions with CR < 1, which I agree with you that it shouldn't (https://bitsharestalk.org/index.php?topic=28681.msg332599#msg332599)

  3. I'm also wondering what you think about using the force settle offset as incentive when margin position has bad CR?

@bitcrab bitcrab changed the title New BSIP: Global Settlement Protection via core code New BSIP: Active Smartcoin Devaluation (old title: Global Settlement Protection via core code) Jul 21, 2019
@bitcrab

This comment has been minimized.

Copy link
Contributor Author

commented Jul 21, 2019

@sschiessl-bcp please check the updated text, I think you can find some answers, and I don't support to add incentive to force settlement to remove bad debt.

@sschiessl-bcp

This comment has been minimized.

Copy link
Contributor

commented Jul 23, 2019

Thanks @bitcrab .

For the new title, I find it misleading

  • in fact any and all attempts that we have discussed and presented so far mean that the smartcoin will be undercollaterized
  • devaluation only occurs (IMO) if the peg breaks
  • reading the title, some naive users may think that the previous mechanism did NOT have any devaluation/undercollaterization

I found the previous one more accurate. The on-chain flag could be called "Prevent Global Settlement", or in a more positive wording "Alleviate Global Settlement".

Thoughts?

@bitcrab

This comment has been minimized.

Copy link
Contributor Author

commented Jul 24, 2019

@sschiessl-bcp in my idea, there will be no GS any more in smartcoin after the implementation of this BSIP, no need to add one flag for smartcoin.

Yes, seems it's really a little misleading

@bitcrab bitcrab changed the title New BSIP: Active Smartcoin Devaluation (old title: Global Settlement Protection via core code) New BSIP: Add "Prevent Global Settlement" Flag for Smartcoin (old title: Global Settlement Protection via core code) Jul 28, 2019
@bitcrab

This comment has been minimized.

Copy link
Contributor Author

commented Jul 30, 2019

if there is no further comments, I feel it's time to complete this BSIP and push it forward.

@sschiessl-bcp

This comment has been minimized.

Copy link
Contributor

commented Jul 30, 2019

When doing the PR, I would still suggest to remove any wording of devaluation. It only is devalued (IMO) if trades happen below the peg. This BSIP does not touch market trading at all.

If we are running in a CR < 1 state, what happens with the Force Settlement Offset (FSO)? Will it be applied on top of it, or do we redefine that FSO reduces until CR = 1 - FSO and then we have no FSO anymore (because there is already the implicit punishment through the adjusted price)?

@bitcrab

This comment has been minimized.

Copy link
Contributor Author

commented Jul 31, 2019

When doing the PR, I would still suggest to remove any wording of devaluation. It only is devalued (IMO) if trades happen below the peg. This BSIP does not touch market trading at all.

If we are running in a CR < 1 state, what happens with the Force Settlement Offset (FSO)? Will it be applied on top of it, or do we redefine that FSO reduces until CR = 1 - FSO and then we have no FSO anymore (because there is already the implicit punishment through the adjusted price)?

devaluation of smartcoin is possible while bad debt happens, any solution, either GS, partial settlement, or Prevent GS cannot avoid this completely. so I don't think we cannot use "devaluation" in the proposal, we need tell the truth to public.

no need to do any change to FSO.

@Inmortak

This comment has been minimized.

Copy link

commented Aug 7, 2019

every taken-over position should be possible to be bought back provided that its owner increases his collateral and the payment of a small fee.

I forgot to comment on this. IMHO, you said this because you forgot how and who to pay the force-settlements. Apparently the pool has the lowest CR, in common sense, the pool should pay a part of its collateral to the force settlement requesters. But if it's done this way, that means the pool will lose a part of its position, so it could be impossible to return the position to the origin owners who got taken-over.

Not really. Suppose the pool holds $1100 worth of collateral and a debt of 1000 BitUSD. That makes a pool_CR of 1.1, Then someone comes to force settle 100 BitUSD. The pool gives this person $100 worth of collateral and receives 100 BitUSD. Now the pool has $1000 worth of collateral and debt of 900 BitUSD. The pools collateral now is 1.11. It increased by 1%.

Now suppose a debtor who was taken-over his position with $150 worth of collateral and a CR of 1.5, comes to buy back his position. The pool charges a small fee, let's say it returns $145 collateral with the same debt. Now the pool has $855 worth of collateral and a debt of 800. That makes a pool_CR = 1.069.

On the other hand, even if no force-settlement happened, assuming an owner whose position with CR 1.4 got taken over, now he wants to get back the position by adding collateral to CR>MCR, if current pool's CR is exactly 1, how much collateral would the pool return to the owner? Or say, how much the "small fee" need to be? Let's say the fee is 0.1, then 1.3X collateral will be returned to the owner, but it will reduce the pool's CR to be below 1, thus the pool need to second-level take over another debt position, this sounds complicated.

Yes, in your example 1.3X collateral would be returned to the owner, which would reduce the Pool_CR below 1, making the pool, according to the protocol, take over the next debtor. But, the owner who bought back his position would have already his collateral above MCR. We would have effectively converted one bad position to a good one, and stimulated two debtors to buy BTS, the one who bought back and the one who just got taken over.

@abitmore

This comment has been minimized.

Copy link
Member

commented Aug 7, 2019

By the way, "partial GS" does mean a pool takes over the bad debt positions but don't not take over good positions.

And what are bad debt positions? Those whose collateral fall in what range?

Since "partial GS" is not in current system but is a new feature, we can define the term, for example, "take over" or "settle" the ones whose CR fell below 1.1. That said, your solution is a variant of "partial GS".

pool holds ... a debt of 1000 BitUSD ... someone comes to force settle 100 BitUSD. ... a debtor who was taken-over his position with $150 ... comes to buy back ...

What if someone comes to force settle 600 bitUSD and later a debtor comes to buy back another 600 and even the rest 400? I would expect we'll fulfill the settler's will. Then it's clear that the debtor would be unable to get back her whole position. I didn't mean it's a serious issue or unable to address, just it's missing in your post.

The debtors would put their sell order at different prices, effectively dissolving the wall.

True. A visible sell wall impacts traders' psychology and behaviors, although the wall can disappear even when nobody buys in THAT market, for example, people buying BTS with BTC will effectively push up price of BTS to weaken even dismiss the wall in BTS:BitUSD market.

Actually, all the exchanges that support leverage trading do have some kind of margin call mechanism to force-close traders' positions under certain circumstances. However, if I'm correct, most if not all of them won't place "maker" margin-call orders in the market which possible to form a sell wall, instead, they only place "taker" orders (dump to the market), which actually means an invisible sell wall. There could also be conditions that they're unable to close some positions without a loss, their solutions are vary, they may seek for force-closing positions on the other side, they may have a fund, they may do legal actions out of the market, etc.

Ultimately, the only way to break the loopback is to find/incentivize/create buy support, to attract capital, but this would be a bigger topic.

@Inmortak

This comment has been minimized.

Copy link

commented Aug 8, 2019

And what are bad debt positions? Those whose collateral fall in what range?

Since "partial GS" is not in current system but is a new feature, we can define the term, for example, "take over" or "settle" the ones whose CR fell below 1.1. That said, your solution is a variant of "partial GS".

Seeing different lines of reasoning from different independent people converging to similar mechanisms makes me think that this problem doesn't have many alternative solutions to explore. Good to know that in order to proceed with confidence.

pool holds ... a debt of 1000 BitUSD ... someone comes to force settle 100 BitUSD. ... a debtor who was taken-over his position with $150 ... comes to buy back ...

What if someone comes to force settle 600 bitUSD and later a debtor comes to buy back another 600 and even the rest 400? I would expect we'll fulfill the settler's will. Then it's clear that the debtor would be unable to get back her whole position. I didn't mean it's a serious issue or unable to address, just it's missing in your post.

I think the whole thing must be solved in stages, one of which should be the buy your taken-over position back. For starters, how many positions backwards can a debtor buy? I would say only the last one. Also, a debtor could buy a position only if it was taken over from him with a CR > 1.1 or whatever the Critical Collateral Ratio happens to be. The pool (and for that matter, the system) should not have any problems with collateral because it only reduces its collateral when a force-settlement occurs (which usually increases the pool_CR ) and buy-backs, which would required the debtor to upgrade collateral of his position before regaining hold of it. This last step reduces pool_CR, but increases the overall collateral for that BitAsset and tends to increase BTS price.

Finally, if at any given time a debtor comes to buy-back his position and the pool has not enough collateral, then several cases would have to be considered.

if (pool_CR > MCR)  
          Do this
else if (pool_CR > CCR) 
          Better Do this
else if (pool_CR > 1) 
          Hmmm, better Do this
else  say, the order cannot be completed at this moment.

I see we are getting a deep insight about the problem and we have found some possible immediate measures to, at the very least, attempt. If they don't work, we would have learned even more.

Ultimately, the only way to break the loopback is to find/incentivize/create buy support, to attract capital, but this would be a bigger topic.

Not at all, the feedback is inherent to the architecture and independent of the number of players or the amount of money involved. If we had 10x more players with 100x more money, under the current protocol we would have a 100x bigger wall because, after all, we are in the middle of an altcoin bear market.

@abitmore

This comment has been minimized.

Copy link
Member

commented Aug 8, 2019

Ultimately, the only way to break the loopback is to find/incentivize/create buy support, to attract capital, but this would be a bigger topic.

Not at all, the feedback is inherent to the architecture and independent of the number of players or the amount of money involved. If we had 10x more players with 100x more money, under the current protocol we would have a 100x bigger wall because, after all, we are in the middle of an altcoin bear market.

I have to disagree.

The protocol can not prevent BTS price from falling, thus any kind of fund is possible to fail at some point. It's Math. We're unable to force people to add collateral, but can only incentivitize people. In case when there is no more collateral added, and if price keeps falling, the bitasset will be undercollateralized.

On the opposite, with big enough buy support, the price won't fall any more, thus no more bad debt will appear. It's Economics.

@sschiessl-bcp

This comment has been minimized.

Copy link
Contributor

commented Aug 8, 2019

Not want to hinder your discussion above, but want to remark on possible timelines:

New release is coming very soon. The current GS protection mechanism is very bad, if anything just for marketing purposes.

Is a partial GS option viable for next protocol upgrade? Would the "5.Prevent Global Settlement" option even be viable for next protocol upgrade? The latter is significantly easier to implement (IMO). @abitmore what do you think?

If "5.Prevent Global Settlement" could make it into next protocal upgrade I would go for that now and refine other ideas together with research worker.

@abitmore

This comment has been minimized.

Copy link
Member

commented Aug 8, 2019

@sschiessl-bcp on that topic, I think it's better to postpone the protocol release, since we do want to include important features in the release.

@Inmortak

This comment has been minimized.

Copy link

commented Aug 8, 2019

Not at all, the feedback is inherent to the architecture and independent of the number of players or the amount of money involved. If we had 10x more players with 100x more money, under the current protocol we would have a 100x bigger wall because, after all, we are in the middle of an altcoin bear market.

I have to disagree.

The protocol can not prevent BTS price from falling, thus any kind of fund is possible to fail at some point. It's Math. We're unable to force people to add collateral, but can only incentivitize people. In case when there is no more collateral added, and if price keeps falling, the bitasset will be undercollateralized.

On the opposite, with big enough buy support, the price won't fall any more, thus no more bad debt will appear. It's Economics.

The feedback is a result of the incentives provided by the architecture, which we can totally control. Certainly we cannot control a bear market. But a bear market is not a feedback within the protocol.

You are right in that every possible fund will fail if Bts price keeps falling. Please consider my analysis for that ultra extreme case where all positions with MCR < 1.6 have already been taken over and pool_CR < 1. I quote myself:

The worst case scenario occurs when a fall in BTS price is so precipitous that all positions with a collateral below MCR get taken and yet the fund’s CR falls below 1. Notice that this is a very extreme and unlikely scenario which, fortunately, is not as bad as current management of GS. Because, in that worst case, although fund’s collateral would fall below 1, all positions with collateral below MCR would have already been taken care of. So, the only bad debtor would be the fund itself. In that case, having the fund no other bad position to take over, all that would have to be done is wait until the inflow of fees replenish back fund’s CR; and, this would not necessarily affect the peg because for the only bad debtor in the whole ecosystem (the fund), there would be many other positions with collateral above MCR. So, in average, the peg could be maintained. Of course, during these very extreme conditions in which the fund’s CR falls below 1, forced-settlements would have to be temporarily suspended, for it wouldn’t be possible to deliver them without affecting healthy collateral positions. As a consequence, anyone willing to get BTS for a Bit-Asset, would have to do it at market value, helping in this way to bring BTS price upward.

@abitmore

This comment has been minimized.

Copy link
Member

commented Aug 8, 2019

the only bad debtor would be the fund itself. In that case, having the fund no other bad position to take over, all that would have to be done is wait until the inflow of fees replenish back fund’s CR; and, this would not necessarily affect the peg because for the only bad debtor in the whole ecosystem (the fund), there would be many other positions with collateral above MCR. So, in average, the peg could be maintained.

I really doubt there would be that many healthy positions out there when the fund's CR fell below 1. I assume the size of the pool would be very huge. You can look at current bitCNY positions, which is relatively healthy, we can simulate, if we suddenly change the rule to your solution, and price of BTS suddenly falls thus nobody has chance to update her position, please calculate, what price BTS need to fall to to let the pool has CR < 1, and, how big is the pool, and how many healthy positions remain.

Of course, during these very extreme conditions in which the fund’s CR falls below 1, forced-settlements would have to be temporarily suspended, for it wouldn’t be possible to deliver them without affecting healthy collateral positions. As a consequence, anyone willing to get BTS for a Bit-Asset, would have to do it at market value, helping in this way to bring BTS price upward.

At any time when people willing to get BTS from market will bring BTS price upward. That's always correct, but not "a consequence" of undercollateralization of a bitasset. Think in this way: if being unable to settle bitasset will bring BTS price up, why not we disable force-settlement when price starts falling? The fact is, being unable to settle (nor to by margin calls), the value of the bitasset will decrease. Selling the bitasset for BTS won't push up BTS's price, but will only push down the bitasset itself's price.

@Inmortak

This comment has been minimized.

Copy link

commented Aug 8, 2019

I really doubt there would be that many healthy positions out there when the fund's CR fell below 1. I assume the size of the pool would be very huge. You can look at current bitCNY positions, which is relatively healthy, we can simulate, if we suddenly change the rule to your solution, and price of BTS suddenly falls thus nobody has chance to update her position, please calculate, what price BTS need to fall to to let the pool has CR < 1, and, how big is the pool, and how many healthy positions remain.

Yes, BitCNY is a great example to defend my proposed protocol. There are no positions with CR < MCR at this moment. So, Bts price would have to suddenly fall about 30% for those positions to get to CR < 1.1. At that moment the take over begins, each new taken-over position creates buy pressure on Bts for reasons already discussed and increases pool collateral. I would say we need at least a 45% of sudden decrease in Bts price before force-settlements have to be stopped, according to my protocol and supposing the Pool is initially empty. And that's after this incredibly wild bear market. Add to this that pool is constantly replenished by fees and that taken-over positions can be bought-back which also puts buy pressure on Bts.

Not bad at all!

At any time when people willing to get BTS from market will bring BTS price upward. That's always correct, but not "a consequence" of undercollateralization of a bitasset. Think in this way: if being unable to settle bitasset will bring BTS price up, why not we disable force-settlement when price starts falling? The fact is, being unable to settle (nor to by margin calls), the value of the bitasset will decrease. Selling the bitasset for BTS won't push up BTS's price, but will only push down the bitasset itself's price.

You have a point here. But, notice that under those very extreme conditions, forcing potential force-settlers to go to the market and dump their BitAsset, would provide liquidity for those debtors who are unable to get the bitasset in order to close their positions. Something that is missing today due to the lack of BitAsset available created by the sell-wall. Free Market at its best. Probably the peg would be lost temporarily, but trading would be incentivized, every trade means more fees for the pool, helping it come back to pool_cr > 1.

@abitmore

This comment has been minimized.

Copy link
Member

commented Aug 9, 2019

@Inmortak

  1. few people buys in a bear market. I've argued in #179 (comment), your conclusion about take-over would "puts buy pressure on BTS" doesn't stand. The debtors would rather sell BTS for bitAsset to close their positions or waiting for someone to buy than willing to buy BTS to add more collateral.

  2. a) you can't really force people, b) trading is not incentivized, c) force-settlements generate fees too, d) the ones who got the bitAssets from market would be the "good" debtors, they closing positions doesn't help the peg,
    e) the ones who dumped devaluated bitAssets for BTS will likely dump BTS in another market for BTC or USDT thus will harm the price further, and will never come back.

@Inmortak

This comment has been minimized.

Copy link

commented Aug 9, 2019

@Inmortak

1. few people buys in a bear market. I've argued in [#179 (comment)](https://github.com/bitshares/bsips/issues/179#issuecomment-518900247), your conclusion about take-over would "puts buy pressure on BTS"  doesn't stand. The debtors would rather sell BTS for bitAsset to close their positions or waiting for someone to buy than willing to buy BTS to add more collateral.

I appreciate your efforts @abitmore, this process is exhausting,

If a given position was taken-over, the possibility of buying it back effectively increases buy pressure on BTS because, as you said, if it was taken-over with a CR =1.4 then, from the debtors perspective, it is as if he sold really cheap BTS. Buying the position back, reduces his loss. And, if we demand the position to have full collateral for the buy-back to occur, then he would have to BUY more bts in the market. Of course, the debtor would feel that pressure and dislike it, he may try to buy back his position simply to immediately close it. But then, that's a probability, not a fact. It is precisely these probabilities that we need to adjust, we call them incentives.

2. a) you can't really force people, b) trading is not incentivized, c) force-settlements generate fees too, d) the ones who got the bitAssets from market would be the "good" debtors, they closing positions doesn't help the peg,
   e) the ones who dumped devaluated bitAssets for BTS will likely dump BTS in another market for BTC or USDT thus will harm the price further, and will never come back.

If force-settlement is suspended because the pool doesn't have any more positions to take over, would-be force-settlers will dump their bitAsset on the market. We agree on that. You see that as a decrease in price of the BitAsset VS Bts, I see it as an increase in price of Bts Vs BitAsset.

Who is right? I think we both are. The public will also be split in their appreciation and, in the minds of many people, many of them outside the Bitshares ecosystem, 1 BitUSD will still be worth 1 USD, simply because they don't understand the intricacies of the protocol. Consequently, to their eyes bts price will be increasing against the dollar, which is what we need to recover pool_CR = 1. Aren't, after all, the prices of all these cryptocoins a matter of perception?

I went to Bitsharestalk and I saw that many of these ideas were already been discussed by the community, way before my analysis. A Pool that takes over bad debt and replenishes via fees is nothing new. The buy-back your taken-over position is, and the whole mechanism to use whenever the pool_cr falls below 1 is new too.

@abitmore

This comment has been minimized.

Copy link
Member

commented Aug 9, 2019

@Inmortak

  1. I was talking about possible behavior before a position is about to be taken-over. You're talking the possibilities after a position been taken over. I think the former plays a more important role in trading because it's precautions due to expectations, the latter is about remedy. Most traders try to act before it's too late.

  2. People only pay attention to markets with top liquidity. Current value and trends of bitassets will be shown on the market cap tracking sites, people will quickly know whether the assets are pegging well. Don't try to fool people.

@Inmortak

This comment has been minimized.

Copy link

commented Aug 10, 2019

1. I was talking about possible behavior before a position is about to be taken-over. You're talking the possibilities after a position been taken over. I think the former plays a more important role in trading because it's precautions due to expectations, the latter is about remedy. Most traders try to act before it's too late.

We both were talking about the extreme case in which the pool has taken over all positions and the pool_cr < 1, and consequently, force settlements have to be stopped. Please follow the thread backwards and see for yourself.

2. People only pay attention to markets with top liquidity. Current value and trends of bitassets will be shown on the market cap tracking sites, people will quickly know whether the assets are pegging well. Don't try to fool people.

@abitmore I am thinking throughly, to the best of my abilities, everything I write here. No need to be harsh. Markets are all about perception. Ignoring that fact is fooling oneself. And markets will always have positive and negative perceptions about any asset/situation. We need to use the good perception people may have about BitUSD in order to self leverage whenever things get acid. Saying that it's legit to present BitUSD falling Vs BTS and not legit presenting Bts going up Vs BitUSD is equivalent to take only the weakest angle of our product and try to make a sale out of it.

There is even a proposal being discussed in BitsharesTalk to create a OMO fund which would hold Tether and exchange it in the DEX as 1 USDT = BitUSD. What do you think will happen if force-settlements are suspended due to pool_cr < 1, and the would be settlers begin to sell their BitUSD for bts, which many other people are trading for USDT? Why would we take the overly negative position that our BitAsset lost his peg and Bts didn't increase when, in reality, these many perspectives tend to average each other?

Anyway, I think the most important points have already been highlighted. And I feel this discussion is already getting a little tiresome. I really thank you for the time you took to understand the mechanism I propose. I hope it is taken into consideration in whatever is submitted for voting.

@abitmore

This comment has been minimized.

Copy link
Member

commented Aug 10, 2019

@Inmortak I apologize is if I've offended you.

  1. yes we're both talking about the same scenario: when price of BTS is falling. There are several kinds of players in the play ground: the bitUSD holders, the debtors with low CR, the debtors with medium CR, the debtors with high CR. The positions with low CR will be taken over anyway. I was talking about the debtors with medium to high CR, they would dump BTS for bitUSD in order to close their positions to avoid being taken over, that leads to sell pressure. Your were talking about the debtors with medium CR who didn't sell quickly enough or have no spare BTS to sell thus got taken over, then the ones among them who have spare BTS to add to collateral and want to add collateral to "carry the bag" again, I meant they wouldn't do it because the incentives aren't big enough and risks are huge, by the way, when the trend changed, everyone starts to buy or settle, the taken-over owners want to "buy back" as well, but at that time they are unable to buy back because the pool won't have their full position nor able to take over another position to fulfill their requests.

  2. I just didn't see why most of people not paying attention when devaluation happens, although I'd admit there would be some people not aware the devaluation.

If you want your opinion to be submitted for voting, please write a BSIP, or convince someone to write a BSIP for you. Thanks.

@shulthz

This comment has been minimized.

Copy link

commented Aug 11, 2019

A position with a CR>1.1 is still a healthy position.

We can't taker over the position whose CR > MSSR.

Which we want to handle is the 'GS', not the position whose CR>MSSR.

The position CR>MSSR or 1.1, should let the market itself to solve it.

@bitcrab

This comment has been minimized.

Copy link
Contributor Author

commented Aug 11, 2019

it's time to finalize the BSIP and put on poll voting.

@Inmortak

This comment has been minimized.

Copy link

commented Aug 11, 2019

it's time to finalize the BSIP and put on poll voting.

If I vote for approval of this BSIP, out of everything that has been discussed, what would be implemented? What's the protocol?

@bitcrab

This comment has been minimized.

Copy link
Contributor Author

commented Aug 12, 2019

it's time to finalize the BSIP and put on poll voting.

If I vote for approval of this BSIP, out of everything that has been discussed, what would be implemented? What's the protocol?

see Specification at the top

@sschiessl-bcp

This comment has been minimized.

Copy link
Contributor

commented Aug 13, 2019

@MichelSantos

This comment has been minimized.

Copy link
Contributor

commented Aug 14, 2019

In my opinion a positive aspect about this proposal in comparison to BSIP58 is that when global settlement protection (GSP) is activated witnesses will publish the natural feed price which is what will be recorded in the blockchain.

The greatest risk with this proposal is not new but is the same risk as for BSIP58 when GSP is activated: the "settlement price CR" of debt positions will be less than the "feed price CR". If the price of the collateral continues to fall the "feed price CR" will be less than MCR and may potentially become less than 1. The smartcoin will naturally devalue as this BSIP properly describes. In this situation I will like to encourage client software to prominently inform users who are attempting to buy the smartcoin that it is under GSP and cannot be force-settled for the normal value.

@MichelSantos

This comment has been minimized.

Copy link
Contributor

commented Aug 16, 2019

Please note that the original post has been lightly edited for formatting and readability

@ryanRfox ryanRfox changed the title New BSIP: Add "Prevent Global Settlement" Flag for Smartcoin (old title: Global Settlement Protection via core code) BSIP71: Add "Prevent Global Settlement" Flag for Smartcoin (old title: Global Settlement Protection via core code) Aug 21, 2019
@bangzi1001

This comment has been minimized.

Copy link

commented Sep 28, 2019

BSIP76 Become Game Changer for SmartCoin and this BSIP71 may need to change Effective Price Feed to Max(Normal Price Feed by Witnesses, GS Protection Price, BSIP76 Threshold Price)

BSIP76: Threshold for price feeds through voting
#221

@sschiessl-bcp

This comment has been minimized.

Copy link
Contributor

commented Sep 30, 2019

Change request to act on BSIP76

#224

@abitmore

This comment has been minimized.

Copy link
Member

commented Oct 2, 2019

@sschiessl-bcp I think perhaps it's better to use 2 flags for GS protection and the threshold. What do you think?

@sschiessl-bcp

This comment has been minimized.

Copy link
Contributor

commented Oct 2, 2019

@sschiessl-bcp I think perhaps it's better to use 2 flags for GS protection and the threshold. What do you think?

Yes I agree, must not necessarily be connected, and you might want to disable threshhold forever at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.