clifordsymack / Electron-Cash

Electrum; Bitcoin thin client
MIT License
6 stars 3 forks source link

Feature Request: Shuffle to another wallet #75

Open acidsploit opened 5 years ago

acidsploit commented 5 years ago

Add an option to allow the user to shuffle to another wallet, where the user can provide the xpub key of another wallet.

imaginaryusername commented 5 years ago

Implementation considerations:

cculianu commented 5 years ago
  • To avoid address reuse, the wallet should keep track of the xpub as a watch-only that piggybacks on the main wallet.

Yes.. good point.

  • Once a wallet is transformed into a "shuffle to something else" wallet, it'll always irreversibly keep watching the xpub.

Or.. make it explicitly hard to reverse -- without specifying another destination wallet ? (Destination could also be self, as we have now)?

markblundeberg commented 5 years ago

Pros:

Cons:

acidsploit commented 5 years ago

We can also add a (default?) option where it shuffles to the same wallet, but just to another hardened derivation path.

imaginaryusername commented 5 years ago

Additional pros:

Additional cons and why this should remain optional:

@acidsploit see #73

markblundeberg commented 5 years ago

Yes, the easiest way for this to be done (in Electron Cash at least) is to have a button that creates/opens the associated Shuffled wallet (which is on another derivation path). This would be accomplished by:

The user would click on a button and see a new wallet open with a filename like "CLEAN_76be98c44818df87". It should be password protected using same password, or something like that. It's also possible to do it without wallet files but it's a bit heavy to have to re-download transactions and SPV proofs every time.

An advanced config setting would let you select another existing wallet file to output to, or, enter an xpub.

markblundeberg commented 5 years ago

Another downside: Doesn't provide a firewall between different 'shuffled send' events -- the receiving wallet just acts like a regular wallet.

CatatonicAdenosine commented 5 years ago

Another way of doing this could be to implement the feature as a "sweep" instead of as a send, ie. "sweep and shuffle" under Private Keys>Sweep. The user would set up a new wallet in EC and sweep from their old seed or xprv/xpub. The sweep would be conducted via a shuffle to fresh addresses in this new wallet.

Pros: