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

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

Open
6 tasks
dnotestein opened this issue Jun 7, 2018 · 11 comments
Open
6 tasks

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

dnotestein opened this issue Jun 7, 2018 · 11 comments
Labels
1b User Story The User Story details a requirement. It may reference a parent Epic. It may reference child Task(s) 2a Discussion Needed Prompt for team to discuss at next stand up. 3b Feature Classification indicating the addition of novel functionality to the design 6 API Impact flag identifying the application programing interface (API) 6 CLI Impact flag identifying the command line interface (CLI) wallet application 6 DEX Impact flag identifying the Decentralized EXchange, market engine, etc. 6 Protocol Impact flag identifying the blockchain logic, consensus, validation, etc. hardfork

Comments

@dnotestein
Copy link

dnotestein commented Jun 7, 2018

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
@pmconrad
Copy link
Contributor

pmconrad commented Jun 7, 2018

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

@ryanRfox ryanRfox added 1b User Story The User Story details a requirement. It may reference a parent Epic. It may reference child Task(s) 2b Gathering Requirements Status indicating currently refining User Stories and defining Requirements 3b Feature Classification indicating the addition of novel functionality to the design 6 API Impact flag identifying the application programing interface (API) 6 CLI Impact flag identifying the command line interface (CLI) wallet application 6 Protocol Impact flag identifying the blockchain logic, consensus, validation, etc. 6 DEX Impact flag identifying the Decentralized EXchange, market engine, etc. labels Jun 7, 2018
@ryanRfox ryanRfox added 2a Discussion Needed Prompt for team to discuss at next stand up. and removed 2b Gathering Requirements Status indicating currently refining User Stories and defining Requirements labels Jun 7, 2018
@ryanRfox
Copy link
Contributor

ryanRfox commented Jun 7, 2018

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...

@abitmore
Copy link
Member

abitmore commented Jun 7, 2018

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:

/** defines the assets that this asset may be traded against in the market */
flat_set<asset_id_type> whitelist_markets;
/** defines the assets that this asset may not be traded against in the market, must not overlap whitelist */
flat_set<asset_id_type> blacklist_markets;

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.

@dnotestein
Copy link
Author

@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?

@clockworkgr
Copy link
Member

@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.

@abitmore
Copy link
Member

abitmore commented Jun 8, 2018

if( _sell_asset->options.whitelist_markets.size() )
FC_ASSERT( _sell_asset->options.whitelist_markets.find(_receive_asset->id) != _sell_asset->options.whitelist_markets.end() );
if( _sell_asset->options.blacklist_markets.size() )
FC_ASSERT( _sell_asset->options.blacklist_markets.find(_receive_asset->id) == _sell_asset->options.blacklist_markets.end() );

@abitmore
Copy link
Member

abitmore commented Jun 8, 2018

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.

@dnotestein
Copy link
Author

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

@abitmore
Copy link
Member

abitmore commented Jun 9, 2018

It doesn't. The change worth a BSIP.

@abitmore
Copy link
Member

@dnotestein mentioned in bitshares/bitshares-ui#2695 (comment):

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: bitshares/bsips#148

@grctest
Copy link

grctest commented Feb 14, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1b User Story The User Story details a requirement. It may reference a parent Epic. It may reference child Task(s) 2a Discussion Needed Prompt for team to discuss at next stand up. 3b Feature Classification indicating the addition of novel functionality to the design 6 API Impact flag identifying the application programing interface (API) 6 CLI Impact flag identifying the command line interface (CLI) wallet application 6 DEX Impact flag identifying the Decentralized EXchange, market engine, etc. 6 Protocol Impact flag identifying the blockchain logic, consensus, validation, etc. hardfork
Projects
None yet
Development

No branches or pull requests

6 participants