<blockquote>
<p>Does following the address reuse recommendation render the concept of coin selection useless?</p>
</blockquote>
<p>No, it does not.</p>
<p>It seems like the main misconception is that using an address multiple times creates fewer UTXOs than using multiple addresses for each payment. However they are the exact same. If you receive 5 payments to a single address, you will have 5 UTXOs. If you receive 5 payments to 5 different addresses, you will also have 5 UTXOs. To a coin selection algorithm, these are the exact same scenario: 5 UTXOs of the same size with the same size requirement for spending.</p>
<blockquote>
<p>Do the instructions to not reuse an address include change?</p>
</blockquote>
<p>Yes</p>
<blockquote>
<p>That is, should I generate a new key pair for any transaction that needs to receive change, and then manually specify my change be sent to the newly generated address?</p>
</blockquote>
<p>Most wallet software will already be generating new change addresses for you. There is no need to do that manually unless you are using some ancient or poorly written wallet software that does not. And in that case, you should use a different wallet software.</p>
<blockquote>
<p>If I make a new address for every transaction, and let us say I have one key pair associated to a 1 btc UTXO and another key pair associated to a 1 btc UTXO and I want to send Alice 2 BTC, then following the address reuse policy I would ask her to provide me 2 seperate bitcoin addresses, and I would make two separate transactions, 1 btc sent to each address?</p>
</blockquote>
<p>No. A single transaction can (and most do) have multiple inputs and multiple outputs. Your 2 UTXOs will be in the same transaction that creates a single 2 BTC UTXO for Alice.</p>
<blockquote>
<p>Terminology - does the term &quot;wallet&quot; refer to a key pair, or to software/hardware etc. that could contain many key pairs. For example, thinking of a Nano Ledger S, is the device itself the &quot;wallet&quot; and each 3-tuple (private key, pub key, address) also considered a &quot;wallet&quot;?</p>
</blockquote>
<p>Wallet can refer to two things:</p>
<ol>
<li>A collection of keys and their associated addresses and transactions</li>
<li>A piece of software or hardware that manages a collection of keys and their associated addresses and transactions.</li>
</ol>

CC BY-SA 4.0
2021-03-11T02:48:34.673Z
Wait, I think my actual misconception was that when I "sign" a transaction with my "private key", I thought the "private key" used for signing needed to be associated with ALL of the inputs in the tx AND the address I was sending from. Is that not the case?
Prince M
CC BY-SA 4.0
2021-03-11T02:55:58.337Z
Every input will contain its own signature. If those inputs spend UTXOs corresponding to distinct addresses/keys, those will be signatures with those distinct keys.
Pieter Wuille
CC BY-SA 4.0
2021-03-11T02:58:36.250Z
Ok, I see now. Thanks! So let me just clarify one more thing: If I construct a transaction with multiple inputs associated to different addresses, when the transaction gets to mempool and appears on block explorer, which address is the one the transaction appears to be from?
Prince M
CC BY-SA 4.0
2021-03-11T03:04:12.743Z
It will appear to come "from" all of them.
Pieter Wuille
CC BY-SA 4.0
2021-03-11T03:09:33.537Z
Thanks Andrew and Pieter for your answers. Both were high quality IMO.
Prince M
CC BY-SA 4.0
2021-03-11T02:42:11.410Z
2021-03-11T02:42:11.410Z
Ava Chow
<blockquote>
<ol>
<li>Do the instructions to not reuse an address include change? That is, should I generate a new key pair for any transaction that needs to receive change, and then manually specify my change be sent to the newly generated address?</li>
</ol>
</blockquote>
<p>Wallet software will do this automatically for you. Whenever change is created, the wallet will construct a new keypair, compute its address, and send the change there. You shouldn't ever do anything manual.</p>
<blockquote>
<ol start="2">
<li>If I make a new address for every transaction, and let us say I have one key pair associated to a 1 btc UTXO and another key pair associated to a 1 btc UTXO and I want to send Alice 2 BTC, then following the address reuse policy I would ask her to provide me 2 seperate bitcoin addresses, and I would make two separate transactions, 1 btc sent to each address?</li>
</ol>
</blockquote>
<p>No, you (or your wallet) will just create a single transaction that spends both 1 BTC UTXOs, and send 2 BTC to Alice's address. No reuse.</p>
<p>The advice of no reuse just means that if you later want to send more money to Alice, you'd ask a different address of hers, and don't send again to the same one. This is generally good practice for other reasons anyway, as Alice may have moved to a new wallet setup, and prefer not be paid to old one anymore.</p>
<blockquote>
<ol start="3">
<li>Terminology - does the term &quot;wallet&quot; refer to a key pair, or to software/hardware etc. that could contain many key pairs. For example, thinking of a Nano Ledger S, is the device itself the &quot;wallet&quot; and each 3-tuple (private key, pub key, address) also considered a &quot;wallet&quot;?</li>
</ol>
</blockquote>
<p>You'll hear conflicting opinions on this, but in my view it's closer to the second. A wallet is something that manages a collection of addresses, coin selection, helps constructing transactions, ...</p>
<p>In my view, a &quot;hardware wallet&quot; is badly named, because it is not managing any of these things. It is a hardware transaction signing device, which needs communication with an actual wallet to be instructed what to do.</p>

