Minimal required changes to revive a BitShares MPA after a black swan event?

in #bitshares8 years ago

Motivation

On #bitshares, market-pegged assets, aka MPA, aka #SmartCoin s, can suffer a "black swan" event. A black swan occurs when the least collateralized short position has insufficient collateral to buy back the borrowed SmartCoins at the current feed price. What happens then is that the MPA is tagged with a "settlement price", defined as the collateral ratio of the least collateralized short. All short positions are closed automatically, by collecting sufficient collateral into a settlement pool and paying out the remainder to the short's owners. MPA holders can use the forced settlement operation to receive their share from the settlement pool in exchange for their MPAs.

MPAs that have suffered a black swan are effectively dead. They can still be transferred or traded, but they can no longer be shorted. Eventually, all significant holders wlll have settled their positions, and some dust will remain scattered all over the place, where the value of the dust position is lower than the fees required to get rid of it.

The same is true for #Prediction-Markets. Prediction Markets don't suffer black swans, but at some point the prediction will be resolved in the same way that an MPA resolves a black swan - i. e. a settlement price is defined, short positions are closed, and holders can settle their positions individually. After that, the Prediction Market is effectively dead.

The most recent example of a black swan is #GRIDCOIN, and I think it has left a bad impression on its issuer, and serves as a bad example for possible future candidates:

That's unfortunate & quite a short lived experiment in BitShares by the Gridcoin community then. [...] I hope black swan handling/recovery functionality is added into BitShares in the future, time to look into other DEXs.

I also believe that the one-shot property is one of the major reasons why prediction markets haven't gained traction yet.

Goal

I'd like to find a minimally invasive way to revive assets after a global settlement or black swan event. Since we currently don't have a designated dev team, this will have to be done as a community effort. Community support is also required because we need to implement and accept a hardfork for this.

I'm looking for a "minimally invasive" solution because

  • I want to avoid breaking things, obviously.
  • I hope a small change can be done without the usual hassle with worker proposals. I'd volunteer to implement changes, but I will need help testing.

Starting point

Reviving MPAs / PMs consists of two basic steps, IMO:

  1. Resolve all open positions
  2. Reset the asset object in the database to a usable state

I believe the second step is safe to do after the first has been completed.

  • For an MPA, it is sufficient to remove the settlement price. Once it has been removed, price feeds can be published again, and with sufficient price feeds, shorting becomes possible.
  • PMs should be reset into a state that requires issuer action to re-enable shorting, possibly by setting some flags at the time the settlement price is removed.
    Both can be done within a maintenance interval at little computational cost.

The first step, however, looks much trickier to me. For example, I'm not clear about what are "open positions":

  • holders
  • market orders (sell and buy)
  • shorts that use the to-be-revived asset as collateral (?)
  • fee pool
  • anything else?

For each type of "open position", we need a way to close it. Suggestions:

  • Resolve holders by allowing the issuer to invoke forced settlement if the asset has a settlement_price.
  • Resolve market orders by allowing the issuer to cancel orders if one of the assets has a settlement_price.
  • Ignore the fee pool - it belongs to the issuer anyway.
  • For shorts I don't see a solution, but that should be a rare case. I hope.
  • Anything else?

By allowing the issuer to take action we avoid overly complex computations. The fees should be paid by the issuer. We might want to offer a reduced settlement fee in that case, since protecting shorters is not necessary at this point.

Please join the discussion on BitSharesTalk!

Sort:  

I support this as member of the commitee and will support (after review) a hard fork to resolve the issue so that we can also reenable SEK and RUB.

I can also offer to hard fork the testnet to allow wide online testing ..

I support this hard fork too.
Also, since there has not been any hard fork for a long time, the whole community actually accumulated a lot of requirement for bug fixing or new functions. How about the committee start a proposal to pay for developers to make a better version?

Thanks @cyrano.witness, I appreciate the write up - I was going to do a write up on this topic but have been swamped with Gridcoin things recently.

