stack_wallet icon indicating copy to clipboard operation
stack_wallet copied to clipboard

rotate receiving address once its use is detected in the mempool

Open chaserene opened this issue 1 year ago • 1 comments

at least for some assets, Stack Wallet rotates the address offered for receiving once a confirmed transaction had paid to it. this is great for preventing address reuse, increasing privacy.

I suggest hiding an address at an earlier stage, when an unconfirmed transaction in the mempool / transaction pool is expected to pay to it. this would further reduce the chance of giving out the same address twice. this gains further importance when the transaction isn't included in a block for a longer time (e.g. fee too low for network conditions, something that happened in Monero on a grand scale during the suspected spam of this March).

if the transaction that triggered the rotation is never included in a block, it would still make sense to not offer the skipped address, since the detection of the unconfirmed transaction proves that the address had been given out. for surveillable blockchains, entities tracking the mempool also learn about the address and the intent to pay to it.

I see two potential downsides:

  1. restoring a wallet from the mnemonic may not result in the same sequence of offered receiving address. this doesn't hurt the functioning of the wallet, and keeping the address hidden even in just one instance of the wallet would still reduce the chance of the address being reused.
  2. if any continuous "rotation gap" is wider than the address look-ahead distance, restoring from the mnemonic may fail to recover some funds. in my experience, look-ahead distances are usually long enough (100+) to make this risk negligible, but I can't speak for every wallet of all address-rotated Stack assets.

chaserene avatar Nov 22 '24 07:11 chaserene

We'll do some testing on this to make sure it works as intended because it actually kind of should be working like this already.

rehrar avatar Oct 21 '25 16:10 rehrar