BarterDEX: is an atomic-swap exchange that is decentralized and trusless. Due to the nature of the exchanges, the user must have a native client synched in order to see your utxos and inventory. That means full daemons must be installed for each coin pair you want to trade.

This guide will show you how to install the komodod, bitcoind, and the marketmaker needed to make KMD/BTC swaps. Once installed, you can move on to the BarterDEX command line or gui tests.

Komodo Platform Setup

  • Install Komodo daemon.
  • If trading Komodo assetchains, make sure you run and synch ./assetchains on Komodod.

BarterDEX Setup

------ Debian 9 minimal (stretch) ----

# as root
apt-get install sudo git build-essential cmake libtool autotools-dev automake ccache pkg-config \
curl libcurl4-gnutls-dev libssl1.0-dev libevent-dev libdb++-dev libczmq-dev zlib1g-dev \
libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev \
fail2ban ntp net-tools

# gcc-5 is not on stretch, so take it from sid (needed for some wallets to compile)
# can be skipped for BTC,KMD and most of the main wallets
# it is not very elegant but works fine
cp /etc/apt/sources.list /etc/apt/sources.list.orig
echo "deb sid main non-free contrib" >> /etc/apt/sources.list
echo "deb-src sid main non-free contrib" >> /etc/apt/sources.list
apt-get update
apt-get install gcc-5 g++-5
rm /etc/apt/sources.list && mv /etc/apt/sources.list.orig /etc/apt/sources.list
apt-get update

useradd -m -s /bin/bash barterdex
passwd barterdex
usermod -G sudo -a barterdex

echo "* soft nofile 32768" >> /etc/security/limits.conf
echo "* hard nofile 32768" >> /etc/security/limits.conf

# continue as user barterdex from here
su - barterdex
mkdir ~/wallets

----- marketmaker --------------

git clone
cd SuperNET/iguana
git checkout dev
cd exchanges
cd ../dexscripts
echo "export passphrase=\"`head -c 32 /dev/urandom | base64`\"" > passphrase
chmod 0600 passphrase
cp client client_my
# the parameter \"canbind\":1 can be added to the marketmaker startup if you are not behind a firewall
# to do so edit client_my script and add it, so the line look like this
# ./marketmaker "{\"gui\":\"nogui\",\"client\":1, \"userhome\":\"/${HOME#"/"}\", \"passphrase\":\"$passphrase\", \"coins\":$coins, \"canbind\":1}" &
# if you are behind a firewall you could add \"canbind\": with a specific portnumber instead of 1 and open/forward this port in your firewall
# now better continue in another ssh session
cd ~/SuperNET/iguana/dexscripts
echo "export userpass=\"`./inv | cut -d \"\\"\" -f 4`\"" > userpass
chmod 0600 userpass
cp enable enable_my
# add the coins you want activated in the enable_my script
# KMD, BTC, REVS and JUMBLR are now ready to use
# after proper funding you can issue ./setprice, ./autoprice and ./autotrade calls
# ./getcoins | json_pp | grep -C 10 \"KMD\" shows the address for KMD to send funds to
# it is best to make copies of the scripts you edit so a call to ./install for updating dont overwrite them

----- nanomsg ------------

cd ~/wallets
git clone
cd nanomsg
make -j4
sudo make install
sudo ldconfig

----- bitcoin ----------------

cd ~/wallets
git clone
cd bitcoin
./configure --with-incompatible-bdb --with-gui=no --disable-tests --disable-bench --without-miniupnpc
make -j4
sudo make install
mkdir ~/.bitcoin
echo "server=1" >> ~/.bitcoin/bitcoin.conf
echo "listen=0" >> ~/.bitcoin/bitcoin.conf
echo "listenonion=0" >> ~/.bitcoin/bitcoin.conf
echo "rpcuser=barterbtc" >> ~/.bitcoin/bitcoin.conf
echo "rpcpassword=`head -c 32 /dev/urandom | base64`" >> ~/.bitcoin/bitcoin.conf
chmod 0600 ~/.bitcoin/bitcoin.conf
bitcoind -daemon

**A more in depth guide on the BarterDEX command line will be published soon.