I'm very interested in seeing the current 'black swan' state resolved for the Gridcoin MPA, however this will likely continue occuring due to the volatility of Gridcoin's marketcap.

On a positive note - this is a great learning opportunity for all BTS users, it's not often that black swan events occur, better for it to happen on a new MPA than one of the large ones (fiat/btc).

I'm not going to give up on BTS, i've been holding BTS since BTSX so i'm very much so interested in seeing it succeed.

I've promoted your post, let's hope some Bitshares users join in the conversation! :)

Resolve holders by allowing the issuer to invoke forced settlement if the asset has a settlement_price.

The Gridcoin MPA does not have the permission "override_authority: Issuer may transfer asset back to himself" as it was surrendered in the pursuit of decentralization. https://steemit.com/bitshares/@cm-steem/should-the-bitshares-committee-surrender-overreaching-mpa-permissions

There are currently only 4 holders of the GRIDCOIN MPA, I attempted to 'settle' my balance but without a price feed it doesn't work - we could potentially approach the 3 other users with the correct instructions to resolve the current black swan state, but if in the future we had 100+ holders this would be far more difficult.

I intend to discuss/mention this matter in episode #194 of the BeyondBitcoin hangout.

i need it for trade ....!
do you need it ?

I think that this might move something. The bts community needs a strong push up

I always said gridcoin wasn't a suitable MPA as most altcoins aren't. This is because they are volatile and can spike 100% wiping out the collateral backing them. Only stable assets like USD make sense as MPAs.

Yeah, fair enough but that doesn't dismiss the fact that handling of black swan events for smartcoins still needs to be discussed. A black swan event could occur for bitBTC, bitOil and potentially the fiat smartcoins (implying fiat currencies won't collapse at some point in the future) & using the Gridcoin MPA as a testbed for these scenarios could be productive for the BTS community/developers overall.

In terms of stable assets being suitable as MPAs, that's subjective. I'd rather not be 100% reliant on exchange backed assets (centralized) for storing/trading Gridcoin on the BTS DEX.

Perhaps a sidechain (or a 2-way-pegged asset) would make more sense than an MPA, but such functionality does not exist yet.

We should be careful not to choose bitassets that will have a high chance of black Swan event. Because any black Swan events will reduce people's trust in bitassets. Sidechains will be amazing if someone makes them work one day.

It's ultimately up to users to evaluate the risk of holding market pegged assets.

Had the Gridcoin MPA not been created, we wouldn't be talking about how to recover MPAs from a black swan event - something that will (most likely) happen in the future for existing smartcoins.

I agree that a side chain or 2-way peg for Gridcoin to be traded/stored in a decentralized manner on the BTS platform (without involving exchange backed assets nor BTS collateral) would be better than an MPA, but sidechains aren't in production yet.

I've enquired about getting Gridcoin added as one of the first sidechains, looking forwards to hearing back from the bunkerchainlabs guys.

While I do agree with jonnybitcoin that the best candidates for bitassets early on are fiat and other highly traded commodities, I also think that getting cryptocommunities onboard to work on bitassets and experimenting with them is the only way we find the best ways to help bitassets succeed in general. The more we learn (and document), the better we all are.

I don't think it looks badly on bitassets in general as long as people are informed that bitassets with low liquidity can be dangerous.

As for sidechains, its a great idea and one we should all work toward.

I really would like to "hear" bytemaster's opinion on that matter.

As would I, he used to write blog posts on black swan events.

Congratulations @cyrano.witness! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Thanks for the information @crrano.witness
very help me
follow me @hattaarshavin

Congratulations @cyrano.witness! You have received a personal award!

2 Years on Steemit
Click on the badge to view your own Board of Honor on SteemitBoard.

Upvote this notificationto to help all Steemit users. Learn why here!

@cyrano.witness you were flagged by a worthless gang of trolls, so, I gave you an upvote to counteract it! Enjoy!!

Congratulations @cyrano.witness! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 3 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Do not miss the last post from @steemitboard:

The Steem blockchain survived its first virus plague!
Vote for @Steemitboard as a witness to get one more award and increased upvotes!