<p>A transaction doesn't just identify a sending <em>address</em> as the source of its funds; it identifies a specific output of a specific previous transaction (by transaction ID and output number), called a txout for short.  Once a txout has been used as an input for a new transaction, nodes mark that txout as "spent" and any future transactions that attempt to spend it will be considered invalid.  (This means that the funds in the txout have to be completely consumed by the transaction; if that is a larger amount than you wanted to spend, you need a change output.  This is the whole reason to have change.)</p>

<p>In particular, this rule will prevent a transaction from being included verbatim in the blockchain a second time.  So any attempt to replay an existing transaction would not result in extra funds being sent.</p>

CC BY-SA 4.0
2018-08-24T05:47:39.677Z
Great, thanks. This makes things much clearer now - think I need to dig deeper in how transactions are handled in detail.
Andreas Winter
CC BY-SA 4.0
2018-08-23T22:41:33.877Z
2018-08-23T22:41:33.877Z
Nate Eldredge
<p>Follow scenario: The balance of my origin address is 1 BTC. I'm transfering 0.1 BTC to a shop where I'm buying some goods, my wallet returns the change to my origin address. Now my origin address has a balance of 0.9 BTC. I buy another 0.1 BTC on an exchange and transfer it to my origin address, which now has again a balance of 1 BTC (as much as it had at the beginning).</p>

<p>As far as I understood a transaction is a block of data containing the transaction's details and a signature generated with my private key. If I redo the first transaction to the shop the data block created will look binary identical (same amount, same origin, same receivers), and also the balance of the origin is high enough.</p>

<p>What hinders someone else to resend my transaction in the blockchain network, or a miner to duplicate my transaction, as soon as the balance has refreshed to a value high enough to fulfill the transaction. I'm still missing a hint what invalidates a transaction after it was confirmed. </p>

<p>If I never use a bitcoin address twice, I would be safe.</p>

<p>I am very grateful for any tip what I might have overlooked!</p>

<transactions><transaction-verification><change>
May it be a risk to use the origin as the change address?
Andreas Winter
# May it be a risk to use the origin as the change address?

(Asked by: username_0 on 2018-08-23)

Follow scenario: The balance of my origin address is 1 BTC. I'm transfering 0.1 BTC to a shop where I'm buying some goods, my wallet returns the change to my origin address. Now my origin address has a balance of 0.9 BTC. I buy another 0.1 BTC on an exchange and transfer it to my origin address, which now has again a balance of 1 BTC (as much as it had at the beginning).

As far as I understood a transaction is a block of data containing the transaction's details and a signature generated with my private key. If I redo the first transaction to the shop the data block created will look binary identical (same amount, same origin, same receivers), and also the balance of the origin is high enough.

What hinders someone else to resend my transaction in the blockchain network, or a miner to duplicate my transaction, as soon as the balance has refreshed to a value high enough to fulfill the transaction. I'm still missing a hint what invalidates a transaction after it was confirmed.

If I never use a bitcoin address twice, I would be safe.

I am very grateful for any tip what I might have overlooked!

**Tags:** transactions, transaction-verification, change


---

## 1 answers

### Answer by username_1 on 2018-08-23. Score: 1

A transaction doesn't just identify a sending *address* as the source of its funds; it identifies a specific output of a specific previous transaction (by transaction ID and output number), called a txout for short. Once a txout has been used as an input for a new transaction, nodes mark that txout as "spent" and any future transactions that attempt to spend it will be considered invalid. (This means that the funds in the txout have to be completely consumed by the transaction; if that is a larger amount than you wanted to spend, you need a change output. This is the whole reason to have change.)

In particular, this rule will prevent a transaction from being included verbatim in the blockchain a second time. So any attempt to replay an existing transaction would not result in extra funds being sent.

> **Comments:**
> **username_0**: Great, thanks. This makes things much clearer now - think I need to dig deeper in how transactions are handled in detail.  

---

