<p>No, it picks a random position.</p>

<p>The purpose is to make it hard for people observing the blockchain to know which is change and which is the payment, as that would make tracing easier. This is also the reason why change outputs use new keys to send to.</p>

<p>Note that there has been a bug for a long time that made it always end up in the same position. It was fixed over a year ago, IIRC.</p>

CC BY-SA 3.0
2014-05-22T16:02:47.297Z
Note that it's still fairly easy to (semi-accurately) track which is change vs payment. [blockchain.info](https://blockchain.info/) does it automatically, and is usually correct, from what I've seen.
Tim S.
CC BY-SA 3.0
2014-05-22T14:46:04.927Z
2014-05-22T14:46:04.927Z
Pieter Wuille
<p>When using the <code>sendtoaddress</code> command, does the Bitcoin client automatically place the change address at <code>vout</code> array position 0?
I would assume so, because bitcoin works through a sequence of procedures.</p>

<bitcoind><raw-transaction>
Is the change address always at the same position in the vout array of a raw transaction?
derrend
# Is the change address always at the same position in the vout array of a raw transaction?

(Asked by: username_0 on 2014-05-22)

When using the `sendtoaddress` command, does the Bitcoin client automatically place the change address at `vout` array position 0?
I would assume so, because bitcoin works through a sequence of procedures.

**Tags:** bitcoind, raw-transaction


---

## 1 answers

### Answer by username_1 on 2014-05-22. Score: 1 | Accepted answer

No, it picks a random position.

The purpose is to make it hard for people observing the blockchain to know which is change and which is the payment, as that would make tracing easier. This is also the reason why change outputs use new keys to send to.

Note that there has been a bug for a long time that made it always end up in the same position. It was fixed over a year ago, IIRC.

> **Comments:**
> **username_2**: Note that it's still fairly easy to (semi-accurately) track which is change vs payment. [blockchain.info](https://blockchain.info/) does it automatically, and is usually correct, from what I've seen.  

---

