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

Develop coin control section #22

Closed
moneyball opened this issue Sep 10, 2020 · 24 comments · Fixed by #90
Closed

Develop coin control section #22

moneyball opened this issue Sep 10, 2020 · 24 comments · Fixed by #90
Labels
Help wanted Extra attention is needed

Comments

@moneyball
Copy link
Contributor

Already some great thinking here https://www.figma.com/file/mPoRMRTBOvi61M8psIp4XY/Coin-Control?node-id=0%3A1

@GBKS
Copy link
Contributor

GBKS commented Sep 11, 2020

I'd love to see an outline of practical use cases for coin control.

It seems like actual coin selection is not an isolated UI thing, but part of general wallet management. Meaning that I only know which coins I want to select for a transaction when I have labelled my transactions/inputs properly beforehand (knowing where they came from), and understand why I should choose specific coins for a transaction to get whatever result I have in mind.

Not knowing a ton of detail, it would be ideal to avoid manual coin selection. What if the wallet can have a few coin control preferences that automatically picks coins for me? If it is connected to a full node, can it run some analysis and tell me what I should do?

As a user, I'd also like to know if I did my coin selection properly. How do I know whether it "worked"?

I personally would find it much easier to design an interface with these question discussed.

@GBKS GBKS added this to Ideas & suggestions in Content via automation Sep 11, 2020
@GBKS GBKS added the Help wanted Extra attention is needed label Sep 11, 2020
@GBKS
Copy link
Contributor

GBKS commented Sep 14, 2020

We just talked about this in the design review session. Two use cases that come up were:

  1. Privacy, like not sending coins from well-known exchanges in specific transactions since that could expose some information about you
  2. Bundling many small outputs into a single input to reduce fees for future transactions

With those in mind, it would be easier to create a more focused UI beyond general selection features. For example, a wallet can auto-detect if outputs are piling up and recommend a clean-up at an appropriate time. For the first case, a simple "Sender is an exchange" checkbox might suffice (or maybe a community-generated list of exchange addresses could be loaded in some privacy-preserving way) with a matching "Exclude exchange coins" during the send flow. Either way, a manual selection feature might be needed, with those smarter options layered on top.

@pedromvpg
Copy link
Collaborator

@Bosch-0
Copy link
Collaborator

Bosch-0 commented Sep 14, 2020

Something to add that I mentioned in today's design review call around having buckets (though I prefer the term folders now).
The idea is that users create 'folders' to group UTXOs based on various features (privacy being the primary one currently) similar to how someone would create a folder in their email client to organize their inbox (currently CoinControl UI is just an inbox - this is hard to navigate).

This would exist alongside clever UTXO labeling (such as using hash based icons for each). A privacy focused example would be to only combine UTXOs within designated folders that have a set level of privacy associated with that folder. Instead of individually selecting UTXOs the user could just do something like 'send 0.253 BTC from folder x to address y' once they have assessed the threat model of the receiver. You could design the UI to look like an email inbox which would be familiar to most people with the folders on the left and UTXOs listed the right.

Folder examples:

Taint free folder - Not concerned about privacy (e.g. UTXOs from close friends)
Minor taint folder - Moderately concerned about privacy (e.g. (UTXOs tied to sordid purchases)
Tainted folder - Very concerned about privacy (e.g. UTXOs from a KYC exchange).
Dust folder - contains small UTXO sets (user could even be prompted when this folder combined is worth consolidating and move combined UTXOs into another folder).

Users should be able to create folders, name them what they want, give descriptions to folders and group UTXOs in them how they like.

If there is any major concerns with this idea let me know - keen to do up a mock up to illustrate this further.

@pedromvpg
Copy link
Collaborator

  • Buckets
  • Folders
  • Groups
  • Clusters (like wasabi)

@moneyball
Copy link
Contributor Author

@GBKS a drawback to simplifying and only presenting "is from an exchange" is that it doesn't capture other privacy-sensitive things such as

  1. dust attacks
  2. received coins can come from non-exchanges but still have PII associated with them (from a gaming site, from a merchant site like purse.io, from an employer, etc.)

@GBKS
Copy link
Contributor

GBKS commented Sep 15, 2020

So much good information already in this thread, thanks everyone.

@pedromvpg good stuff. Is this something you are actively working on or more of an exploration to get thoughts "on paper"?

@Bosch-0 do you think this way of organizing transactions could be moved up to an account level? So just like I have a business and a personal account with my bank, I could have multiple accounts that match the taint risks you outlined but use a mental model that people are already familiar with (business, personal spending, social/friends/family, investment)? I am just thinking that all these organizational systems can so easily pile up, make the UI complex and confuse people. Maybe when you create an account, you can choose what privacy level you want to assign and then the UI gives you appropriate tips? Not sure what the right answer is, maybe a matter of mocking up ideas and prototyping...

@moneyball could dust attacks be automatically identified by wallets? Seems very suspicious to randomly receive a few satoshi.

And for PII, what are the risks? Tons of people these days use reward cards and seem comfortable when companies build profiles of their shopping behaviors. It would, of course, be great to prevent that, but in the end it's "fairly harmless" compared to risks like getting hacked and losing all your money.

Drilling down into all of these things might allow us to come up with some elegant solutions (I hope :)). I tried to summarize and structure things in this Google Doc, feel free to edit.