CC BY-SA 4.0
2021-03-11T02:50:21.670Z
"No, you (or your wallet) will just create a single transaction that spends both 1 BTC UTXOs, and send 2 BTC to Alice's address. No reuse." --- but if 1 btc had been sent to one of my addresses, and the other btc had been sent to another one of my addresses, when I make the transaction to Alice, when it appears on block explorer, which address will it appear to have come from?
Prince M
CC BY-SA 4.0
2021-03-11T02:54:07.067Z
It will appear to come "from" both.
Pieter Wuille
CC BY-SA 4.0
2021-03-11T03:08:03.353Z
Ok, I think I am in full understanding now. Thank you for a quality answer. I have never actually used a wallet of any kind as I am only learning about bitcoin for intellectual stimulation, so I don't really know what kind of things they do/don't do for you. Thanks!
Prince M
CC BY-SA 4.0
2021-03-11T02:42:29.480Z
2021-03-11T02:42:29.480Z
Pieter Wuille
<p>I have read at length that address reuse should be avoided, for instance the bitcoin wiki describes numerous reasons <a href="https://en.bitcoin.it/wiki/Address_reuse" rel="nofollow noreferrer">here</a>. I have also read Murch's <a href="https://murch.one/wp-content/uploads/2016/11/erhardt2016coinselection.pdf" rel="nofollow noreferrer">master thesis</a> on coin selection. These two concepts seem to be at ends with each other. That is, if all bitcoin users follow the instructions to never reuse an address, there should only ever be one UTXO associated to an address, and then it is abandoned once the UTXO is spent - thus only one input to any given transaction. <strong>Does following the address reuse recommendation render the concept of coin selection useless?</strong></p>
<p>Some smaller related questions that I don't feel deserve their own questions:</p>
<ol>
<li>Do the instructions to not reuse an address include change? That is, should I generate a new key pair for any transaction that needs to receive change, and then manually specify my change be sent to the newly generated address?</li>
<li>If I make a new address for every transaction, and let us say I have one key pair associated to a 1 btc UTXO and another key pair associated to a 1 btc UTXO and I want to send Alice 2 BTC, then following the address reuse policy I would ask her to provide me 2 seperate bitcoin addresses, and I would make two separate transactions, 1 btc sent to each address?</li>
<li>Terminology - does the term &quot;wallet&quot; refer to a key pair, or to software/hardware etc. that could contain many key pairs. For example, thinking of a Nano Ledger S, is the device itself the &quot;wallet&quot; and each 3-tuple (private key, pub key, address) also considered a &quot;wallet&quot;?</li>
</ol>
<p><strong>EDIT:</strong>
My question has been sufficiently answered - I failed to understand that when conducting a transaction with multiple UTXO inputs, they do not all need to be associated to the same address/private key. Good news Murch, your masters thesis wasn't in vain :)</p>

<address-reuse><coin-selection>
Address Reuse vs. Coin Selection
Prince M
# Address Reuse vs. Coin Selection

(Asked by: username_0 on 2021-03-11)

