<p>Enabling <code>avoidpartialspend</code> changes your wallet’s behavior if any of your addresses were reused.</p>
<p><code>avoidpartialspend</code> causes your wallet to treat multiple UTXOs that share the same output script (i.e. were received to the same address) as a unit. You can think of this <em>Output Group</em> as a super-UTXO with the aggregate amount and weight. Instead of running coin selection on UTXOs, the wallet then runs coin selection on output groups. Output Groups are either spend completely or not at all. This prevents the privacy leak of spending funds associated with the same output script across multiple transactions and thus indicating that the same entity was involved in the creation of all of those transactions.</p>
<p>Bitcoin Core uses <code>avoidpartialspend</code> opportunistically, even if it is not explicitly enabled.</p>

CC BY-SA 4.0
2023-10-30T18:51:18.410Z
2023-10-30T18:51:18.410Z
Murch
<p>Currently, best practices are to receive coins to an address only once - Any reasonably new wallet will generate a new receiving address for you if the previously displayed one has already received coins.</p>
<p>However, there are scenarios where an address might receive coins multiple times, such as being a saved address on an exchange, stored with an automatic payout system (mining pools etc), or just intentionally giving the same address to multiple people who send you coins.</p>
<p>In such cases, an address has multiple utxos, possibly of varying sizes, associated with it.</p>
<p>Additionally, if you also use your wallet normally, it would have many other addresses with just a single transaction. This one address with many transactions could result in coin selection algorithms spending this address' coins along with coins sent to other, single-use addresses, thereby linking them as belonging to the same wallet.</p>
<p><code>avoidpartialspend</code> is a configuration option that tells the coinselection system to spend all utxos on a single address before attempting to source utxos from other addresses (which may still be necessary depending on the amount being sent). This ensures that, as much as possible, the utxos selected minimize the number of individual addresses that are linked together for a single transaction. However, this comes at the cost of a higher transaction fee due to potentially larger transaction sizes, and sub optimal utxo selection as opposed to selecting the best input(s) for the amount being sent.</p>
<p>This does improve privacy to some extent. However, as notes, it is not a complete solution, as future utxos to that address may be used in other transactions that link them to more wallet addresses, even after this process.</p>

CC BY-SA 4.0
2019-03-11T06:09:15.113Z
2022-09-20T14:33:51.807Z
2022-09-20T14:33:51.807Z
Raghav Sood
<blockquote>
  <p>Group outputs by address, selecting all or none, instead of selecting on a per-output basis. Privacy is improved as an address is only used once (unless someone sends to it after spending from it), but may result in slightly higher fees as suboptimal coin selection may result due to the added limitation (default: 0) </p>
</blockquote>

<p>I don't understand. Isn't address reuse already avoided, if receiving/change address is used only once? Does this option mean that each receiving address would be tracked by the wallet internally, so that spending from multiple "sources" is generally avoided? Aren't there still some scenarios that "spending from multiple sources" is still unavoidable? How could this improve privacy? Won't this create a tracable "chain" of transactions?</p>

<bitcoin-core><privacy><coin-selection>
What's partial spending? What does avoidpartialspend do?
Chris Chen
# What's partial spending? What does avoidpartialspend do?

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

> Group outputs by address, selecting all or none, instead of selecting on a per-output basis. Privacy is improved as an address is only used once (unless someone sends to it after spending from it), but may result in slightly higher fees as suboptimal coin selection may result due to the added limitation (default: 0)

I don't understand. Isn't address reuse already avoided, if receiving/change address is used only once? Does this option mean that each receiving address would be tracked by the wallet internally, so that spending from multiple "sources" is generally avoided? Aren't there still some scenarios that "spending from multiple sources" is still unavoidable? How could this improve privacy? Won't this create a tracable "chain" of transactions?

**Tags:** bitcoin-core, privacy, coin-selection


---

## 2 answers

### Answer by username_2 on 2019-03-11. Score: 5 | Accepted answer

Currently, best practices are to receive coins to an address only once - Any reasonably new wallet will generate a new receiving address for you if the previously displayed one has already received coins.

However, there are scenarios where an address might receive coins multiple times, such as being a saved address on an exchange, stored with an automatic payout system (mining pools etc), or just intentionally giving the same address to multiple people who send you coins.

In such cases, an address has multiple utxos, possibly of varying sizes, associated with it.

Additionally, if you also use your wallet normally, it would have many other addresses with just a single transaction. This one address with many transactions could result in coin selection algorithms spending this address' coins along with coins sent to other, single-use addresses, thereby linking them as belonging to the same wallet.

`avoidpartialspend` is a configuration option that tells the coinselection system to spend all utxos on a single address before attempting to source utxos from other addresses (which may still be necessary depending on the amount being sent). This ensures that, as much as possible, the utxos selected minimize the number of individual addresses that are linked together for a single transaction. However, this comes at the cost of a higher transaction fee due to potentially larger transaction sizes, and sub optimal utxo selection as opposed to selecting the best input(s) for the amount being sent.

This does improve privacy to some extent. However, as notes, it is not a complete solution, as future utxos to that address may be used in other transactions that link them to more wallet addresses, even after this process.


---

### Answer by username_1 on 2023-10-30. Score: 0

Enabling `avoidpartialspend` changes your wallet’s behavior if any of your addresses were reused.

`avoidpartialspend` causes your wallet to treat multiple UTXOs that share the same output script (i.e. were received to the same address) as a unit. You can think of this *Output Group* as a super-UTXO with the aggregate amount and weight. Instead of running coin selection on UTXOs, the wallet then runs coin selection on output groups. Output Groups are either spend completely or not at all. This prevents the privacy leak of spending funds associated with the same output script across multiple transactions and thus indicating that the same entity was involved in the creation of all of those transactions.

Bitcoin Core uses `avoidpartialspend` opportunistically, even if it is not explicitly enabled.


---

