<p>Addresses are not account balances from which BTC amounts are deducted from. Addresses are only shorthand specifiers for an output script. The amount actually comes from UTXOs, each of which has a script which may correspond to an address.</p>
<p>The address the amount being spent (including fees) will &quot;come from&quot; depends on the UTXOs. Address A could have a balance of 0.1 BTC, but this could be composed of several UTXOs whose amounts sum to 0.1. The same applies to address B.</p>
<p>If there are only 2 UTXOs, one for address A of 0.1 BTC, and one for address B of 0.15 BTC, then the transaction will likely contain one input of the UTXO for address B and create a change output. UTXOs cannot be partially spent, so if the UTXO for A is chosen, then the UTXO for B must also be chosen as A does not have enough to cover the fee. This will also result in a change output.</p>
<p>The only scenario where there is no change output is if there are multiple UTXOs for each address and these can be combined in some way to sum to exactly the amount being sent.</p>

CC BY-SA 4.0
2022-01-11T18:21:22.937Z
2022-01-11T18:21:22.937Z
Ava Chow
<p>Say I have two addresses in my bitcoin core wallet, address A contains 0.1 BTC and address B contains 0.15</p>
<p>I choose to transfer someone 0.1 BTC, but there is also some fee, say 0.00001. Will the transfer take the BTC from address A and the fee from address B, so no BTC change (UTXO) will be received after the transaction?</p>
<p>Or the case is that, since the transfer + fee &gt; 0.1 it will actually be taken from address B so there will be BTC change of 0.15-0.1-0.00001 = 0.04999 ?</p>

<transaction-fees><utxo>
Is the paying of a transaction fee have anything to do with UTXO?
mikest
# Is the paying of a transaction fee have anything to do with UTXO?

(Asked by: username_0 on 2022-01-11)

Say I have two addresses in my bitcoin core wallet, address A contains 0.1 BTC and address B contains 0.15

I choose to transfer someone 0.1 BTC, but there is also some fee, say 0.00001. Will the transfer take the BTC from address A and the fee from address B, so no BTC change (UTXO) will be received after the transaction?

Or the case is that, since the transfer + fee > 0.1 it will actually be taken from address B so there will be BTC change of 0.15-0.1-0.00001 = 0.04999 ?

**Tags:** transaction-fees, utxo


---

## 1 answers

### Answer by username_1 on 2022-01-11. Score: 5 | Accepted answer

Addresses are not account balances from which BTC amounts are deducted from. Addresses are only shorthand specifiers for an output script. The amount actually comes from UTXOs, each of which has a script which may correspond to an address.

The address the amount being spent (including fees) will "come from" depends on the UTXOs. Address A could have a balance of 0.1 BTC, but this could be composed of several UTXOs whose amounts sum to 0.1. The same applies to address B.

If there are only 2 UTXOs, one for address A of 0.1 BTC, and one for address B of 0.15 BTC, then the transaction will likely contain one input of the UTXO for address B and create a change output. UTXOs cannot be partially spent, so if the UTXO for A is chosen, then the UTXO for B must also be chosen as A does not have enough to cover the fee. This will also result in a change output.

The only scenario where there is no change output is if there are multiple UTXOs for each address and these can be combined in some way to sum to exactly the amount being sent.


---

