Position of change in vout

Is the position/index of the change address in vout random or fixed?

I know it’s random in bitcoin now, but it used to be static due to a bug.

I assume that you are asking if it is fixed in the current official ppcoin client.
The answer is that it is the same as it was in bitcoin v0.6.

But your question is not clear about this, therefore I add the following:

The change output is just another output.
The protocol is not aware of a change output, neither is it required to have one.

It is even advised to always use a new address as change address for privacy and security reasons.
Specifying a specific output index would reduce privacy even more, making it even easier to explore people’s wallets.

There is no reason to use a specific output, and like you say a random output is preferred.

1 Like

Then I guess it’s most likely the first vout of a transaction that contains change. Thank you.