Heard of Cash Shuffle? Heard of the new "liquidity bots"? Did you know that anyone can run a liquidity bot? The more people that run bots, the more reliable and private the mixing will be. Note: running the bot is NOT necessary to use Cash Shuffle. It helps others, but if you simply want to test out the Cash Shuffle plugin as a user, then click here.

What if I told you its actually not that hard to setup and run the bot on a linux machine? Well it's true. Keep reading... I'm going to tell you exactly how you can do it.

(The official instructions are in Github but I always find most documentation hard to read and also assuming a lot of knowledge on the user. So I will try to give a more user friendly guide here.)

Step 1.

Open up a terminal prompt and clone the electron cash repository. Then clone the cash shuffle repository. I always like to keep things nice and contained within subfolders so I might do something like this:

mkdir my-working-folder cd my-working-folder git clone https://github.com/fyookball/electrum git clone https://github.com/cashshuffle/cashshuffle-electron-cash-plugin

If your system is telling you that you do not have git installed, then run the following command:

sudo apt-get install git (and then of course do the above git clone commands again).

At this point you should have a folder called "my-working-folder" and inside that, 2 subfolders called "electrum" and "cashshuffle-electron-cash-plugin".

Step 2.

Make sure you have Python3 installed. You can type the command "python3" or "python" and it should tell you which version you have. Make sure it is a version 3 such as "3.5.2" rather than a version "2.7.12". If the "python3" command gives you a version 3 and the "python" command gives you a version 2, that's fine; just make sure to use the python3 command in the following steps.

If for some reason you don't have python 3, install it with:

sudo apt-get install python3.6

Step 3.

Copy the shuffle folder into the plugins folder. Inside the cashshuffle-electron-cash-shuffle folder you will find a subfolder that is simply called "shuffle". That is the one we are going to copy. (Don't worry, you won't need the protobuf or images folder. Those are only for developers.) Inside the electrum folder, there's a subfolder called plugins. So you're going to copy the shuffle folder into the plugins folder so that you now should have "electrum/plugins/shuffle".

Step 4.

Modify the setup.py file. Inside the top level of the electrum folder is a file called setup.py. On lines 80-90 or so you'll see a bunch of lines of code that define which packages are in the wallet... things like keepkey, ledger, trezor, etc..

Carefully add the shuffle plugin to the list with the following line of code: 'electroncash_plugins.shuffle', It should look like this:

If you've never edited a code file before, computers are very finicky. Make sure to include the single quotes on each end of the line , and then the comma. Be precise! :) Save the changes.

Step 5.

Before we run the setup program, let's make sure we have the "schedule" python module installed:

sudo pip install schedule sudo pip3 install schedule

Step 6.

From inside the electrum folder:

sudo python3 setup.py install

Step 7.

You'll need an encrypted wallet file. You can create it using any machine you have that is running electron-cash. If you're just setting the wallet for the first time in python, run the following command from inside the electrum folder: pyrcc5 icons.qrc -o gui/qt/icons_rc.py

Then you can run the wallet with: python3 electron-cash or: sudo python3 electron-cash If you have a non-encrypted wallet, encrypt it by setting a password (click on the padlock icon). Make sure you don't lose your password and always have your seed! Yes, the wallet must be encrypted to use the bot. Pro-tip: If building the icons.qrc file with pyrcc5 is giving you trouble, you can instead download the file from here: https://github.com/fyookball/electrum-icons and copy it manually to the electrum/gui/qt folder.

Step 8.

Fund your wallet. Make sure you send at least .02 BCH on 3 different addresses in your wallet. Or, if you have existing coins, make sure you have at least .02 on 3 different unspent outputs (coins). To check this, visit the coins tab by going to "View, Show Coins". If you have a large amount of "dust", you can consolidate it by spending it back to an address in the wallet. You want at least 3 different addresses and they each should have .02 BCH minimum.

Step 9.

Ok, we're all set. Final step... navigate to the shuffle directory, for example: cd my-working-folder/electrum/plugins/shuffle And now we're going to run the bot. You'll need to know the exact path to your wallet file (you can find out where it is by running Electron Cash and opening or saving a wallet and see what folder it uses. Usually its in the .electron-cash folder inside the "~" or home folder. (notice the dot in the name).

You'll also need the name of the current mixing server, which at the time of this article is shuffle.imaginary.cash. In the future there will hopefully be multiple servers running all the time. And of course you need your wallet password. The -M 2 parameter meets use 2 mixing partners...so for a person coming alone, they will have 2 seats filled by the bot to create a 3 way mix. The -T 1 means the bot will wait 1 minute before mixing.

Here is an example where my wallet is /home/ubuntu/.electron-cash/wallets/default_wallet and my password is mypwd.