Skip to content

Coin control & selection updates #153

@GBKS

Description

@GBKS

There have been several conversations around coin control & selection. The first implementation is imminent, so let's spec out the features and how we want to present them to users.

For what I gather:

  • Coin control is about the user having manual control over their coins/UTXOs
  • Coin selection is the automated process of choosing coins for a transaction

These things blur a little in the UI, so I won't stick with them too closely.

Basically, the application has a screen where the user can see their coins, for general insight and organization. And during the send flow, there's another screen that also shows coins, with various options (manual and automatic) to choose some of them to include in the transaction. Let's call these the "Coin management" and "Coin selection" screens.

Coin selection screen

The users goal is to choose one or more coins for a transaction. They already entered the recipient info and likely chose a fee rate. The screen shows:

  • Transaction amount - the user needs to select this much
  • Selected amount - how much they already selected
  • Remaining amount - how much they still need to select
  • Fee - this one changes based on selected coins
  • Selection options
    • Manual - user decides
    • Lowest fee (TBD) - smallest UTXO with amount higher than the transaction amount + fee
    • Best privacy (TBD) - pick UTXOs so it looks like a Payjoin or something other magical in that vein
  • Select all/none (TBD)
  • Sort by amount, date (file size? label?)
  • Group by address (aka Tree mode in QT)

There's a sneaky interplay between selected UTXOs, fee and transaction amount. Choosing a UTXO means data is being included in the transaction, which means a higher fee. If the user has selected "Include fee in amount" in the form, then this fee should be included in the transaction amount (right?).

Also, coins can be locked. We should decide whether we always display them at the bottom of the list. Or include them in sorting, and show them as disabled.

For the automatic selection options, one route would be to only show what the algo has chosen for the user, and hide the other coins behind a toggle. The user should also have an option to kick a coin from the automated selection, at which point the algo should update the selection with another coin.

To simplify the choice, we could also have some type of visual indicator for users. For example, single UTXOs that cover the whole amount could have a specific highlight.

Coin management screen

This screen can be accessed at any time, for the user to inspect their precious UTXOs. How it is accessed is TBD (possibly via the main menu, or in settings). We want to show a similar list to the coin selection screen, without all the selection options.

However, we may still want to make selecting coins possible. Users may want to select a few to start a new transaction, or (un)lock them. Adding labels is likely also an important activity on this screen.

Another idea is to somehow intelligently evaluate the wallet situation and make some suggestions. For example, if there are many (near-)dust coins and fees are low, recommend to clean up a little.


I am sure I missed a bunch of stuff. Let me know. Also check out what we have in the design docs so far for some visual starting points, as well as QT screenshots.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions