This guide will teach you how to use mpm by cipi for market making on atomicDEX.
Table of Contents
Background Information
mpm connects to mm2 and places market making orders based on prices from CoinGecko and margins you set.
25% of the 24h_price_change
is added to the spread of the involved coins. So if 24h_price_change
is 10%, it will add 2.5% to both bid and ask. This is done to protect from prices that go crazy on illiquid coins. For big coins this may be too much, for small coins not enough, but you can set different spreads for different coins in the config.
If BTC or ETH/ERC20 is involved, it will set a min_volume
for the order. Basically get_trade_fee * 15
. 1/15 = 6% This is done because of the spread. With a 2% spread and 4% payed for fees you would not make money if your bid/ask was set at 3%.
Please Note
This guide is intended for Ubuntu.
It is assumed you are either:
- Using mmtools with coins started you’d like to trade.
- Have built/downloaded, setup, and are running mm2 with coins started that you’d like to trade.
You will need to decide what base coin you’d like to use.
- BTC, KMD, BCH, LTC, and DOGE are available.
- For example: SPACE/KMD, CHIPS/KMD, WSB/KMD, VRSC/KMD
Instructions
You can choose to use MPM with MMTools (easiest solution) or in a Standalone setup running MM2 and MPM manually.
MMTools
-
Open the Terminal or SSH into your server.
-
Enter the mmtools directory:
cd && cd mmtools
-
Open the base coin config file for editing.
Replace KMD with whatever base coin you choose.
./mpm_config KMD
-
Set the margins for coins you’d like mpm to place orders with:
The margin number is the % below (bid) or above (ask) market price.
Remove coins you don’t wish to trade or you’ll see errors in the log file.
-
Use
Ctrl
+x
to exit the config file. -
Press
y
to save your changes. -
Press
enter
to keep the name of the file the same. -
Start MPM:
./mpm_start KMD
MPM is now running and placing orders
To see MPM output, check your mmtools log file.
To stop MPM run:
./mpm_stop
Standalone
-
Open the Terminal or SSH into your server.
-
Update the system:
sudo apt-get update
-
Install dependencies:
sudo apt-get install git jq libdatetime-perl libdatetime-format-strptime-perl libjson-perl libjson-rpc-perl libfile-slurp-perl liblwp-protocol-https-perl
-
Clone the mmtools repository:
cd && git clone https://github.com/cipig/mmtools
-
Enter the mmtools directory:
cd mmtools
-
Determine the base coin you’ll use. (BTC, KMD, BCH, LTC, DOGE) In this case we’ll be using Komodo.
-
Open the config file for editing. Replace KMD with whatever base coin you choose.
nano mpm/mpm.conf.dex.KMD
-
Set the
bidmargin
andaskmargin
for each coin to whatever margin you’d like. The margin number is the % below (bid) or above (ask) market price. -
Use
Ctrl
+x
to exit nano. -
Press
y
to save your changes. -
Press
enter
to keep the name of the file the same. -
Start mpm with CoinGecko prices. Replace
KMD
andkomodo
with whatever base coin you choose.stdbuf -oL nohup ~/mmtools/mpm/mpm.sh.dex_gecko KMD komodo > /tmp/mpm.log.dex.kmd &
MPM is now running and placing orders for the coins you have enabled in mm2.
To see mpm output do: tail -f /tmp/mpm.log.dex.kmd