bsips
bsips copied to clipboard
BSIP71: Add "Prevent Global Settlement" Flag for Smartcoin (old title: Global Settlement Protection via core code)
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:
- Global Settlement
- Global Settlement Protection via Price Feeding
- Convert Bad Debt Positions to Limit Orders
- Take Over only Under-Collateralized Debt Positions without GS (aka Partial GS)
- 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:
- Do not punish good traders who have managed to maintain their collateral ratio well.
- Do not stop the smartcoin features, including borrowing, margin call and force settlement, and all these operations should refer to the same price.
- 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
- New BSIP: Add "Prevent Global Settlement" Flag for Smartcoin (old title: Global Settlement Protection via core code)
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.
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.
A related discussion is here: https://bitsharestalk.org/index.php?topic=27273.0
FWIW earlier discussions about BSIP58: https://github.com/bitshares/bsips/issues/135
Completely disagree. Not even sure how this is even a discussion.
GS protection completely undermines how the assets are meant to work.
Disagree.
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/
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:
- whether to punish good traders who have managed to maintain their collateral ratio well
- 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)
- 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:
- Question: whether to punish good traders who have managed to maintain their collateral ratio well? Answer: yes
- Question: whether the system would take over positions of traders who have failed to maintain their collateral ratio up to a level? Answer: yes
- Question: protect debt asset holders to what level when there appears a debt position with CR below 100%? Answer: 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:
- Question: whether to punish good traders who have managed to maintain their collateral ratio well? Answer: no
- Question: whether the system would take over positions of traders who have failed to maintain their collateral ratio up to a level? Answer: no
- Question: protect debt asset holders to what level when there appears a debt position with CR below 100%? Answer: 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:
- Question: whether to punish good traders who have managed to maintain their collateral ratio well? Answer: some (they still expose to force-settlements and margin calls instead of the took-over positions)
- Question: whether the system would take over positions of traders who have failed to maintain their collateral ratio up to a level? Answer: yes
- Question: protect debt asset holders to what level when there appears a debt position with CR below 100%? Answer: 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:
- Question: whether to punish good traders who have managed to maintain their collateral ratio well? Answer: no
- Question: whether the system would take over positions of traders who have failed to maintain their collateral ratio up to a level? Answer: yes
- Question: protect debt asset holders to what level when there appears a debt position with CR below 100%? Answer: 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.
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.
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.
I like to convert bad debt positions to a limit order, which is also a kind of GS protection + #182
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.
@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
In the notes below there is the question about "...the best way to handle debt" - I'd like to address this.
I hadn't thought of forgiving quite at this level. As some of you know I'm working on a concept of creating a new form of asset. A forgiveness contract. A brotherhood of forgiveness establishes that they will financially participate in markets of forgiveness based tokens to establish their value in a fractional support methodology. Forgiveness contracts offer forgiveness as long as the party being forgiven has opportunity to object and does not object. In this way the forgiven party becomes a sort of counterparty to the instrument. Rather than simply extinguishing the debt, the brotherhood amplifies the importance of forgiveness by asserting that the forgiven instrument has just as much value as the original debt was worth.
In this way we are using the human heart to pull the world out of the debt slavery. But here it opens up the possibility if "high frequency forgiveness trading".
Sorry if I'm blowing your minds. If you're interested in helping with the projects I'm at [ https://forgivenesscapital.com/ | ForgivenessCapital.com ] and [ https://remedycoin.com/prospectus | RemedyCoin.com/prospectus ] . Some of you may have met me at the Bitshares event in Amsterdam in 2018 where I was introducing the concept of forgiveness based money. Think about it. It has no counterparty risk. It's not a debt instrument. It has intrinsic worth. Your computer programs can move it around, measure it, trade it, etc...
The core provable truth is that we each have infinite personal value. And as long as there is the ability to forgive money into existance for a purpose well then there is less reason to not trust people. Increasing trust, awareness, freedom and creativity in the world for all and less for none is a win, win, win, win proposition!
From: "froooze" [email protected] To: "bitshares/bsips" [email protected] Cc: "Subscribed" [email protected] Sent: Thursday, July 18, 2019 7:43:15 AM Subject: Re: [bitshares/bsips] New BSIP: Global Settlement Protection via core code (#179)
[ https://github.com/Inmortak | @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 [ https://github.com/bitshares/bsips/issues/182 | #182 ]
The limit order can be removed by four different ways:
* market buys the limit order
* settlement protection fund buys the limit order, when balance is bigger than 0
* when debt holder adds enough BTS to reach a CR of 1.1
— You are receiving this because you are subscribed to this thread. Reply to this email directly, [ https://github.com/bitshares/bsips/issues/179?email_source=notifications&email_token=AKNQYWTDAQVJM622LATJL4DQABQOHA5CNFSM4H446YY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2ILBFQ#issuecomment-512798870 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/AKNQYWQDS5AK4T2KMBEPYZLQABQOHANCNFSM4H446YYQ | mute the thread ] .
@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).
@bangzi1001 Yes it requires a hard fork.
@abitmore I liked your overview and picked up on it. Here are my thoughts, and another possibily
Questions for rules that handle CR < 1:
- Does it punish positions that maintain CR > MCR?
- Does the blockchain take over positions that failed to maintain their CR up to a level?
- Does it protect BitAsset holders?
- Does it protect bad margin position holders?
- Does it directly influence the peg?
- Does it avoid the undercollaterization?
- Is collaterization transparency maintained?
- Can the bad position holder recover?
- Is there incentive for the community to remove all CR < 1 positions?
1. Global settlement occurs
- Yes
- Yes, even the ones with CR > 1
- Low: See 2., switches to global settlement mode with fixed settlement price for all, and big gab from CR < 1 to revival (CR >= MCR)
- No: All positions are confiscated, leverage for the user is lost
- Yes, instant force settlement allows arbitrage and margin position creation is not possible to react to demand
- No, it gets distributed among all positions (one pool is created)
- Yes
- No, only through collateral bidding
- No (collateral bidding only gives incentive after CR >= 1 and before CR < MCR)
2. GS protection rule through price feed adjustment (currently active)
Answers:
- No, only through margin call and force settlement like before
- No
- 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
- High: Only margin call and force settlement can affect
- No
- No
- Hidden through manipulated price feed (hidden in the sense of not visible on the blockchain)
- Yes, still owns the positon and can replenish collateral
- 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.
- 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
- Yes
- 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
- No: Positions are confiscated
- Minimal, order wall when price rises
- No, because not all bitassets could be force settled anymore. Essentially, the "last" to settle would be punished
- Yes, but holders need to know how to look for the converted sell order
- No, position is converted and lost
- No, and removal also not possible
4. The "take over under-collateralized debt positions and prevent GS" rule
Answers by this rule:
- No
- Yes
- Medium:
- Force settlement may give you less value due to fixed settlement price
- No: Position is confiscated, leverage for the user is lost
- No
- No
- Yes
- No
- 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:
- No
- No
- Medium:
- Force settlement applies to undercollaterized position
- Medium: Margin call and force settlement affect, if CR<MCR force settlement includes a penalty
- No
- No
- Yes
- Yes, still owns the positon and can replenish collateral
- 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?
@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)?
@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.
The text @bitcrab added is mostly copied from BSIP58. If to implement into core, some can be different.
@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?
@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:
-
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?
-
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)
-
I'm also wondering what you think about using the force settle offset as incentive when margin position has bad CR?
@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.
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?
@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
if there is no further comments, I feel it's time to complete this BSIP and push it forward.
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)?
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.
You are right, having re read it now I think it's acceptable.
My motivation was that it should not sound like this BSIP introduces active devaluation, as this is something that may occur with and without GS. What it certainly does is it introduces transparency compared to current price feed tactic. Thanks.
Does the UI show a CR under 1 or only values over 1?
Does the UI show a CR under 1 or only values over 1?
in UI,there will be only CR>1, however there will be "feed price" and "settlement price", if settlement price>feed price, than feed price/settlement price can tell the actual lowest CR of the bad debt positions, which is less than 1.