Restake Service in LumenX

Restake Service in LumenX

By Staking Hub | LumenX Network | 27 Apr 2023


Ecostake offers together with yildmos the most reliable and user friendly way to profit from the full Authz module potential, allowing delegators to restake their rewards and compound profits, making APY far way higher than simply staking and picking benefits.

 

LumenX Network restake is still a experimental feature, though it is working without issuesand is set to become fully tested soon.

 

If you are a validator and need to restake, you need to set up a service triggered once every X period to be listed among restaking validators. Since there is a guide in github, this guide is not thoroughly clear and mixes docker and NPM configuration, which can be misleading. So I have made this step by step guide in order to help you set a restake service.

 

Since the service is only running once restaking period is over, and btw it is not very demanding for resources, you might use well your validator VPS or computer in order to restake, so it is in fact totally free. You will need also an independent wallet, from now on “Bot Wallet” with some funds in the chains you want to provide with the restake service.

 

For restake to run, you must install these packages and their dependencies:

 

$ sudo apt update && sudo apt upgrade

$ sudo apt install git npm nodejs -y

 

Download the code and install it using NPM:

 

$ git clone https://github.com/eco-stake/restake && cd restake

$ npm install

 

Create a file .env using nano or vim and write in it the mnemonic of your Bot Wallet, which must hold funds in the chains you may use in order to cover the fees.

 

$ nano .env #always check your prompt is at $HOME/restake

 

MNEMONIC=your bot wallet seed phrase

 

For most chains this could be enough to get started. Anyway, LumenX is not fully tested so not provided as a default chain. You may as well use your private RPC, a particular configuration for fees and a healthcheck. In that case, you need to edit the src/networks.local.json in order to override the default rc/networks.json. Do never edit the default file or you will get an error.

 

$ nano src/networks.local.json

 

{

"lumenx": {

"prettyName": "LumenX",

"gasPrice": "5000ulumen",

"autostake": {

"retries": 3

},

"healthCheck": {

"uuid": "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxx"

}

}

}

 

# valid as a configuration sample

 

Use crontab to establish the period to trigger the service. A useful guide to do it can be found at

 

https://crontab.guru/

 

$ crontab -e

 

Choose an editor and uncomment at the end of the document modifying the parameters according to your preference. For instance, if you want to restake every hour you must type

 

0 * * * * /bin/bash -c "cd restake && npm run autostake" > ./restake.log 2>&1

 

Which means that every ‘zero’ minutes autostake will run and log will not be saved. Save changes and exit.

If you want to restake everyday at 14h 00, insert

 

0 14 * * * /bin/bash -c "cd restake && npm run autostake" > ./restake.log 2>&1

And so on. Once run the service, you need to make it public by proposing a commit by forking and opening a PR at 

https://github.com/eco-stake/validator-registry

Create a folder with your validator identifier and create two files:
  1. chain.json with the information of the chains you are serving. Check any as an example. Remember that the first “address” field should be populalated with your ‘valoper’ and the second one with your ?Bot Wallet chain address’. The minimum reward is the minimum amount in a millionth token you want to restake.
  2. An easier profile.json with your Validator Name and your Keybase ID (if provided) in order to be publicly visible.
And that’s all! Once merged you can check everything is working fine.

How do you rate this article?

0



LumenX Network
LumenX Network

ANNs, documents and useful guides related to LumenX network ecosystem www.lumenx.app

Publish0x

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.