<p>Yes, but only if <code>A -&gt; B</code> is placed before <code>B -&gt; C</code> in the list of transactions.</p>
<p><a href="https://transactionfee.info/charts/inputs-and-outputs-same-block-spends/" rel="nofollow noreferrer">Here</a> is a graph of the percentage of transactions spending each other in the same block, it is usually around 10%.</p>

CC BY-SA 4.0
2021-01-07T16:56:59.640Z
So even within a block, there is a strict ordering of transactions?  I had been under the impression that blocks were ordered, but transactions within a block were unordered!  Very interesting. Thanks.
abelenky
CC BY-SA 4.0
2021-01-07T17:02:11.590Z
Actually, there are a substantial amount of such transactions :) Slightly related: https://eprint.iacr.org/2019/611 discusses those transactions as UTXOs created and spent in the same block reduce the size of the proofs
Antoine Poinsot
CC BY-SA 4.0
2021-01-07T20:46:50.540Z
@abelenky No, there is no strict ordering, at least for Bitcoin. The answer states one of the three requirements: 1) this answer 2) the coinbase tx comes first 3) no duplicate/invalid/double-spend transactions. There are usually multiple possible orderings satisfying these requirements.
MCCCS
CC BY-SA 4.0
2021-01-07T16:54:30.987Z
2021-02-05T22:37:32.513Z
2021-02-05T22:37:32.513Z
Antoine Poinsot
<p>Consider the case where:</p>
<ul>
<li>Address <strong>A</strong> has some BTC.</li>
<li>Address <strong>B</strong> is empty/zero.</li>
<li>Address <strong>C</strong> is the intended recipient.</li>
</ul>
<p><strong>B</strong> sending to <strong>C</strong> is invalid on its own, but does make sense if associated with <strong>A</strong> sending to <strong>B</strong> first</p>
<p>Can two dependent transactions be put into the same block and accepted?</p>
<ul>
<li><strong>A</strong> ==&gt; <strong>B</strong></li>
<li><strong>B</strong> ==&gt; <strong>C</strong></li>
</ul>
<br>
<p><em>(Since the net result will be OK, even though the second transaction does not make sense until the first one is completed)</em></p>

<transactions><block>
Can two related "spends" be in the same block?
abelenky
# Can two related "spends" be in the same block?

(Asked by: username_0 on 2021-01-07)

Consider the case where:

* Address **A** has some BTC.
* Address **B** is empty/zero.
* Address **C** is the intended recipient.

**B** sending to **C** is invalid on its own, but does make sense if associated with **A** sending to **B** first

Can two dependent transactions be put into the same block and accepted?

* **A** ==> **B**
* **B** ==> **C**

  

*(Since the net result will be OK, even though the second transaction does not make sense until the first one is completed)*

**Tags:** transactions, block


---

## 1 answers

### Answer by username_1 on 2021-01-07. Score: 6 | Accepted answer

Yes, but only if `A -> B` is placed before `B -> C` in the list of transactions.

[Here](https://transactionfee.info/charts/inputs-and-outputs-same-block-spends/) is a graph of the percentage of transactions spending each other in the same block, it is usually around 10%.

> **Comments:**
> **username_0**: So even within a block, there is a strict ordering of transactions?  I had been under the impression that blocks were ordered, but transactions within a block were unordered!  Very interesting. Thanks.  
> **username_1**: Actually, there are a substantial amount of such transactions :) Slightly related: https://eprint.iacr.org/2019/611 discusses those transactions as UTXOs created and spent in the same block reduce the size of the proofs  
> **username_2**: @username_0 No, there is no strict ordering, at least for Bitcoin. The answer states one of the three requirements: 1) this answer 2) the coinbase tx comes first 3) no duplicate/invalid/double-spend transactions. There are usually multiple possible orderings satisfying these requirements.  

---

