<p>There is no way to know with certainty which output is the actual spend, and which is the change, without being involved in the transaction yourself. It is possible to infer this though, consider the following:</p>

<p>Transaction 'X' has 2 inputs (0.5, 0.5), and 2 outputs (0.7, 0.3). Logically, we can infer that the larger output (0.7) is the spend, because if the spend was the 0.3 output, the user could have saved costs by just using one of the 0.5 inputs to send the transaction. </p>

<p>However, it is possible for users to purposefully transact in a less efficient way, in order to obfuscate their spending habits, so you can never be absolutely certain. </p>

CC BY-SA 3.0
2017-11-29T08:33:50.877Z
Thank you very much, that is was I was looking for - a definite clause. Do you happen to have any external resource for that? This constraint will be included in a paper or similar, and I could use that. Or does it happen to be on the wiki and I totally missed it?
Simone Colucci
CC BY-SA 3.0
2017-11-29T22:39:07.430Z
I don't have an external resource, sorry. The system is designed to obfuscate this sort of data though, so if you're looking for a hard reference on how to elucidate this info, I'm not sure one exists. At any rate, even the best inference would not be absolutely conclusive in just about every case, you'll be playing a guessing game within some self-defined confidence bounds.
chytrik
CC BY-SA 3.0
2017-11-27T22:39:58.113Z
2017-11-27T22:39:58.113Z
chytrik
<p>I am building analytics starting from blockchain raw data (blk**.dat files).</p>

<p>I have read in the bitcoin wiki that once the inputs have been chosen for a transaction, they must be all used: so a change is generated back to the original sender (via the same address or a different <i>change</i> one, depending on the client configuration).</p>

<p>While building analytics, I would like to exclude these outputs from any kind of metric, since they let the coin work but do not represent any intelligence at all.</p>

<p>Is there a way to looking at the outputs of a transaction and split them into meaningful sent amounts and change? </p>

CC BY-SA 3.0
2017-11-27T22:46:06.690Z
The whole point of having change explicit in the first place is making sure people can't (trivially) do this kind of analysis!
Pieter Wuille
<transactions><change>
How to distinguish between change and actual sent amount looking at transaction data
Simone Colucci
# How to distinguish between change and actual sent amount looking at transaction data

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

I am building analytics starting from blockchain raw data (blk\*\*.dat files).

I have read in the bitcoin wiki that once the inputs have been chosen for a transaction, they must be all used: so a change is generated back to the original sender (via the same address or a different *change* one, depending on the client configuration).

While building analytics, I would like to exclude these outputs from any kind of metric, since they let the coin work but do not represent any intelligence at all.

Is there a way to looking at the outputs of a transaction and split them into meaningful sent amounts and change?

**Tags:** transactions, change

> **Comments:**
> **username_1**: The whole point of having change explicit in the first place is making sure people can't (trivially) do this kind of analysis!  

---

## 1 answers

### Answer by username_2 on 2017-11-27. Score: 2

There is no way to know with certainty which output is the actual spend, and which is the change, without being involved in the transaction yourself. It is possible to infer this though, consider the following:

Transaction 'X' has 2 inputs (0.5, 0.5), and 2 outputs (0.7, 0.3). Logically, we can infer that the larger output (0.7) is the spend, because if the spend was the 0.3 output, the user could have saved costs by just using one of the 0.5 inputs to send the transaction.

However, it is possible for users to purposefully transact in a less efficient way, in order to obfuscate their spending habits, so you can never be absolutely certain.

> **Comments:**
> **username_0**: Thank you very much, that is was I was looking for - a definite clause. Do you happen to have any external resource for that? This constraint will be included in a paper or similar, and I could use that. Or does it happen to be on the wiki and I totally missed it?  
> **username_2**: I don't have an external resource, sorry. The system is designed to obfuscate this sort of data though, so if you're looking for a hard reference on how to elucidate this info, I'm not sure one exists. At any rate, even the best inference would not be absolutely conclusive in just about every case, you'll be playing a guessing game within some self-defined confidence bounds.  

---

