6

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?

2 Answers 2

4

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

4

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.