Author Topic: New BSIP:GS protection via core code  (Read 3153 times)

0 Members and 1 Guest are viewing this topic.

Offline bitcrab

  • Committee member
  • Hero Member
  • *
  • Posts: 1641
    • View Profile
  • BitShares: bitcrab
  • GitHub: bitcrab
New BSIP:GS protection via core code
« on: July 19, 2019, 07:04:34 am »
I plan to draft a BSIP to implement GS protection via core code, before doing that, I'd like to do some explanation here:

Global Settlement may be the worst way to handle bad debt, because:

1. it settles all the debt positions, including the ones with CR>1
2. it stop the borrowing feature.
3. it make it not easy for the smartcoin to revive, and it's easy to make whales in the revive process, as what happened in bitUSD in recent past.

GS is just like suicide.

another mechanism has been discussed for long time at https://bitsharestalk.org/index.php?topic=27273.0, which can be called "individual settlement", the core idea is that when bad debt appears, instead of triggering GS, only convert the bad debt positions to sell orders at settlement price of that individual debt position.

but this solution also have big issues.

if force settlement is still active after settlement order appears, for example, bad debt positions have been converted to sell orders in 0.04~0.06bitUSD with debts, however, as the market price fall sharply to 0.02bitUSD, bitUSD is off peg, devaluated to about 0.6USD.

which means, feed price is 0.02USD, DEX price is 0.033 bitUSD.

then bitUSD holders begin to exploit debt position owners with force settlement.

even worse, the last bitUSD balance cannot do force settlement, it can only fill the settlement orders with higher price.

this process is unfair to the debt position owners and the last bitUSD holders, and will not help things to recover.

then how about disable force settlement feature while settlement order appear?

then bitUSD holders can only fill the settlement orders from lower price to higher price, in other words, from debt positions from higher CR to lower CR, and filling some settlement orders will devalue bitUSD more, as the left settlement orders has higher price.

after considering this, I think a good mechanism need to follow base principle:

1.do not stop the borrowing feature.
2.ensure smartcoin holders to settle bad debt positions from lower CR to higher CR.
3. accept the possibility that the smartcoin will devalue, just try to minimize the hurting to the ecosystem.

GS protection is perfect to suit the above principle.

GS protection ensure the feed price be above the GS price, this is irrelevant to market manipulation or price faking, it is just to force the smartcoin holders to settle the bad debt position with lowest CR first. and filling margin call orders will reduce GS price and also feed price as well and have chance to end the bad debt, this is a way to let the market do the choice.

in the last several days we have seen that this mechanism protect bitUSD from one more time black swan, it works well, however now it depend on witnesses' work and not 100% reliable, to switch to realize the mechanism via core code will help to make it 100% reliable.

 

« Last Edit: July 19, 2019, 07:47:51 am by bitcrab »

Offline sschiessl

Re: New BSIP:GS protection via core code
« Reply #1 on: July 19, 2019, 07:12:25 am »
Let's assume we want to explicitly allow undercollaterization. In my opinion, a more suitable way would be to implement a bitasset parameter "prevent global settlement", which then can be turned on by committee, and leave the price feed as is. Then the undercollaterization is transparent.

What are your thoughts on that?

Offline bitcrab

  • Committee member
  • Hero Member
  • *
  • Posts: 1641
    • View Profile
  • BitShares: bitcrab
  • GitHub: bitcrab
Re: New BSIP:GS protection via core code
« Reply #2 on: July 19, 2019, 07:36:44 am »
Let's assume we want to explicitly allow undercollaterization. In my opinion, a more suitable way would be to implement a bitasset parameter "prevent global settlement", which then can be turned on by committee, and leave the price feed as is. Then the undercollaterization is transparent.

What are your thoughts on that?

what does bad debt mean? which means the debt in the position cannot be fully paid by selling the collateral with margin call/force settlement referencing the market price.

then you choose to disable margin call and force settlement while bad debt appears? or you allow the existence of a debt position with pure debt and 0 BTS?

« Last Edit: July 19, 2019, 08:00:34 am by bitcrab »

Offline Bangzi

  • Sr. Member
  • ****
  • Posts: 290
    • View Profile
    • Steemit: Bangzi
  • BitShares: bangzi
