Has UTXO selection methods changed since activation of Segwit?

5

Before Segwit, transactions were penalized higher fees for having more inputs than outputs due to the input size being larger despite those transactions actually decreasing the global UTXO set. Segwit corrects this incentive mismatch. Have wallets taken advantage of this by changing their coin selection algorithms?

satoshi_ghost

Posted 2018-03-23T04:01:39.977

Reputation: 116

Answers

4

Bitcoin Core's client has recently applied changes to their coin selection algorithms based on Murch's Master's thesis.

sr-gi

Posted 2018-03-23T04:01:39.977

Reputation: 2 382

3

Segwit corrects this incentive mismatch.

Segwit only improves the ratio, but outputs are still cheaper than inputs even with segwit.

As sr-gi mentioned in his answer, the Branch and Bound algorithm was recently merged to the Bitcoin Core master branch.

The Branch and Bound algorithm searches the complete combination space of a wallet's UTXO pool to find the input set that minimizes the "waste" of a transaction. Hereby, the cost of spending inputs is part of what constitutes the waste metric. This means for example that when other factors contributing to waste were equal, the algorithm would prefer an input with lower weight at higher fee rates.

Vice versa, if the user creates a transaction below the expected longterm fee rate, the selection algorithm would prefer heavier inputs.

Murch

Posted 2018-03-23T04:01:39.977

Reputation: 41 609