<p>No.</p>

<p>The addresses in Bitcoin only signify ownership. You don't need to spend all money from an address or any such thing. The atomic units of Bitcoin transactions are <a href="https://bitcoin.stackexchange.com/q/4301/5406">Unspent Transaction Outputs</a> (UTXO).</p>

<p>UTXO are uniquely identified by the txid of the transaction that created them, and their position in said transation's output list. </p>

<p><em>E.g. if the transaction id of <code>transaction1</code> were <code>tx01</code> the 49.99mBTC output to Alice would be <code>tx01-00</code> and the 50mBTC output to Bob would be <code>tx01-01</code> (computer scientists start counting at 0).</em></p>

<p>To spend a UTXO, you'd reference them by this identifier, i.e. "I want to spend <code>tx01-00</code>". Then you need to provide a signature that corresponds to the address that <code>tx01-00</code> was assigned to, and you get to reassign the balance that <code>tx01-00</code> represents. Afterwards, <code>tx01-00</code> is invalidated.</p>

<p>So, in your example <code>transaction1</code> spends UTXO that are unrelated to <code>transaction2</code>, so <code>transaction2</code> has no bearing whatsoever on <code>transaction1</code>.</p>

CC BY-SA 3.0
2016-06-14T19:33:21.770Z
Does this mean that Alice doesn't need a change address at all if her wallet `1A1` (which holds exactly 100 mBTC) previously received 50.01 mBTC, 30 mBTC, and 19.99 mBTC and she wants to send 50 mBTC to `1B1`?
UTF-8
CC BY-SA 3.0
2016-06-14T19:35:31.143Z
Correct. Addresses can be reused indefinitely. They are not chiefly due to privacy reasons.
Murch
CC BY-SA 3.0
2016-06-14T19:42:40.393Z
I know that they can be reused. But I read somewhere that you always have to spend everything an input has. What exactly is an "input"? Is it the unpent transaction output or is it an address? Let's say Alice wants to spend 99.99 mBTC and has the same history for address `1A1` as mentioned above (she received money 3 times). She does not include any other address in the transaction, so all 99.99 mBTC come from `1A1`. Is the number of inputs 1 or 3?
UTF-8
CC BY-SA 3.0
2016-06-14T19:50:45.373Z
Addresses are only a marker for ownership. They only symbolize the private-key that needs to be invoked to sign validly. Transactions consume UTXO as inputs. Those you have to spend completely. Anything you don't assign falls to the miners as transaction fee. So, in the above example, the 100mBTC would presumably be one UTXO, and if the rest were not assigned, it would all be a transaction fee. Fees are not outputs, just unassigned left-overs of the inputs.
Murch
CC BY-SA 3.0
2016-06-14T19:53:50.320Z
It made perfect sense until you wrote "So, in the above example, the 100mBTC would presumably be one UTXO". Shouldn't the 50.01 mBTC chunk be 1 UTXO, the 30 mBTC chunk be another one, and the 19.99 mBTC be a third one?
UTF-8
CC BY-SA 3.0
2016-06-14T19:57:33.800Z
Before `transaction1`, there is one UTXO of 100mBTC value, that Alice can spend. `transaction1` consumes that UTXO, to create a 49.99 mBTC UTXO, and a 50.00 mBTC. The fee is not a UTXO, but gets collected by the successful miner in the Coinbase transaction. Carlos uses input(s) of unspecified number to fund `transaction2`, it also creates two new UTXO (1mBTC to Alice, and 4.9 mBTC to himself).
Murch
CC BY-SA 3.0
2016-06-14T19:58:59.510Z
Ah, you're talking about the transaction I described in my question whereas I thought you were talking about what I described in the first comment I posted to your answer. Thank you very much!
UTF-8
CC BY-SA 3.0
2016-06-14T20:05:45.203Z
Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/41170/discussion-between-murch-and-utf-8).
Murch
CC BY-SA 3.0
2016-06-14T19:16:31.053Z
2016-06-14T20:05:36.497Z
2017-04-13T12:47:34.187Z
Murch
<p>Scenario: Alice has a wallet <code>A1bz</code> (let's say these are the first 4 characters of the private key in wallet import format so we don't have to deal with too many characters) with wallet address <code>1A1</code> and 100 mBTC in it. She also has a wallet <code>A2bz</code> with wallet address <code>1A2</code> for change and wants to send 50 mBTC to Bob's wallet with public address <code>1B1</code> at 15:00 but only pays 0.01 mBTC fees (as opposed to 0.1 mBTC) which would be the recommended amount. This means that the transaction probably won't go through right away but will have to wait for a few hours.</p>

<p>This means that <code>transaction1</code> is built like this:</p>

<pre><code>transaction1: (1A1) -&gt; (1A2(49.99 mBTC), 1B1(50 mBTC), fee(0.01 mBTC))
</code></pre>

<p>So <code>transaction1</code> requires that there are 100 mBTC in wallet <code>1A1</code>.</p>

<p>However, Carlos comes along and sends 1 mBTC to Alice at 15:05:</p>

