πββοΈ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
Preparations
Installing docker & docker-compose
Install docker
sudo apt update
sudo apt install -y docker.ioInstall 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
If you don't have a server with public ip address you need to setup the Pinggy tunnel now. This creates a secure tunnel and allows your server to be accessible from the public internet - this is required such that your node is able to accept and respond to RFQ swap requests from clients.
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)
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
It is important that you always keep some balance of native chain token (SOL for Solana, STRK for Starknet) in your wallet (non-trading) - this is used to cover the transaction fees for executing the swaps. Keeping at least 0.2 SOL and 200 STRK is recommended.
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
Once your node is approved to be listed in the LP registry you will start processing user's swaps!
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.
Default mainnet configuration:
Last updated