I have read at length that address reuse should be avoided, for instance the bitcoin wiki describes numerous reasons [here](https://en.bitcoin.it/wiki/Address_reuse). I have also read Murch's [master thesis](https://murch.one/wp-content/uploads/2016/11/erhardt2016coinselection.pdf) on coin selection. These two concepts seem to be at ends with each other. That is, if all bitcoin users follow the instructions to never reuse an address, there should only ever be one UTXO associated to an address, and then it is abandoned once the UTXO is spent - thus only one input to any given transaction. **Does following the address reuse recommendation render the concept of coin selection useless?**

Some smaller related questions that I don't feel deserve their own questions:

1. Do the instructions to not reuse an address include change? That is, should I generate a new key pair for any transaction that needs to receive change, and then manually specify my change be sent to the newly generated address?
2. If I make a new address for every transaction, and let us say I have one key pair associated to a 1 btc UTXO and another key pair associated to a 1 btc UTXO and I want to send Alice 2 BTC, then following the address reuse policy I would ask her to provide me 2 seperate bitcoin addresses, and I would make two separate transactions, 1 btc sent to each address?
3. Terminology - does the term "wallet" refer to a key pair, or to software/hardware etc. that could contain many key pairs. For example, thinking of a Nano Ledger S, is the device itself the "wallet" and each 3-tuple (private key, pub key, address) also considered a "wallet"?

**EDIT:**
My question has been sufficiently answered - I failed to understand that when conducting a transaction with multiple UTXO inputs, they do not all need to be associated to the same address/private key. Good news Murch, your masters thesis wasn't in vain :)

**Tags:** address-reuse, coin-selection


---

## 2 answers

### Answer by username_2 on 2021-03-11. Score: 4 | Accepted answer

> 1. Do the instructions to not reuse an address include change? That is, should I generate a new key pair for any transaction that needs to receive change, and then manually specify my change be sent to the newly generated address?

Wallet software will do this automatically for you. Whenever change is created, the wallet will construct a new keypair, compute its address, and send the change there. You shouldn't ever do anything manual.

> 2. If I make a new address for every transaction, and let us say I have one key pair associated to a 1 btc UTXO and another key pair associated to a 1 btc UTXO and I want to send Alice 2 BTC, then following the address reuse policy I would ask her to provide me 2 seperate bitcoin addresses, and I would make two separate transactions, 1 btc sent to each address?

No, you (or your wallet) will just create a single transaction that spends both 1 BTC UTXOs, and send 2 BTC to Alice's address. No reuse.

The advice of no reuse just means that if you later want to send more money to Alice, you'd ask a different address of hers, and don't send again to the same one. This is generally good practice for other reasons anyway, as Alice may have moved to a new wallet setup, and prefer not be paid to old one anymore.

> 3. Terminology - does the term "wallet" refer to a key pair, or to software/hardware etc. that could contain many key pairs. For example, thinking of a Nano Ledger S, is the device itself the "wallet" and each 3-tuple (private key, pub key, address) also considered a "wallet"?

You'll hear conflicting opinions on this, but in my view it's closer to the second. A wallet is something that manages a collection of addresses, coin selection, helps constructing transactions, ...

In my view, a "hardware wallet" is badly named, because it is not managing any of these things. It is a hardware transaction signing device, which needs communication with an actual wallet to be instructed what to do.

> **Comments:**
> **username_0**: "No, you (or your wallet) will just create a single transaction that spends both 1 BTC UTXOs, and send 2 BTC to Alice's address. No reuse." --- but if 1 btc had been sent to one of my addresses, and the other btc had been sent to another one of my addresses, when I make the transaction to Alice, when it appears on block explorer, which address will it appear to have come from?  
> **username_2**: It will appear to come "from" both.  
> **username_0**: Ok, I think I am in full understanding now. Thank you for a quality answer. I have never actually used a wallet of any kind as I am only learning about bitcoin for intellectual stimulation, so I don't really know what kind of things they do/don't do for you. Thanks!  

---

### Answer by username_1 on 2021-03-11. Score: 3

> Does following the address reuse recommendation render the concept of coin selection useless?

No, it does not.

It seems like the main misconception is that using an address multiple times creates fewer UTXOs than using multiple addresses for each payment. However they are the exact same. If you receive 5 payments to a single address, you will have 5 UTXOs. If you receive 5 payments to 5 different addresses, you will also have 5 UTXOs. To a coin selection algorithm, these are the exact same scenario: 5 UTXOs of the same size with the same size requirement for spending.

> Do the instructions to not reuse an address include change?

Yes

> That is, should I generate a new key pair for any transaction that needs to receive change, and then manually specify my change be sent to the newly generated address?

Most wallet software will already be generating new change addresses for you. There is no need to do that manually unless you are using some ancient or poorly written wallet software that does not. And in that case, you should use a different wallet software.

> If I make a new address for every transaction, and let us say I have one key pair associated to a 1 btc UTXO and another key pair associated to a 1 btc UTXO and I want to send Alice 2 BTC, then following the address reuse policy I would ask her to provide me 2 seperate bitcoin addresses, and I would make two separate transactions, 1 btc sent to each address?

No. A single transaction can (and most do) have multiple inputs and multiple outputs. Your 2 UTXOs will be in the same transaction that creates a single 2 BTC UTXO for Alice.

> Terminology - does the term "wallet" refer to a key pair, or to software/hardware etc. that could contain many key pairs. For example, thinking of a Nano Ledger S, is the device itself the "wallet" and each 3-tuple (private key, pub key, address) also considered a "wallet"?

Wallet can refer to two things:

1. A collection of keys and their associated addresses and transactions
2. A piece of software or hardware that manages a collection of keys and their associated addresses and transactions.

> **Comments:**
> **username_0**: Wait, I think my actual misconception was that when I "sign" a transaction with my "private key", I thought the "private key" used for signing needed to be associated with ALL of the inputs in the tx AND the address I was sending from. Is that not the case?  
> **username_2**: Every input will contain its own signature. If those inputs spend UTXOs corresponding to distinct addresses/keys, those will be signatures with those distinct keys.  
> **username_0**: Ok, I see now. Thanks! So let me just clarify one more thing: If I construct a transaction with multiple inputs associated to different addresses, when the transaction gets to mempool and appears on block explorer, which address is the one the transaction appears to be from?  
> **username_2**: It will appear to come "from" all of them.  
> **username_0**: Thanks Andrew and username_2 for your answers. Both were high quality IMO.  

---

