SRD is an automated tool for distributing eCash staking rewards. It periodically checks your payout address, and if there are rewards exceeding 0.625M xec, it distributes them proportionally.
Here are the detailed steps to install and use:
-
Clone the code
Clone this repository to your local environment.
git clone https://github.com/alitayin/Staking-Reward-Distributor.git
Navigate to the project directory:
cd Staking-Reward-Distributor
-
Install dependencies
Install the required dependencies.
npm install
-
Set up environment variables
Create a
.env
file and set the environment variables. Open the file usingnano
:nano .env
Inside the
.env
file, provide your PRIVATE_KEY_WIF and UTXO_ADDRESS. Note that the UTXO_ADDRESS should match your payout address:PRIVATE_KEY_WIF=<your_private_key> UTXO_ADDRESS=<your_utxo_address> // same as your payout address
-
Run the application
After everything is set up, you can run the application using:
node app.js
The application will be running on port 3333,(http://localhost:3333) localhost=your vps ip. so make sure this port is allowed through your firewall.
-
Configure the distribution
Now you can visit the application in your web browser and set up the specific reward destination addresses for each address.
-
Optional: Use pm2 to keep the application running
To keep the application running in the background, you can use
pm2
:npm install pm2 -g pm2 start app.js
To stop the application, you can use
pm2 stop app.js
.
This tool checks every 10 seconds. If your payout address has more than 0.625M xec, it will automatically distribute the rewards proportionally based on the addresses you specified in the settings.
Please note that this process is not completely trustless, as you receive the rewards of the stakes delegated to you. Even if you send the rewards out right away, this brief control over other user's funds can be considered a money transmitter service. It is not recommended to provide staking services in a commercial manner with this tool, without holding a money transmitter license or other necessary licensing.