@Bosch-0
Copy link
Collaborator

Bosch-0 commented Sep 15, 2020

Yeah you could have a structure like:

Account 1 - spending
-UTXO 'folder' one
-UTXO 'folder' two
Account 2 - savings
-UTXO 'folder' one
-UTXO 'folder' two

etc. though this could get messy.

I'll think about this in more depth soon and do some mockups.

@moneyball
Copy link
Contributor Author

Ledger just added support https://twitter.com/P3b7_/status/1305966436851089408

@GBKS
Copy link
Contributor

GBKS commented Sep 16, 2020

These are the coin selection strategies Ledger supports (source).

Screen Shot 2020-09-16 at 8 17 26 AM

@moneyball
Copy link
Contributor Author

@GBKS yes good point about automatic detection of dust attacks. It isn't possible to be certain of one, but the pattern is pretty obvious as the minimum amount of sats is (537) is typically used in the attack. so if 537 sats is sent to an address that already has received bitcoin before could be flagged and perhaps a wallet would auto-freeze that UTXO and warn the user. This is a good example of a best practice we can share in our design guide and AFAIK no wallet does this.

@moneyball
Copy link
Contributor Author

@GBKS regarding this: "And for PII, what are the risks? Tons of people these days use reward cards and seem comfortable when companies build profiles of their shopping behaviors. It would, of course, be great to prevent that, but in the end it's "fairly harmless" compared to risks like getting hacked and losing all your money."

Is this a question about financial privacy overall? I'd break it down into 2 things:

  1. The blockchain is public. So to the extent that an individual's financial transactions are public that has more consequences than if only Visa, Square, or a government has access.
  2. Society used to be cash-based which provided a level of privacy that today's digital money does not provide.

I'm not sure if I'm addressing your question so let me know if it is more nuanced.

@GBKS
Copy link
Contributor

GBKS commented Sep 17, 2020

@moneyball bigger picture, what I am trying to figure out is how a user should practically think about these risks. This is something that also came up today in the Bitcoin Core GUI call and hebasto referred me to the Privacy section of the Bitcoin wiki. It has a really thorough outline, but also a great and case studies. I'll study this and see if helps me think through this better.

@s-5Q2X8mgeGR
Copy link

s-5Q2X8mgeGR commented Sep 19, 2020

Sort of similar to the folder/groups/etc described above, I had following idea some time ago: https://bitcoindesign.slack.com/archives/C014BHV38EA/p1595323833349900, on what I've now started to think of as a "simplified coin control with presets", see attached PDF for example design using Blockstream Green.

Concept: "Simplified coin control with presets"

  • To get an receive addr, user select a suitable preset. Also, enter reference (label).
  • To send, select preset, and also enter reference.
  • When sending, use preset-matching utxos as input to transactions. Eg., "From exchange" received UTXOs used in "To exchange" transaction. Additionally, when entering reference, offer autocomplete based on users prior entries, to also try match by reference.

some things missing/could be interesting:

  • while there's some existing presets (folders, groups, etc) that might fit most users, ability to add your own might be neat.
  • as noted on PDF, I think "selling" the why of label receive addrs (in my linked design example, select preset + enter reference) as first a "nicer overview" (From Bob +1 BTC, vs From bc1....9a2 +1 BTC), secondly privacy benefits, esp. for wallet apps that cater to people that have no idea bitcoin is using not an account modal. For this, a one-screen explainer when user first would go to get a receive addr might work with some visual to show the differences of "From Bob +1 BTC, vs From bc1...9a2 +1BTC)

