The ADAMANT forging pools were made in the fall of 2018; they unite users who receive additional income from their ADM assets and maintain the network’s distribution. In this article we describe how the forging pools are arranged in the ADAMANT blockchain and the new program from ADAMANT Tech Labs, which will make starting and administering your pools easier.
How does a forging pool work?
The ADAMANT blockchain is based on Fair Delegated Proof-of-Stake (Fair dPoS). The forging is designed in a way that only 101 network users — the delegates with the highest rating — can simultaneously do it.
How is the rating formed? It’s based on two criterias: a node’s quality (productivity) and the total weight of a delegate — the sum of ADM balances of users who voted for the delegate. If all nodes work smoothly, then a delegate’s weight will be the deciding factor.
To motivate users to give their votes, the delegate shares the mining of tokens with them. Such a union is called a forging pool. The pool’s organizer (the creator of the delegate the other participants will vote for) faces a responsible task: to calculate and transfer delegates’ rewards on time.
Therefore we created a program that does this automatically; it is being used in the official ADAMANT pool. The automatic distribution is one of the competitive advantages of our pool, because it guarantees that the user will receive a fair share of tokens.
Features and advantages
- Easy to install
- Customizable (config file)
- History of all work made stored in the database
- Minimum server requirements
- Setup on a separate machine without a node
- Informative web interface for voters + mobile version
- Notification system via ADAMANT, Slack for admin (other method is configurable)
- Built-in node availability check
- Read-only mode without passphrase or with automatic payments
How does the program work
The pool is launched in real time and monitors every block of the ADAMANT blockchain. If the pool is not running, payments do not happen.
Currently a delegate gets ~0.5 ADM for every 8 minutes of forging. The program takes a percentage of the total amount (reward_percentage) and divides it among all those who voted in proportion according to balances of their wallets. The number of tokens accrued to each voter in this payment period is recorded in the table in the Pending field. It also stores the remainder after previous periods.
At the end of the period, each of the voters gets as much ADM as indicated in the Pending field, if this value is greater than the minpayout (minimal payment). Each transaction of transfers made by a delegate is recorded in the Transactions table; 0.5 ADM fee for transfer is paid by a delegate.
That’s how the values in the table change: after the transfer, Pending is reset to zero, and the Received value (the income of the pool that voted for the entire existence of the pool) is increased by the Pending value.
A report is being sent to Slack before mailing and after transactions.
Thanks to this program everyone can create their own pool and spend a minimum of time on its administration. The program includes the server part (doing the calculations) and the client available via web interface. The source code is open, and you can use the program for free.
Why would I need my own pool?
The pool allows your delegate to get the necessary number of votes to get into the list of 101 forging delegates. If you have enough ADM to vote for your delegate and get to rank 101, you don’t need a pool.
You will distribute the reward_percentage of the calculated amount of ADM to the users who voted for you, and you will receive the balance yourself. For example, the official pool of ADAMANT distributes 80%.
How do I create my own ADAMANT pool?
You need to install an ADAMANT node and become a delegate. Read how.
Then you install and customize the program according to the instruction below. After that you can tell about your pool in cryptocurrency communities and motivate people to connect.
It is not necessary to establish a pool program, but in this case you will need to calculate and pay the rewards yourself.
You will need basic Linux and Node.js skills to install and launch this software.
Ubuntu 16 / Ubuntu 18 (other OS had not been tested)
NodeJS v 8+ (already installed if you have a node on your machine)
su - adamantgit clone https://github.com/Adamant-im/adamant-poolcd ./adamant-poolnpm i
To save press F2, y, enter.
You can start the pool with the ‘node app’ command, but it is recommended to use the process manager for this purpose
pm2 start --name adamantpool app.js
The web interface is available at http://<IP>:port.
Add pool to cron:
crontab -e@reboot cd /home/adamant/adamant-pool && pm2 start --name adamantpool app.js
Pool program update
If there is an update, you can update your pool.
su - adamantcd adamant-poolmv config.json config3.json && git pull && mv config3.json config.jsonnpm ipm2 restart adamantpool
Maintain your pool
You are responsible for the maintenance of your pool. Remember that in Fair dPoS the uptime of a delegate affects its rank.
The trust of users depends on the performance of your pool. If your pool works poorly, users will take their votes back and go to another pool.