1

Let's say I have the stealth addresses S1 (unspent outputs = 10 XMR), S2 (unspent outputs = 20 XMR), S3 (unspent outputs = 30 XMR). Then I'm sending 35 XMR of the outputs to another one-time public key R.

  1. How does the reference wallet choose which of my stealth addresses will be used to have 35 XMR as input? S1 and S3, or S2 and S3? Why?
  2. To which address does the reference client send the change? To one of my stealth addresses (S1, S2, or S3) or to a new stealth address S4?

1 Answers1

0
  1. How does the reference wallet choose which of my stealth addresses will be used to have 35 XMR as input? S1 and S3, or S2 and S3? Why?

The wallet prefers older outputs (though someone can give you a better, code-based answer, I'm sure). It does this because of the common heuristic that the newest ring member often indicates the true spender.

  1. To which address does the reference client send the change? To one of my stealth addresses (S1, S2, or S3) or to a new stealth address S4?

The client will construct a new S4 stealth address. S3 and S1 and/or S2 are fully spent/exhausted when used. Outputs cannot be partially spent. They are fully spent and change is returned.

scoobybejesus
  • 5,515
  • 21
  • 42