Skip to content

Latest commit

 

History

History
155 lines (81 loc) · 4.35 KB

Use-MPM.md

File metadata and controls

155 lines (81 loc) · 4.35 KB

Use MPM

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:

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

  1. Open the Terminal or SSH into your server.

    terminal

  2. Enter the mmtools directory:

    cd && cd mmtools

    Enter

  3. Open the base coin config file for editing.

    Replace KMD with whatever base coin you choose.

    ./mpm_config KMD

    Configure

  4. 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.

    Set

  5. Use Ctrl + x to exit the config file.

    Exit

  6. Press y to save your changes.

    Save

  7. Press enter to keep the name of the file the same.

    Enter

  8. Start MPM:

    ./mpm_start KMD

    Start

MPM is now running and placing orders

To see MPM output, check your mmtools log file.

To stop MPM run:

./mpm_stop

Standalone

  1. Open the Terminal or SSH into your server.

    terminal

  2. Update the system:

    sudo apt-get update

    update

  3. 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

    dependencies

  4. Clone the mmtools repository:

    cd && git clone https://github.com/cipig/mmtools

    clone

  5. Enter the mmtools directory:

    cd mmtools

    enter

  6. Determine the base coin you'll use. (BTC, KMD, BCH, LTC, DOGE) In this case we'll be using Komodo.

  7. Open the config file for editing. Replace KMD with whatever base coin you choose.

    nano mpm/mpm.conf.dex.KMD

    edit

  8. Set the bidmargin and askmargin for each coin to whatever margin you'd like. The margin number is the % below (bid) or above (ask) market price.

    set

  9. Use Ctrl + x to exit nano.

    exit

  10. Press y to save your changes.

    save

  11. Press enter to keep the name of the file the same.

    enter

  12. Start mpm with CoinGecko prices. Replace KMD and komodo with whatever base coin you choose.

    stdbuf -oL nohup ~/mmtools/mpm/mpm.sh.dex_gecko KMD komodo > /tmp/mpm.log.dex.kmd &

    start

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