Mine GRV with Nodejs
GRAVY is a HFT Trading strategy on the EOS main-net. Its business logic is driven by miners who push mine actions to the chain at regular intervals. The more mine actions pushed to the system, the greater the probability of earning arbitrage profits by the trading strategy.
The GRAVYMINER is a Nodejs script which pushes mine actions at regular intervals to the GRAVY mining contract (gravyhftdefi). Miners donate their CPU resources and receive GRV in return for each successful mine action. GRV can be staked in order to earn a portion of EOS trading profits.
Step 1: Register miner by pushing regminer action to gravyhftdefi contract e.g.
cleos push action gravyhftdefi regminer '["youracct","8,GRV"]' -p youracct@active
Step 2: Replace your account name (arb_account) and private key (pk) in miner.js
Step 3: Replace your preferred api node endpoint in miner.js
Step 4: Install dependencies
npm install eosjs node-fetch
Step 5: Start mining!!
node miner.js &> miner.log
Step 1: Mine or buy some GRV
Step 2: Push the stakegrv action e.g.
cleos push action gravyhftdefi stakegrv '["youracct","10.00000000 GRV"]' -p youracct@active
Step 3: Each day EOS rewards are paid out pro-rata to your stake (4% of total staking reward pool is paid out daily)
Step 1: Begin unstaking process
cleos push action gravyhftdefi unstakegrv '["youracct","10.00000000 GRV"]' -p youracct@active
Step 2: Wait 24 hours...
Step 3: Complete unstake by pushing refundgrv action
cleos push action gravyhftdefi refundgrv '["youracct"]' -p youracct@active