Re: New BSIP:GS protection via core code
« Reply #3 on: July 19, 2019, 08:28:32 am »
1.do not stop the borrowing feature.
Yes

2.ensure smartcoin holders to settle bad debt positions from lower CR to higher CR.
Even better, Smartcoin holders does not need to use their BitAssets to settle bad debt which mean number of BitCNY/USD will not reduced.

3. accept the possibility that the smartcoin will devalue, just try to minimize the hurting to the ecosystem.
Yes. No price manipulation required and under collateralized time will be shorter than GS protection due to huge incentive.

Please check this:
https://bitsharestalk.org/index.php?topic=27273.msg332494#msg332494
Please Vote for My Witness: Bangzi
请投票支持比特股见证人: Bangzi
Witness Update: https://bitsharestalk.org/index.php?topic=26459.0

Offline bitcrab

  • Committee member
  • Hero Member
  • *
  • Posts: 1641
    • View Profile
  • BitShares: bitcrab
  • GitHub: bitcrab
Re: New BSIP:GS protection via core code
« Reply #4 on: July 19, 2019, 08:41:19 am »
1.do not stop the borrowing feature.
Yes

2.ensure smartcoin holders to settle bad debt positions from lower CR to higher CR.
Even better, Smartcoin holders does not need to use their BitAssets to settle bad debt which mean number of BitCNY/USD will not reduced.

3. accept the possibility that the smartcoin will devalue, just try to minimize the hurting to the ecosystem.
Yes. No price manipulation required and under collateralized time will be shorter than GS protection due to huge incentive.

Please check this:
https://bitsharestalk.org/index.php?topic=27273.msg332494#msg332494

this is similar to the individual settlement solution with disabling force settlement as described above, and has similar disadvantages.

another disadvantage is that this is so complicated for common users to understand, and also cost big development efforts.

Offline sschiessl

Re: New BSIP:GS protection via core code
« Reply #5 on: July 19, 2019, 09:09:52 am »
Let's assume we want to explicitly allow undercollaterization. In my opinion, a more suitable way would be to implement a bitasset parameter "prevent global settlement", which then can be turned on by committee, and leave the price feed as is. Then the undercollaterization is transparent.

What are your thoughts on that?

what does bad debt mean? which means the debt in the position cannot be fully paid by selling the collateral with margin call/force settlement referencing the market price.

then you choose to disable margin call and force settlement while bad debt appears? or you allow the existence of a debt position with pure debt and 0 BTS?

Margin call price would need to be adjusted. If CR is less than MSSR, adjust the price such that the full debt would be bought (which is essentially their global settlement price). If CR is higher, use existing rules. Force settlement would still eat the least collaterized positions first, in that sense the punishment goes to holders that decide to force settle instead of sell on the market. Incentivization would be possible by adjusting the force settlement price if it settle a margin position with CR < MCR (the force settlement offset could then be MSSR (punishment for margin position holder)).

For the bitasset holders it is similar as compared to being in global settlement state.

With "prevent global settlement flag":
 - bitasset holder can sell into the margin calls which is equal or even better compared to global settlement price instead of force settling
 - bitasset holder can force settle, accepting the undercollaterization
 - margin position holder can recollaterize
 - new margin positions can be created
 - margin positions with CR < 1 receive a bit of protection that is shifted to bitasset holders iff they are using force settlement, on the other hand force settling is incentivized if applied to a margin position that is currently being called

Offline Bangzi

  • Sr. Member
  • ****
  • Posts: 290
    • View Profile
    • Steemit: Bangzi
  • BitShares: bangzi
Re: New BSIP:GS protection via core code
« Reply #6 on: July 19, 2019, 09:14:15 am »
this is similar to the individual settlement solution with disabling force settlement as described above, and has similar disadvantages.
Those debt in settlement pool are <1 MCR and thus is unfair for BitAsset who use force settlement, so force settle does not apply to those in settlement pool.
No need to disable force settlement for those in low CR list with MCR =>1.


another disadvantage is that this is so complicated for common users to understand, and also cost big development efforts.
Honestly, this is for advance players eg. alt, clockwork etc with some capital because huge reward come with huge risk.
The core team have more than enough $$$ on hand.
Please Vote for My Witness: Bangzi
请投票支持比特股见证人: Bangzi
Witness Update: https://bitsharestalk.org/index.php?topic=26459.0

