bitshares-core icon indicating copy to clipboard operation
bitshares-core copied to clipboard

Allow owner of a UIA to close markets and stop trading in a UIA

Open dnotestein opened this issue 6 years ago • 11 comments

User Story As a UIA owner, I want to be able to discontinue usage of my UIA, either temporarily or permanently. One example is that I'm transitioning from an OLD UIA to a new UIA with different characteristics and I want to force an exchange between the two assets. Another case is when the asset gets hacked and I want to claim it back from hacked accounts. In such cases, I can't claim back the asset if the asset is tied up in open exchange orders.

CORE TEAM TASK LIST

  • [ ] Evaluate / Prioritize Feature Request
  • [ ] Refine User Stories / Requirements
  • [ ] Define Test Cases
  • [ ] Design / Develop Solution
  • [ ] Perform QA/Testing
  • [ ] Update Documentation

dnotestein avatar Jun 07 '18 14:06 dnotestein

Please specify more precisely what you mean with "discontinue usage". The two examples given are quite different.

pmconrad avatar Jun 07 '18 19:06 pmconrad

Thank you for providing the detailed User Story @dnotestein.

Please note: I unticked the items in the Core Team Task List within the Description. The intention there is for the Core team to tick them off as the Issue is developed. We also use the 2 Series of Labels to indicate the progression. Once we finish disucssing the Issue, this one will get prioritized on the Unassigned - Protocol Enhancements project board. Then we will tick the box on the Core Team Task List and change the Label to 2 Gathering Requirements...

ryanRfox avatar Jun 07 '18 20:06 ryanRfox

I guess some of the functionalities (if not all) described in OP are already implemented, check whitelist_markets and blacklist_markets in bitshares-core/libraries/chain/include/graphene/chain/protocol/asset_ops.hpp:

https://github.com/bitshares/bitshares-core/blob/f1b19b15629cd02669a94f2af16eeaec7f54b3f6/libraries/chain/include/graphene/chain/protocol/asset_ops.hpp#L68-L71

By the way, funds in hacked accounts can also be stuck in other objects e.g. vesting balances, collateral and etc, but not only limit orders.

abitmore avatar Jun 07 '18 21:06 abitmore

@abitmore With the fields you mentioned above, how would you cancel existing orders? Does blacklisting cancel existing orders? Also, what state would you use to say this asset can't be traded in any market? I'm assuming you could use whitelist to say it could only trade against one market, but it's not obvious to me how you could then prevent it from trading in that market. Maybe whitelist it AND blacklist it against that one market?

dnotestein avatar Jun 08 '18 19:06 dnotestein

@dnotestein If I'm not mistaken, your conclusion is correct. Blacklist "trumps" whitelist so to speak so if you had it whitelisted for one market and then blacklist it, it will in fact disallow trading.

clockworkgr avatar Jun 08 '18 20:06 clockworkgr

https://github.com/bitshares/bitshares-core/blob/f1b19b15629cd02669a94f2af16eeaec7f54b3f6/libraries/chain/market_evaluator.cpp#L45-L48

abitmore avatar Jun 08 '18 21:06 abitmore

what state would you use to say this asset can't be traded in any market

Check asset PEERPLAYS for example, the answer is to add itself to the whitelist.

abitmore avatar Jun 08 '18 21:06 abitmore

Does blacklisting a market cancel existing orders in that market? Seems like it should if it doesn't.

dnotestein avatar Jun 09 '18 20:06 dnotestein

It doesn't. The change worth a BSIP.

abitmore avatar Jun 09 '18 20:06 abitmore

@dnotestein mentioned in https://github.com/bitshares/bitshares-ui/issues/2695#issuecomment-512043533:

With the recent hack of btsmd accounts, I think it's worth bringing back up this issue for possible inclusion in an update.

At the very least, it's a new use-case for when it could be useful for protecting buyers. And save some of bitshares reputation when such hacks take place.

I've been asked by abit to write a BSIP for this, but unfortunately I don't have the time for that. I took a quick look at the BSIP repo, and it doesn't seem to be a small task. Still, if there is someone with the time (or say, getting paid) to do so, I think it's an idea worth implementing.

And there is a related BSIP draft: https://github.com/bitshares/bsips/issues/148

abitmore avatar Jul 17 '19 11:07 abitmore

https://github.com/bitshares/bsips/blob/master/bsip-0045.md Relevant BSIP - an user could create a smartcoin with your uia as collateral to bypass such rules.

grctest avatar Feb 14 '23 15:02 grctest