<pre><code>transaction2: (1C1) -&gt; (1A1(1 mBTC), 1C2(4.9 mBTC), fee(0.1 mBTC))
</code></pre>

<p><code>transaction2</code> goes through right away in the block which closes at 15:10. <code>transaction1</code> isn't confirmed at that point in time.</p>

<p>Does this mean that Carlos aborted <code>transaction1</code>? Afaik, the inputs need to be depleted entirely which is why change is needed in the first place.</p>

<transactions>
Can receiving money make a transaction fail?
UTF-8
# Can receiving money make a transaction fail?

(Asked by: username_0 on 2016-06-14)

Scenario: Alice has a wallet `A1bz` (let's say these are the first 4 characters of the private key in wallet import format so we don't have to deal with too many characters) with wallet address `1A1` and 100 mBTC in it. She also has a wallet `A2bz` with wallet address `1A2` for change and wants to send 50 mBTC to Bob's wallet with public address `1B1` at 15:00 but only pays 0.01 mBTC fees (as opposed to 0.1 mBTC) which would be the recommended amount. This means that the transaction probably won't go through right away but will have to wait for a few hours.

This means that `transaction1` is built like this:

```
transaction1: (1A1) -> (1A2(49.99 mBTC), 1B1(50 mBTC), fee(0.01 mBTC))

```

So `transaction1` requires that there are 100 mBTC in wallet `1A1`.

However, Carlos comes along and sends 1 mBTC to Alice at 15:05:

```
transaction2: (1C1) -> (1A1(1 mBTC), 1C2(4.9 mBTC), fee(0.1 mBTC))

```

`transaction2` goes through right away in the block which closes at 15:10. `transaction1` isn't confirmed at that point in time.

Does this mean that Carlos aborted `transaction1`? Afaik, the inputs need to be depleted entirely which is why change is needed in the first place.

**Tags:** transactions


---

## 1 answers

### Answer by username_1 on 2016-06-14. Score: 5 | Accepted answer

No.

The addresses in Bitcoin only signify ownership. You don't need to spend all money from an address or any such thing. The atomic units of Bitcoin transactions are [Unspent Transaction Outputs](https://bitcoin.stackexchange.com/q/4301/5406) (UTXO).

UTXO are uniquely identified by the txid of the transaction that created them, and their position in said transation's output list.

*E.g. if the transaction id of `transaction1` were `tx01` the 49.99mBTC output to Alice would be `tx01-00` and the 50mBTC output to Bob would be `tx01-01` (computer scientists start counting at 0).*

To spend a UTXO, you'd reference them by this identifier, i.e. "I want to spend `tx01-00`". Then you need to provide a signature that corresponds to the address that `tx01-00` was assigned to, and you get to reassign the balance that `tx01-00` represents. Afterwards, `tx01-00` is invalidated.

So, in your example `transaction1` spends UTXO that are unrelated to `transaction2`, so `transaction2` has no bearing whatsoever on `transaction1`.

> **Comments:**
> **username_0**: Does this mean that Alice doesn't need a change address at all if her wallet `1A1` (which holds exactly 100 mBTC) previously received 50.01 mBTC, 30 mBTC, and 19.99 mBTC and she wants to send 50 mBTC to `1B1`?  
> **username_1**: Correct. Addresses can be reused indefinitely. They are not chiefly due to privacy reasons.  
> **username_0**: I know that they can be reused. But I read somewhere that you always have to spend everything an input has. What exactly is an "input"? Is it the unpent transaction output or is it an address? Let's say Alice wants to spend 99.99 mBTC and has the same history for address `1A1` as mentioned above (she received money 3 times). She does not include any other address in the transaction, so all 99.99 mBTC come from `1A1`. Is the number of inputs 1 or 3?  
> **username_1**: Addresses are only a marker for ownership. They only symbolize the private-key that needs to be invoked to sign validly. Transactions consume UTXO as inputs. Those you have to spend completely. Anything you don't assign falls to the miners as transaction fee. So, in the above example, the 100mBTC would presumably be one UTXO, and if the rest were not assigned, it would all be a transaction fee. Fees are not outputs, just unassigned left-overs of the inputs.  
> **username_0**: It made perfect sense until you wrote "So, in the above example, the 100mBTC would presumably be one UTXO". Shouldn't the 50.01 mBTC chunk be 1 UTXO, the 30 mBTC chunk be another one, and the 19.99 mBTC be a third one?  
> **username_1**: Before `transaction1`, there is one UTXO of 100mBTC value, that Alice can spend. `transaction1` consumes that UTXO, to create a 49.99 mBTC UTXO, and a 50.00 mBTC. The fee is not a UTXO, but gets collected by the successful miner in the Coinbase transaction. Carlos uses input(s) of unspecified number to fund `transaction2`, it also creates two new UTXO (1mBTC to Alice, and 4.9 mBTC to himself).  
> **username_0**: Ah, you're talking about the transaction I described in my question whereas I thought you were talking about what I described in the first comment I posted to your answer. Thank you very much!  
> **username_1**: Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/41170/discussion-between-username_1-and-username_0).  

---

