clifordsymack / Electron-Cash

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

Feature: Second-order shuffling #78

Open imaginaryusername opened 5 years ago

imaginaryusername commented 5 years ago

This can serve as a starting point for implementing an optional second-round shuffling, which massively boosts taint reduction, robustness and resistance to sybils. Due to the complexity involved, it should strictly be implemented after #68 and #72 (or #73).

In the context of #72, we can establish three new buckets of coins:

5) Second-shuffle output: Equal-value outputs whose input came from 2) Shuffled coins, in a shuffle transaction.

6) Second-shuffle change: Variable value outputs from 5).

7) Second-shuffle spend change: Leftover change from spending a 5).

When enabled, wallets should only spend from 5) almost all the time.

TODO: additional logic, upgrade path