Skip to content
This repository was archived by the owner on Apr 2, 2025. It is now read-only.

Setting up Liquidity Provider (LP) Node

Satinder Grewal edited this page May 29, 2017 · 23 revisions

Prerequisites

Hardware

Minimum specs:

  • 2 (virtual) cores
  • 4GB RAM
  • 200 GB HDD (HDD because the bitcoin blockchain size is currently ~150 GB).

Recommended hardware specs:

  • Hired (virtual) server in a data center with fast network and direct network accessibility (no NAT)
  • 4 (virtual) cores
  • 12GB RAM
  • 400 GB HDD for long-term and storing more blockchains locally

Software

The software currently works only on Linux.

You must have synchronized full nodes of the following cryptocurrencies installed and running on your system:

Besides your usual security measures, you have to open several potentially firewalled ports so as they can accept incoming connections. 7770 (komodo node), 7775 (iguana), 8333 (bitcoin).

External services

  • Bittrex.com account with activated API key. LP node will put funds on both Centralised Exchange and on it's local wallet to gain more liquidity.
  • Blocktrail.com account with activated API key. It is needed for querying blockchain data from explorer. No funds needed to be in Blocktrail.com. Basilisk needs to query explorer level data which is not available locally, and neither the notary nodes have them. So, in this case Blocktrail.com API is used to query explorer level data ONLY.

Coin supply

  • A Bitcoin address with an accessible balance. example. 0.2 BTC
  • A Komodo address with an accessible balance. example. 200 KMD

WARNINGS

  • This server must NOT be set up as a Notary Node. Never use a Notary Node as a LP node.
  • For security, do not use a general purpose BTC/KMD/etc address that contains significant funds.

Installing Liquidity Provider (LP) Node on Ubuntu/Debian System

Liquidity Provider (LP) node is using the same iguana daemon codebase which is used at many other places like Notary Nodes, Agama Wallet and such.

For Liquidity Provider we'll need to compile iguana daemon & marketmaker daemon with Market Maker capabilities.

Setting up SuperNET/Iguana.

Log in as the user to your system, and issue these commands to make sure your Linux machine is up to date.

sudo apt-get update
sudo apt-get upgrade (and say Y when it wants to upgrade stuff)

Install the dependency packages:

sudo apt-get install build-essential pkg-config libc6-dev m4 \
		g++-multilib autoconf libtool ncurses-dev unzip git python \
		zlib1g-dev wget bsdmainutils automake libboost-all-dev \
		libssl-dev libprotobuf-dev protobuf-compiler libqt4-dev \
		libqrencode-dev libdb++-dev ntp ntpdate vim software-properties-common \
		curl libcurl4-gnutls-dev cmake clang

Some Linux machines are now providing nanomsg package version 1.0. If it is available via package manager, you can install it from there. Else, you should use github repo of nanomsg and compile it yourself.

For Ubuntu 14.04 you need to install it yourself

cd /tmp
wget https://github.com/nanomsg/nanomsg/archive/1.0.0.tar.gz -O nanomsg-1.0.0.tar.gz
tar -xzvf nanomsg-1.0.0.tar.gz
cd nanomsg-1.0.0
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
cmake --build .
sudo cmake --build . --target install
sudo ldconfig

Or the following for 16.04

git clone https://github.com/nanomsg/nanomsg
cd nanomsg
cmake .
make
sudo make install
sudo ldconfig

Time to compile iguana daemon from SuperNET github repo

cd ~
git clone https://github.com/jl777/SuperNET
cd SuperNET/iguana
git checkout dev
./m_LP

This will compile iguana daemon and place it under ~/SuperNET/agents/iguana. To start iguana daemon follow these exact steps:

cd ~/SuperNET/iguana/
../agents/iguana

Make sure to follow the above steps exactly to start iguana daemon properly. Once you see output like below iguana is ready and serving it's API on http://127.0.0.1:7778 or http://localhost://7778

>>>>>>>>>> iguana_rpcloop 127.0.0.1:7778 bind sock.17 iguana API enabled <<<<<<<<<
mainloop

Setup link between iguana, KMD and BTC

Link between these three is that iguana API starts talking to Native Komodo RPC and Native Bitcoin RPC.

This let iguana and marketmaker do transaction and OP Script operations.

So, in this sense, iguana and marketmaker are basically working as external Smart Contract daemon.

To start BTC passthru link between iguana and Native Bitcoin RPC do these steps:

cd ~/SuperNET/iguana/coins
./btc

To start KMD passthru link between iguana and Native Komodo RPC do these steps:

cd ~/SuperNET/iguana/coins
./kmd

Now we are ready for next step.

Time to compile Market Maker

Keep iguana daemon running in separate window, and open a new Terminal window and follow these steps:

cd ~
cd SuperNET/iguana
git checkout dev
./m_mm

This will compile marketmaker daemon which you can find in ~/SuperNET/iguana/marketmaker.

Ready to start Market Maker

Before you execute marketmaker we first need to

Clone this wiki locally