Offline bitcrab

  • Committee member
  • Hero Member
  • *
  • Posts: 1641
    • View Profile
  • BitShares: bitcrab
  • GitHub: bitcrab
Re: New BSIP:GS protection via core code
« Reply #7 on: July 19, 2019, 09:55:13 am »

Margin call price would need to be adjusted. If CR is less than MSSR, adjust the price such that the full debt would be bought (which is essentially their global settlement price). If CR is higher, use existing rules. Force settlement would still eat the least collaterized positions first, in that sense the punishment goes to holders that decide to force settle instead of sell on the market. Incentivization would be possible by adjusting the force settlement price if it settle a margin position with CR < MCR (the force settlement offset could then be MSSR (punishment for margin position holder)).

For the bitasset holders it is similar as compared to being in global settlement state.

With "prevent global settlement flag":
 - bitasset holder can sell into the margin calls which is equal or even better compared to global settlement price instead of force settling
 - bitasset holder can force settle, accepting the undercollaterization
 - margin position holder can recollaterize
 - new margin positions can be created
 - margin positions with CR < 1 receive a bit of protection that is shifted to bitasset holders iff they are using force settlement, on the other hand force settling is incentivized if applied to a margin position that is currently being called

what you describe is very similar to "individual settlement with force settlement", the disadvantage has been already discussed above.

Offline bitcrab

  • Committee member
  • Hero Member
  • *
  • Posts: 1641
    • View Profile
  • BitShares: bitcrab
  • GitHub: bitcrab
Re: New BSIP:GS protection via core code
« Reply #8 on: July 19, 2019, 09:57:31 am »
this is similar to the individual settlement solution with disabling force settlement as described above, and has similar disadvantages.
Those debt in settlement pool are <1 MCR and thus is unfair for BitAsset who use force settlement, so force settle does not apply to those in settlement pool.
No need to disable force settlement for those in low CR list with MCR =>1.


disadvantage of "individual settlement with force settlement" has also been discussed above.

Offline sschiessl

Re: New BSIP:GS protection via core code
« Reply #9 on: July 19, 2019, 10:16:14 am »
then bitUSD holders begin to exploit debt position owners with force settlement.

even worse, the last bitUSD balance cannot do force settlement, it can only fill the settlement orders with higher price.

I don't understand how that exploit works. If I force settle while there are positions with CR < 1 are present, I settle for BTS that are worth less then 1 USD, accepting the undercollaterization. This also closes out the bad margin position, but that is of course the risk of running a undercollaterized position (it's a loss-loss scenario so I expect this is not an exploit for you). In my scenario force settlement still eats the margin position with least CR. There will of course be margin call orders with a price different than the feed price, but that does not force the traders to deviate from the peg. Can you please make another example please?

Offline bitcrab

  • Committee member
  • Hero Member
  • *
  • Posts: 1641
    • View Profile
  • BitShares: bitcrab
  • GitHub: bitcrab
Re: New BSIP:GS protection via core code
« Reply #10 on: July 19, 2019, 10:45:07 am »
then bitUSD holders begin to exploit debt position owners with force settlement.

even worse, the last bitUSD balance cannot do force settlement, it can only fill the settlement orders with higher price.

I don't understand how that exploit works. If I force settle while there are positions with CR < 1 are present, I settle for BTS that are worth less then 1 USD, accepting the undercollaterization. This also closes out the bad margin position, but that is of course the risk of running a undercollaterized position (it's a loss-loss scenario so I expect this is not an exploit for you). In my scenario force settlement still eats the margin position with least CR. There will of course be margin call orders with a price different than the feed price, but that does not force the traders to deviate from the peg. Can you please make another example please?

you cannot force settle debt positions with CR<1 with market price, as that will lead to a debt position with pure debt and 0 collateral, which is not allowed.

you can only force settle debt position with CR<1 with price higher than market price, bitUSD holders obviously will select to force settle debt positions with CR>=1, as it is cheaper.

while bad debt appear, bitUSD is easily be devaluated, as it is not backed by sufficient BTS.