The idea is that using presets, and reference as well, to match utxos to use in transaction, and thus not require user to manually select UTXOs, can provide a good chunk of privacy benefits automatically to users while not adding that much extra friction. Also, by having the user from the get go select presets, and maybe even enter references also, then in the future once they've learned more about the privacy benefits of finely selected UTXOs for each transaction, they could advance into utilizing manual utxo selection in the wallet app as well, and, crucially, do so with relative ease as all their UTXOs would already be with labels (presets + reference in my suggested design)

Also shown in attached PDF is flow to manually select UTXOs, again, for Blockstream Green as example.

Simplified coin control with presets (5).pdf

@moneyball
Copy link
Contributor Author

Concept ACK Simplified coin control with presets. Would love to see this as a good starting point for the design guide.

@GBKS
Copy link
Contributor

GBKS commented Sep 21, 2020

@s-5Q2X8mgeGR your proposal is great. Would you be open to sharing your design source files for collaboration? Would be great to turn this into a clickable prototype, too.

When sending, I think it would be easier to be able to select a preset and the app picks the specific coins (instead of me having to pick coins).

Do you think the tags could be used in other areas of the app as well? From your proposed labels, there is some overlap with contacts. This might sound more complex initially, but might be easier once set up. So if I have you in my contacts and previously sent you bitcoin via the "Friends" preset, then it could automatically pick the right preset for the next transaction also and I just need to pick you from my contacts (which is more intuitive/personal, ignoring the potential address re-use issue for a moment).

Another use for presets (and contacts) is that the app can categorize my finances. It can show me how much I spend on "Goods and services" or how much I spent in fees for "Exchanges", etc.

It's always great when new features also make existing use/features better.

@s-5Q2X8mgeGR
Copy link

@GBKS

Would you be open to sharing your design source files for collaboration? Would be great to turn this into a clickable prototype, too.

For sure, will get done sometime this week, just gonna clean up figma file a bit first.

When sending, I think it would be easier to be able to select a preset and the app picks the specific coins (instead of me having to pick coins).

Yes, this is what I propose in the design as well. The concept is to match the UTXOs based on same preset, and same reference if possible too. The "Select UTXOs" flows is just an extra flow for more advanced users.

The overlap with contacts-- without solving the address re-use (which, without a centralized service involved, seems only possible with paynyms maybe), I don't see how this could make sense for the user. It'd be neat to, yes, select a recipient from contact book but it'd just add a lot of trust to various components.

Yep, categorization of finances would be neat. Basically, for a mobile wallet appealing to new users, the closer we can get to an experience and functionality to a generic neobank mobile app, probably the better (without losing any of the core bitcoin properties, of course)

@GBKS
Copy link
Contributor

GBKS commented Sep 22, 2020

@s-5Q2X8mgeGR sorry, totally missed that part about auto-select, thanks for the tip.

Regarding all this additional data wallets store locally, it would be ideal if there was some standardized formats so it could be easily ported and synced between wallets. Could include meta data for transactions and addresses (tags, descriptions), as well as a list of contacts. I bet somebody has already worked on something like this somewhere.

@s-5Q2X8mgeGR
Copy link

Attached is Figma file for the above linked design (not link, my Figma account's KYCd, need setup a bitcoin-only Figma account...)

(zipped bc Github don't accept .fig)
Simplified coin control with presets.fig.zip

@GBKS
Copy link
Contributor

GBKS commented Sep 29, 2020

Thank you. Is it alright if I share a re-uploaded version of your Figma file that we can use to discuss and collaborate?

@s-5Q2X8mgeGR
Copy link

@GBKS yes, please do.

@GBKS
Copy link
Contributor

GBKS commented Oct 1, 2020

And here you go.

@statusquont
Copy link

I like the idea of tags better than folders. Having multiple tags give you more flexibility, whereas folders force you to choose one category. When sending you could filter all your UTXO's by multiple tags: show me all #spendable #KYC #CashApp for example.

The wallet could ship with a few default tags (that get localized), and the user should be able to add their own as well.

@Bosch-0
Copy link
Collaborator

Bosch-0 commented Oct 17, 2020

Could always use both tags and folders

@johnsBeharry johnsBeharry added this to 📝 Todo in Payments Dec 14, 2020
@johnsBeharry johnsBeharry linked a pull request Jan 4, 2021 that will close this issue
Content automation moved this from Ideas & Suggestions to Done May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help wanted Extra attention is needed
Projects
Payments
📝 Todo
Development

Successfully merging a pull request may close this issue.

7 participants