πŸƒβ€β™‚οΈRunning LP node

Instructions for setting up and running an atomiq LP node with docker containers

LP node runs in docker containers & it is fully separated from your other programs, there is also no need to install anything other than docker on the main system.

Pre-requisites

  • A linux based machine (preferrably ubuntu 20.04 or 22.04) and SSH (command line) access

    • Testnet requirements: 4GB of RAM, 200GB SSD storage

    • Mainnet requirements: 6GB of RAM, 1TB SSD storage

  • Machine either needs to have a public IP address and be accessible from the public internet or you need to use the Pinggy tunnel to forward traffic to your local machine

We can recommend using Contabo for VPS hosting, the following instances are recommended:

Preparations

Installing docker & docker-compose

Install docker

sudo apt update
sudo apt install -y docker.io

Install docker-compose

Setup firewall

Open ports 22 (SSH), 80 (HTTP), 443 (REST for mainnet) & 8443 (REST for testnet) in the firewall

Installation

Download the latest atomiq node archive

Unpack the archive

Run the setup script - this will walk you through setting an environment (mainnet/testnet) and node's wallet

Once this completes, it runs all the required software inside docker containers, you can check that all of them are running with

Interacting with the node

CLI

You can interact with the atomiq node through a CLI (command line interface), this uses a simple TCP connection over netcat to communicate with the LP node:

Stop and start

The full atomiq stack will run automatically on machine boot after installation, should you need to stop or start it you can use the following commands

Stop the atomiq stack with (will stop the containers):

Start the atomiq stack back up with (will reset the containers, if they are still running)

Using CLI

CLI is the way to send command to your running atomiq node. To get an overview of all the available command type in 'help'

Monitoring synchronization status

We need to wait for the bitcoin node to sync up to the network (download whole bitcoin blockchain, this takes few hours on testnet & up to a day on mainnet).

We can monitor the status of the sync progress with the status command

Depositing funds

While the node is syncing we can already deposit funds to the node, using β€˜getaddress’ command we get the Smart chains (Solana, Starknet, EVM, etc.) & Bitcoin deposit addresses

After funds are deposited to the wallets we can track the balance with the β€˜getbalance’ command (BTC balances only show up after bitcoin node is synced)

The balances on the smart chains (Solana, Starknet, EVM, etc.) are split across wallet balances (these are not used for trading) - 'nonTradingWalletBalances' & trading vault balances (these are actively used for processing swaps) - 'tradingVaultBalances'

To make the smart chains funds available for processing swaps we have to deposit them to the LP vault (this doesn’t have to be done with bitcoin assets) - repeat this for all the assets you want to be traded β€˜deposit <asset> <amount>’. The assets are always specified in the following format: '<chain>-<asset ticker>', e.g. STARKNET-STRK or SOLANA-SOL

Now we can check that the assets are really deposited and used for trading

Waiting for sync

For the LP node to start being operational you will have to wait till the underlying bitcoin node finishes synchronizing the bitcoin blockchain. You can check see the synchronization progress in the verification progress field. Once your node is synced up and ready the LP node status should show "ready"

Testing the LP node

After the node is synced up we can test the node via the atomiq frontend, to do this you first need to get the URL of your LP node

To make the atomiq frontend access your node you can use the following frontend URL and replace the <your node URL> with the URL obtained by executing the geturl command:

https://app.atomiq.exchange/?UNSAFE_LP_URL=<your node URL>

This will force the frontend to connect only to your LP node

Registering LP node

To be able to process swaps of other atomiq users your node needs to be registered in the atomiq LP node registry.

After confirming the swaps through the LP node work in the previous step, we can now send a request to register our node in the central LP registry with the register command. Please be sure to include an e-mail where we can contact you in case there is something wrong with your node

We will now review your node (check if it is reachable & try swapping through it), you can monitor your node's approval/disapproval status by issuing the register command again

Updating

To update the node to the latest version of the docker images you can run the following

Download the latest atomiq node archive

Unpack & run the update script (this will automatically install the new package versions and restart all the docker containers)

Configuration

Your atomiq node comes pre-configured with reasonable default, but in case you want to change the configuration you can find in config/intermediary/config.yaml (for mainnet) or config-testnet/intermediary/config.yaml (for testnet) folders.

You might want to change the RPC URLs, and use dedicated ones (from e.g. Helius (Solana)- reasonable free tier, or Alchemy (Starknet, EVM) - a reasonable pay-as-you go tier) - see the SOLANA and STARKNET section. Or change the minimums/maximums or fees charged for the swaps - see the ONCHAIN and ONCHAIN_SPV section.

Default mainnet configuration:

Last updated