you use devaluated bitUSD(insufficient collateral) to force settle a debt position in market price, is it fair?
« Last Edit: July 19, 2019, 10:48:22 am by bitcrab »

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 3829
    • View Profile
    • Steemit Blog
  • BitShares: abit
  • GitHub: abitmore
Re: New BSIP:GS protection via core code
« Reply #11 on: July 19, 2019, 12:23:47 pm »
Why have many threads to discuss the same thing?

https://github.com/bitshares/bsips/issues/179#issuecomment-512175417

IMHO @bitcrab and @sschiessl were essentially saying the same thing, which is the 2nd option as I described in the BSIP issue: simple GS protection.
* allow undercollateralization
* no globally settlement
* no individual settlement, the system don't take over the undercollateralized debt positions
* when undercollateralization happens and someone tries to settle, fill the settlement request with the positions with lowest CR first, so first settler will get less

I'm for the 4th option now:
* allow undercollateralization
* no globally settlement
* has individual settlement, the system take over the undercollateralized debt positions (which would form a pool)
* when undercollateralization happens and someone tries to settle, fill the settlement request with the positions with lowest CR (can be the pool) first, so first settler will get less

I think the mechanism that I proposed in https://bitsharestalk.org/index.php?topic=27273 favors debt holders too much.
* allow undercollateralization
* no globally settlement
* has individual settlement, the system take over the undercollateralized debt positions (which would form a pool)
* when undercollateralization happens and someone tries to settle, fill the settlement request with the fully-collateralized positions with lowest CR (can be the pool) first, so settlers will always get the same unless the asset is globally undercollateralized.


Perhaps best if the core provide all the options, and let asset owners decide to choose which one.
« Last Edit: July 19, 2019, 12:34:23 pm by abit »
BTS account: abit
BTS committee member: abit
BTS witness: in.abit

Offline sahkan

  • Sr. Member
  • ****
  • Posts: 231
    • View Profile
    • BitShares DEX
Re: New BSIP:GS protection via core code
« Reply #12 on: July 19, 2019, 12:52:15 pm »
How about we just increase MSSR to to least 5%? Margin calls will be bought before GS happens. If you continue to 100% protect the debt holders GS events will happen all the time.

If you settle the under collateralized positions to smart coin owners that's just stealing from them and goes against DEX rules.

Online binggo

  • Hero Member
  • *****
  • Posts: 1477
    • View Profile
Re: New BSIP:GS protection via core code
« Reply #13 on: July 19, 2019, 12:59:14 pm »
The market will run as your thought? en,that's very interesting.

How about we just increase MSSR to to least 5%? Margin calls will be bought before GS happens. If you continue to 100% protect the debt holders GS events will happen all the time.

If you settle the under collateralized positions to smart coin owners that's just stealing from them and goes against DEX rules.

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 3829
    • View Profile
    • Steemit Blog
  • BitShares: abit
  • GitHub: abitmore
Re: New BSIP:GS protection via core code
« Reply #14 on: July 19, 2019, 01:21:02 pm »
How about we just increase MSSR to to least 5%? Margin calls will be bought before GS happens. If you continue to 100% protect the debt holders GS events will happen all the time.
Last time bitUSD MSSR is 10%, GSed.
This time bitUSD MSSR is 2%, GS-protected.

This means "MSSR" is irrelevant to whether undercollateralization will happen.

Quote
If you settle the under collateralized positions to smart coin owners that's just stealing from them and goes against DEX rules.

The word "settle" is used in too many places but means different things.

Perhaps we need to find a better word.

Force settle - bitUSD holders will pay bitUSD to debt position holders or the GS pool and get BTS
Globally settle - all debt positions will be closed and a pool will be formed, nothing changes to bitUSD holders
Individual settle - undercollateralized debt positions ( whose CR < a special threshold) will be closed and the collateral will be put into a pool, nothing changes to bitUSD holders

What did you mean when saying the one word "settle"?

And what's "against DEX rules" in your sentense?
IMHO, rules can be changed if BTS token holders agree to change via stake-based voting, that's why we have BSIPs. That's why we're discussing how to change.
« Last Edit: July 19, 2019, 01:25:40 pm by abit »
BTS account: abit
BTS committee member: abit
BTS witness: in.abit