<p>Bitcoin Core's client has recently applied changes to their <a href="https://github.com/bitcoin/bitcoin/pull/10637" rel="nofollow noreferrer">coin selection algorithms</a> based on <a href="http://murch.one/wp-content/uploads/2016/11/erhardt2016coinselection.pdf" rel="nofollow noreferrer">Murch's Master's thesis</a>.</p>

CC BY-SA 3.0
2018-03-23T08:32:48.500Z
2018-03-23T08:32:48.500Z
sr_gi
<blockquote>
  <p>Segwit corrects this incentive mismatch. </p>
</blockquote>

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

<p>As <a href="https://bitcoin.stackexchange.com/a/72866/5406">sr-gi mentioned in his answer</a>, the Branch and Bound algorithm was recently merged to the Bitcoin Core master branch.</p>

<p>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.</p>

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

CC BY-SA 3.0
2018-03-24T17:44:09.747Z
2018-04-16T00:00:18.677Z
2018-04-16T00:00:18.677Z
Murch
<p>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?</p>

<transaction-fees><segregated-witness><coin-selection><utxo-set>
Has UTXO selection methods changed since activation of Segwit?
satoshi_ghost
# Has UTXO selection methods changed since activation of Segwit?

(Asked by: username_0 on 2018-03-23)

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?

**Tags:** transaction-fees, segregated-witness, coin-selection, utxo-set


---

## 2 answers

### Answer by username_1 on 2018-03-23. Score: 4

Bitcoin Core's client has recently applied changes to their [coin selection algorithms](https://github.com/bitcoin/bitcoin/pull/10637) based on [username_2's Master's thesis](http://username_2.one/wp-content/uploads/2016/11/erhardt2016coinselection.pdf).


---

### Answer by username_2 on 2018-03-24. Score: 4

> Segwit corrects this incentive mismatch.

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

As [username_1 mentioned in his answer](https://bitcoin.stackexchange.com/a/72866/5406), 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.


---

