Electron-cash: sending shuffled coins to hardware wallet without connecting all the inputs

Created on 29 Mar 2019  路  12Comments  路  Source: Electron-Cash/Electron-Cash

So I've waited a considerable time to shuffle all my coins in EC. I now want to transfer the coins to a hardware wallet. However, making a single transaction will connect all of the inputs and ruin some of privacy of having done the shuffle.

I would like if possible to have an option to transfer the coins input-by-input, each to a new address in the hardware wallet. I could do it manually now but it would take a while. If there was a UI option to send all of the inputs in a single command, it would be very helpful. Maybe in the address space it could take the master public key of the hardware wallet instead of a long list of addresses. I am not sure of the best way.

CashShuffle Security & Privacy UX and usability enhancement suggestion

Most helpful comment

Please also include some kind of random, non-trivial time delay also. Seeing all those outputs move in a tight time window will suggest a single owner.

All 12 comments

Hmm. Taking a master public key and checking and only using addresses on that MPK that don't have a history would work. (It wouldn't take too long to do the turn-around to the Electrum server to query the history).

The other option is to manually paste the addresses in a UI too. Kind of ugly.

And at the end it should show you a preview of what it did, and you hit broadcast and it goes...

Not a bad suggestion.

Please also include some kind of random, non-trivial time delay also. Seeing all those outputs move in a tight time window will suggest a single owner.

This is not a bad idea @kobejohn .. esp. if there re lots of tx's it has to send. If they all show up at the same time and activity on the blockchain is low it's pretty obvious what's happening.

The window could be a persistent window that is independent (but dies if you close the wallet, of course).

The UI flow would be:

  1. Right click on a bunch of shuffled utxos in coins tab -> Send to another wallet...
  2. It creates a new window that has the interface to this feature, where you input an MPK.
  3. It scans the MPK to find unused addresses (without any history)...
  4. When it finishes scanning it shows you a summary of what it will do and how much in fees you can expect to pay and/or any error messages.
  5. You have an optional, ON by default checkbox "send intermittently with random delays"
  6. If you hit "GO" the window stays open and it shows you as it makes progress.

During this time the UTXOs you selected are frozen. If the window is closed and/or dies part of the window's cleanup code will be to unfreeze those UTXOs so when you re-open the wallet or whatnot no lasting "damage" is done to the wallet (ie having tons of frozen coins). This can be handled using python finalizers.

I really want this feature. It would scratch a personal itch and be a cool "bell and whistle" for power users.

Most users won't even know it exists.. and this won't interfere with anything else in the wallet.

EDIT: @kobejohn Would the ideal thing be a delay as measured in BCH blocks being confirmed? Or would it just be a "wall clock time" delay? And what would the magnitude of this delay be?

Final question to ponder: Should this be a "cashshuffle-specific" feature or should it be any old UTXO could be sent this way?

I'm thinking cashshuffle only, for shuffled utxo's only. Otherwise it's kind of pointless. But curious what others think maybe I'm missing something.

One use-case that may be relevant to some users:

  1. Shuffle coins in EC.
  2. Send shuffled coins to hardware wallet "input-by-input" preserving the shuffle.
  3. Send back the coins from HW wallet to my EC. If my HW wallet connects to EC, I again would like to be able to use coin control features to preserve the shuffle, or else the previous "input-by-input" send would have been for naught and all my shuffled inputs get connected.

It would also be nice to perhaps be able to send certain utxos from the hardware wallet to EC for shuffling.

@zveda Note someone wrote a plugin to accomplish JUST this task. I haven't looked at the code so I have no idea what the quality is -- but the guy that wrote it is a decent dev so it hopefully is good.

https://github.com/KarolTrzeszczkowski/Inter-Wallet-Transfer-EC-plugin

Update: I just did a quick skim of the code. it looks to be of decent quality on first inspection. I would say you can go ahead and use it if you can't wait for us to add this feature!

Ooh, thanks for letting me know.

Something just came to mind. Let's say EC receives a transaction of shuffled inputs to its public key. Will EC then know they are shuffled, or will it re-shuffle them all automatically?

It knows they are shuffled if it "looks" like a shuffled transaction (based on shape). This way you can always restore from seed and not need to reshuffle, for example.

I'm closing this issue because this plugin handles this feature quite well and for now it's the recommended way to do it:

https://github.com/KarolTrzeszczkowski/Inter-Wallet-Transfer-EC-plugin

In the future we may add this plugin's functionality as a first-class feature in Electron Cash as the plugin matures and it accrues "experience points" (and features and bug reports).

Was this page helpful?
0 / 5 - 0 ratings