You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

4.9 KiB

title
Atomic Swaps

You can perform atomic swaps between Wownero and another chain called Particl, a privacy focused Bitcoin fork. From that chain you can swap into a number of other coins:

coin name ticker
Bitcoin BTC
Monero XMR
Wownero WOW
Decred DCR
Firo FIRO
Litecoin LTC
PIVX PIVX
Dash DASH
Particl PART

To do this you run a software called BasicSwap on your computer which connects to other participants where you can place and accept bids. Funds go directly into your wallets without any middle-man, completely decentralized.

Installation

The official documentation can be found here: https://academy.particl.io/en/latest/basicswap-guides/basicswapguides_installation.html

A community member ran, shout out to ofrnxmr, command line tool can be found here: https://github.com/nahuhh/basicswap-bash/releases

The Docker method is pretty convoluted, I don't recommend it (and I love docker). The system installation is much easier.

For Linux users, see below:

Debian/Ubuntu Linux

# Install package dependencies
sudo apt install git python3-venv tor

# Clone and install project
git clone https://github.com/basicswap/basicswap $HOME/basicswapdex
cd $HOME/basicswapdex
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

# Setup new basicswap deployment with Wownero and Monero
python basicswap/bin/prepare.py \
    --datadir=$HOME/.basicswap/ \
    --withcoin=wownero \
    --withcoin=monero \
    --xmrrestoreheight=3314350 \
    --wowrestoreheight=695109

# ...
# IMPORTANT - Save your particl wallet recovery phrase:
# carton jealous rib ability damage regular royal
# tobacco basic become sting timber speed solve
#soda potato circle help now swept citizen chef drive cable
#
# Done.
#

SAVE THE MNEMONIC SEED SHOWN AT THE END!

Your basicswap installation data will reside in $HOME/.basicswap and the project in $HOME/basicswapdex. It will manage and install it's own set of binaries for the node and wallet-rpc. There are some contributors which make updates to ensure Wownero stays up to date.

Customize Data Directories (Optional)

Basicswap will also set it's own directory for the chains to sync their data to. If you're like me and you already run your own nodes, be sure to modify the wownerod and monerod config files to use your existing data folders.

vim $HOME/.basicswap/wownero/wownerod.conf
# data-dir=/home/<YOURUSER>/.wownero
vim $HOME/.basicswap/monero/monerod.conf
# data-dir=/home/<YOURUSER>/.bitmonero

Enable Tor (Optional)

If you want everything to route through tor you need to update your basicswap deployment like so:

python basicswap/bin/prepare.py --enabletor

Your basicswap deployment will now be configured to use tor as seen in $HOME/.basicswap/basicswap.json. The tor_control_password will be autogenerated, along with a matching tor config file in $HOME/.basicswap/tor/torrc.

If you have tor enabled for your deployment you will need to make sure it is running while you have basicswap running since it will be expecting to route/proxy traffic through it.

tor -f $HOME/.basicswap/tor/torrc

Adding Other Coins

python basicswap/bin/prepare.py --addcoin=bitcoin
python basicswap/bin/prepare.py --addcoin=litecoin

You're on your own after that.

Running

Make sure you are in the project directory ($HOME/basicswapdex if you followed this guide) and run the software (depending on your installation route), which probably looks like this:

cd $HOME/basicswapdex
source .venv/bin/active
python basicswap/bin/run.py

Open your browser and go to http://127.0.0.1:12700/offers - you should see any active offers for the coins you have enabled.

Using

Go to the Wallets paged and make sure they're all synced up - you might have to wait a bit.

Copy the address or subaddress of the wallet and send funds. When the transfer is confirmed on that network you will be able to participate in atomic swaps.

Particl will always be your intermediary, there are no direct atomic swaps from Wownero to Monero for example.

Swap Routes
Wownero -> Particl -> Monero
Wownero -> Particl -> Bitcoin
Monero -> Particl -> Wownero
Monero -> Particl -> Bitcoin
Bitcoin -> Particl -> Wownero
Bitcoin -> Particl -> Monero

Look for offers that suit your criteria (the coin you have, the coin you want, and a market rate you are comfortable with) or place your own offer.

Set your bid, wait for it to get filled, then wait for the swap to happen. The swap itself is a combination of cryptographic shenanigans with signatures and lock times - I don't know all of the intracacies but I do know it is trustless and completely peer to peer.