Which output is the change
How Forensia guesses which output of a payment went back to the sender, why it needs agreement between rules, and when it stays silent.
#Plain languageIn plain terms
Bitcoin coins cannot be split in place. To pay 0.3 from a coin worth 1, you spend the whole coin and create two new ones: 0.3 for the recipient and the rest back to yourself. That second one is called change.
From outside, both outputs look the same. Working out which is the payment and which is the change is the single most useful guess in Bitcoin tracing, and it is only ever a guess. Forensia runs several independent rules and speaks up only when at least two agree.
#How it worksHow it works
- Check the transaction has exactly two outputs. Otherwise stop.
- Run four rules. Each may vote for one output.
- Count the votes.
- Report a candidate only if one output leads and has at least two votes.
#Technical detailThe exact rules
| Rule | Votes for an output when |
|---|---|
| Script-type match | All inputs share one script type and exactly one output has that same type. |
| Round payment amount | Exactly one output is a round amount. The vote goes to the other one. |
| Self-transfer | The output's address is also one of the input addresses. |
| Dominant remainder | The output holds at least 90% of the total output value. |
An amount is round when it is a whole multiple of 1, 0.1, 0.01 or 0.001 BTC. The idea is that people choose round numbers to pay and the leftover is whatever it happens to be.
| Votes for the leading output | Outcome |
|---|---|
| 0 or 1 | Nothing is reported. |
| 2 | Reported, confidence low. |
| 3 or 4 | Reported, confidence medium. |
| A tie between outputs | Nothing is reported. |
The finding is finding:bitcoin-change-output, class lead. It lists every rule that voted, so you can weigh them yourself.
#LimitsWhat it does not tell you
- Transactions with any number of outputs other than two are not assessed.
- Wallets can pay round amounts, reuse script types on purpose, or produce change that looks like a payment.
- The dominant-remainder rule points at the larger output. When someone spends most of a coin, the larger output is the payment, and the rule points the wrong way.
- Round amounts below 0.001 BTC, and amounts that are round in a fiat currency, are not recognised.
- Address reuse is checked only within the one transaction, not across the address's history.
- The change output is not used to group addresses together.