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?
2
  • when you say "stealth address" - what do you mean?
    – m2049r
    Commented Aug 11, 2018 at 15:10
  • The answer by @scoobybejesus is what I was looking for. I really meant stealth addresses, and not subaddresses, like @ knaccc suggested. Commented Aug 18, 2018 at 1:57

1 Answer 1

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.

1
  • 1
    I'm not sure, but I think the question might have been using the term stealth address to refer to subaddresses
    – knaccc
    Commented Aug 10, 2018 at 15:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.