<p>Bitcoin protocol doesn't care how many confirmations a transaction has. A user can choose any number of blocks that has to be mined on top of the transaction before considering it confirmed, or in case of Satoshidice it simply doesn't care.</p>

<p>Bitcoin protocol does care that source addresses of a transaction has all required coins to transfer to destination addresses, in other words a transaction has to have all it's inputs to be valid and the number of coins those inputs have must be greater or equal to number of coins in outputs. Therefore if an attacker successfully double spends his transaction to Satoshidice it will also invalidate winning transaction from Sathoshidice, because one of the inputs of winning transaction is the original transaction from the attacker to Sathoshidice.</p>

<p>To answer the question why bitcoin protocol allows it, consider two transactions </p>

<ul>
<li>From address A to address B</li>
<li>From address B to address C</li>
</ul>

<p>To think about second transaction as confirmed you need to wait a certain number of block to be mined on top of it and it doesn't matter how many block were mined on top of the first transaction because it doesn't make second transaction any more secure. Therefore both transactions can appear in the same block and that's completely fine. </p>

CC BY-SA 3.0
2012-11-27T17:50:44.237Z
2012-11-27T17:50:44.237Z
Serith
<p>I read that Satoshidice uses one of the outputs from the bet transaction to fund the response transaction. </p>

<ol>
<li>Can anyone provide explanation/reference to how bitcoin handles such transactions.</li>
<li>What is the rationale of allowing such transactions? </li>
<li>If the protocol did not allow unconfirmed unspent outputs to be used, would that make bitcoin unusable?</li>
</ol>

<transactions>
How does bitcoin handle unspent outputs from fresh transactions?
Jus12
# How does bitcoin handle unspent outputs from fresh transactions?

(Asked by: username_0 on 2012-11-27)

I read that Satoshidice uses one of the outputs from the bet transaction to fund the response transaction.

1. Can anyone provide explanation/reference to how bitcoin handles such transactions.
2. What is the rationale of allowing such transactions?
3. If the protocol did not allow unconfirmed unspent outputs to be used, would that make bitcoin unusable?

**Tags:** transactions


---

## 1 answers

### Answer by username_1 on 2012-11-27. Score: 1

Bitcoin protocol doesn't care how many confirmations a transaction has. A user can choose any number of blocks that has to be mined on top of the transaction before considering it confirmed, or in case of Satoshidice it simply doesn't care.

Bitcoin protocol does care that source addresses of a transaction has all required coins to transfer to destination addresses, in other words a transaction has to have all it's inputs to be valid and the number of coins those inputs have must be greater or equal to number of coins in outputs. Therefore if an attacker successfully double spends his transaction to Satoshidice it will also invalidate winning transaction from Sathoshidice, because one of the inputs of winning transaction is the original transaction from the attacker to Sathoshidice.

To answer the question why bitcoin protocol allows it, consider two transactions

* From address A to address B
* From address B to address C

To think about second transaction as confirmed you need to wait a certain number of block to be mined on top of it and it doesn't matter how many block were mined on top of the first transaction because it doesn't make second transaction any more secure. Therefore both transactions can appear in the same block and that's completely fine.


---

