<blockquote>
<p>Is there a way to know in above setup which input address sent which amount to output address?</p>
</blockquote>
<p>No</p>
<blockquote>
<p>I've looked into the transaction algorithm and my conclusion is that it is all mostly random matching, am I right?</p>
</blockquote>
<p>No.</p>
<blockquote>
<p>My goal is to show bitcoin transfers between addresses (ideally ignoring the transaction in the middle) to achieve something like this</p>
</blockquote>
<p>That is not possible.</p>
<p>Bitcoin doesn't require that each input be associated with one or more specific outputs. The only requirement is that the sum of inputs is greater than, or equal to, the sum of outputs.</p>
<p>No nodes attempt to infer the sort of associations you describe. It is not needed. No one cares. It is irrelevant to Bitcoins purposes.</p>
<p>When creating such a transaction, A node will simply sum the required outputs, then gather sufficient inputs for that total. The choice of inputs need not be influenced by the specific individual outputs at all. Many wallets choose inputs based on privacy concerns. There is absolutely nothing to be gained by attempting to align each input amount with one or more individual output amounts. Any excess is dealt with by inserting a change output somewhere in the list of outputs.</p>

CC BY-SA 4.0
2022-07-29T10:26:00.813Z
2022-07-29T10:55:33.773Z
2022-07-29T10:55:33.773Z
RedGrittyBrick
<p>I am confused as to how should I analyze  many to many transaction.
I.e. many TX IN and many TX OUT</p>
<p><a href="https://i.sstatic.net/5Zvzf.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/5Zvzf.png" alt="many to many transaction" /></a></p>
<p>Is there a way to know in above setup which input address sent which amount to output address?</p>
<p>I've looked into the transaction algorithm and my conclusion is that it is all mostly random matching, am I right?</p>
<p>My goal is to show bitcoin transfers between addresses (ideally ignoring the transaction in the middle) to achieve something like this</p>
<p><a href="https://i.sstatic.net/RLEV8.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/RLEV8.png" alt="enter image description here" /></a></p>

<transactions><address>
How to analyze BTC flow in many to many transaction
Macin
# How to analyze BTC flow in many to many transaction

(Asked by: username_0 on 2022-07-29)

I am confused as to how should I analyze many to many transaction.
I.e. many TX IN and many TX OUT

[![many to many transaction](https://i.sstatic.net/5Zvzf.png)](https://i.sstatic.net/5Zvzf.png)

Is there a way to know in above setup which input address sent which amount to output address?

I've looked into the transaction algorithm and my conclusion is that it is all mostly random matching, am I right?

My goal is to show bitcoin transfers between addresses (ideally ignoring the transaction in the middle) to achieve something like this

[![enter image description here](https://i.sstatic.net/RLEV8.png)](https://i.sstatic.net/RLEV8.png)

**Tags:** transactions, address


---

## 1 answers

### Answer by username_1 on 2022-07-29. Score: 1

> Is there a way to know in above setup which input address sent which amount to output address?

No

> I've looked into the transaction algorithm and my conclusion is that it is all mostly random matching, am I right?

No.

> My goal is to show bitcoin transfers between addresses (ideally ignoring the transaction in the middle) to achieve something like this

That is not possible.

Bitcoin doesn't require that each input be associated with one or more specific outputs. The only requirement is that the sum of inputs is greater than, or equal to, the sum of outputs.

No nodes attempt to infer the sort of associations you describe. It is not needed. No one cares. It is irrelevant to Bitcoins purposes.

When creating such a transaction, A node will simply sum the required outputs, then gather sufficient inputs for that total. The choice of inputs need not be influenced by the specific individual outputs at all. Many wallets choose inputs based on privacy concerns. There is absolutely nothing to be gained by attempting to align each input amount with one or more individual output amounts. Any excess is dealt with by inserting a change output somewhere in the list of outputs.


---

