Skip to content

"coinselect" always expose the largest UTXO no matter how small the payment is because it sorts by descending value. #74

@Transisto

Description

@Transisto

This is a huge privacy issue.

It's exposing a larger balance than required to the recipient.

Why is it sorting by descending?

Unless it's doing something more advanced to solve that "knapsack' like problem.
It should first try to find the smallest single UTXO that is bigger than the sent amount by going up the list (asending)
If it didn't find any it should take the largest one and go back from to smallest until it finds one that is larger than what's missing. If not take 1st + 2nd largest and keep adding to it until total it's enough.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions