<p>Electrum used both UTXO, even if only one was needed, to protect your privacy albeit at the expense of higher fee.</p>
<p>This is from the <a href="https://github.com/spesmilo/electrum/blob/master/electrum/coinchooser.py" rel="nofollow noreferrer">Electrum source code</a> and explain this choice:</p>
<pre><code>Attempts to better preserve user privacy.
First, if any coin is spent from a user address, all coins are.
Compared to spending from other addresses to make up an amount, this reduces
information leakage about sender holdings.  It also helps to
reduce blockchain UTXO bloat, and reduce future privacy loss that
would come from reusing that address' remaining UTXOs.
Second, it penalizes change that is quite different to the sent amount.
Third, it penalizes change that is too big.
</code></pre>
<br>
<blockquote>
<p>This looks to me as though I can make the same transaction and incur a
smaller fee by using &quot;coin control&quot;. Am I missing something?</p>
</blockquote>
<p>No, you are right, if you wish focus more on fee minimization instead of privacy, you can achieve better result doing so manually than rely on the Electrum coin control policy.<br><br></p>
<blockquote>
<p>Is there a disadvantage or risk to doing this? I'm thinking there must
be, otherwise Electrum would just do it automatically</p>
</blockquote>
<p>There are multiple goal you may want achieve with a coin selection strategy and there is no one strategy that solves all problems, so wallets adopt different strategies depending on their priorities; but these strategy are meant for unskilled user or user that don't care these things (eg. the Coins tab is hidden by default on Electrum)... If you know how bitcoin transactions works and what UTXO are, probably you prefer do your own coin selection manually based on the needs of a specific transaction.</p>

CC BY-SA 4.0
2021-04-07T14:59:08.243Z
Thank you! This makes sense. I've been reading around a bit more and it looks like a) I re-used addresses in the past, which I now realise I shouldn't have done b) Electrum is making this more expensive transaction to fix that. My current inclination is to let Electrum use a two input transaction and accept the larger fee this time, then my next transaction will automatically be a one-input transaction anyway as I will no longer have multiple coins sharing an address. Does that seem reasonable/correct?
Steve
CC BY-SA 4.0
2021-04-07T16:58:13.520Z
yes, you got the point ... but keep in mind that Electrum can choose a sub optimal UTXOs group (from the fees side) in other cases as well, so if you care, take a look on "advanced tab" anyway.
leevancleef
CC BY-SA 4.0
2021-04-07T14:21:24.467Z
2021-04-07T14:21:24.467Z
leevancleef
<p>I want to make a payment of x BTC.</p>
<p>My Electrum wallet shows two &quot;output points&quot; in the Coins tab (with the same address). Both of these show an amount much larger than x BTC.</p>
<p>If go to the Send tab and start to make a payment to an address, then click &quot;Pay...&quot; and then &quot;Advanced&quot;, I can see two inputs, which seem to correspond to the two &quot;output points&quot; in the Coins tab and show the same amounts. The transaction size is 447 bytes. I abandon this transaction.</p>
<p>If I go to the Coins tab, right click on one of the two &quot;output points&quot; and choose &quot;Spend&quot;, Electrum shows a green banner saying &quot;Coin control active&quot;. If I start to make the same payment, the &quot;Advanced&quot; dialog now only shows one input and the transaction size is 226 bytes.</p>
<p>This looks to me as though I can make the same transaction and incur a smaller fee by using &quot;coin control&quot;. Am I missing something? Is there a disadvantage or risk to doing this? I'm thinking there must be, otherwise Electrum would just do it automatically.</p>
<p>I could understand needing two inputs to the transaction if x was more than the amount associated with each one of my two &quot;output points&quot;, but it isn't.</p>
<p>Thanks!</p>

<transactions><transaction-fees><electrum><coin-control>
Why does Electrum include seemingly unnecessary inputs in a transaction?
Steve
# Why does Electrum include seemingly unnecessary inputs in a transaction?

(Asked by: username_0 on 2021-04-07)

I want to make a payment of x BTC.

My Electrum wallet shows two "output points" in the Coins tab (with the same address). Both of these show an amount much larger than x BTC.

If go to the Send tab and start to make a payment to an address, then click "Pay..." and then "Advanced", I can see two inputs, which seem to correspond to the two "output points" in the Coins tab and show the same amounts. The transaction size is 447 bytes. I abandon this transaction.

If I go to the Coins tab, right click on one of the two "output points" and choose "Spend", Electrum shows a green banner saying "Coin control active". If I start to make the same payment, the "Advanced" dialog now only shows one input and the transaction size is 226 bytes.

This looks to me as though I can make the same transaction and incur a smaller fee by using "coin control". Am I missing something? Is there a disadvantage or risk to doing this? I'm thinking there must be, otherwise Electrum would just do it automatically.

I could understand needing two inputs to the transaction if x was more than the amount associated with each one of my two "output points", but it isn't.

Thanks!

**Tags:** transactions, transaction-fees, electrum, coin-control


---

## 1 answers

### Answer by username_1 on 2021-04-07. Score: 2 | Accepted answer

Electrum used both UTXO, even if only one was needed, to protect your privacy albeit at the expense of higher fee.

This is from the [Electrum source code](https://github.com/spesmilo/electrum/blob/master/electrum/coinchooser.py) and explain this choice:

```
Attempts to better preserve user privacy.
First, if any coin is spent from a user address, all coins are.
Compared to spending from other addresses to make up an amount, this reduces
information leakage about sender holdings.  It also helps to
reduce blockchain UTXO bloat, and reduce future privacy loss that
would come from reusing that address' remaining UTXOs.
Second, it penalizes change that is quite different to the sent amount.
Third, it penalizes change that is too big.

```

  
> This looks to me as though I can make the same transaction and incur a
> smaller fee by using "coin control". Am I missing something?

No, you are right, if you wish focus more on fee minimization instead of privacy, you can achieve better result doing so manually than rely on the Electrum coin control policy.

> Is there a disadvantage or risk to doing this? I'm thinking there must
> be, otherwise Electrum would just do it automatically

There are multiple goal you may want achieve with a coin selection strategy and there is no one strategy that solves all problems, so wallets adopt different strategies depending on their priorities; but these strategy are meant for unskilled user or user that don't care these things (eg. the Coins tab is hidden by default on Electrum)... If you know how bitcoin transactions works and what UTXO are, probably you prefer do your own coin selection manually based on the needs of a specific transaction.

> **Comments:**
> **username_0**: Thank you! This makes sense. I've been reading around a bit more and it looks like a) I re-used addresses in the past, which I now realise I shouldn't have done b) Electrum is making this more expensive transaction to fix that. My current inclination is to let Electrum use a two input transaction and accept the larger fee this time, then my next transaction will automatically be a one-input transaction anyway as I will no longer have multiple coins sharing an address. Does that seem reasonable/correct?  
> **username_1**: yes, you got the point ... but keep in mind that Electrum can choose a sub optimal UTXOs group (from the fees side) in other cases as well, so if you care, take a look on "advanced tab" anyway.  

---

