After seeing so many people going into the telegram asking for help with the staking token I through I write this up to help people to better understand how this work.

If you have EDNA token and you not planning to sell or doing anything with it you should stake it to earn some reward.  The reward rate is the best that i seen in this space, last week i got a return of over 6%.

Staking period for 1 Week, 1 Month or 3  Month.

1 Week

For one week staking you claim them on the weekly basis.  So exactly 7 days from the day you stake you be able to go to https://staking.edna.life.  You should able to see the green Claim button as display on the above image.  For the weekly staking once claim the reward will go straight into your account.  You can then stake them again or do what ever you want with it, it’s your.

1 Month – 1.5x reward of the weekly reward

If you choose a  monthly period, you still have to claim every week.  Once you make your claim, the reward will move into ESCROW and stay there until your period end.  While the token are in the ESCROW it will be automatically stake for you to earn more reward, you do not need to do anything.

If you miss making a claim for that week you will forfeit your reward for that week.  So you must make sure you claim them every week while you’re staking.

3 Month (Quarterly) – 2x reward of the weekly reward

If you choose a 3 month (quarterly) period, again you still have to claim every week. Once you make your claim, the reward will move into ESCROW and stay there until your period end. While the token are in the ESCROW it will be automatically stake for you to earn more reward, you do not need to do anything.

If you miss making a claim for that week you will forfeit your reward for that week. So you must make sure you claim them every week while you’re staking.

Unstaking or Adding more to your staking

Currently the contract does not allow you to add more EDNA token to an existing staking period.  I believe to implement this will required a lot of work and Greg Simpson (founder) rather focus on developing the DAC code.  Greg is in the telegram 24/7, I don’t think he ever sleep, so if you want to talk to him, pop into the EDNA telegram group and you find him.

Your option is to unstake for current period and you will loose all your reward, so what ever the amount is in your ESCROW you will loose that, so be careful with this option.

Your second option is to use your second account to stake it, leaving your current account as it is.  In this situation you will required to make claim every week for all your accounts.

Automating your claim every week

If you lazy like me or busy and forgot to claim every week, then you can setup a simple cron script to do the work for you.  This will require you to have cleos and keosd install for this method to work.

First i would create a new permission for the purpose of making the claim, so if this key pair is compromise the only thing they can do is making claim for you.

Create a new wallet to store this key

cleos wallet create -n myClaimWallet –to-console

This is the output:

Creating wallet: myClaimWallet

Save password to use in the future to unlock this wallet.

Without password imported keys will not be retrievable.

“PW5JS3Ubzq2yLj5tBb7KxHH43VyPC2weT3V8uZ6M9yvwXx13dcgoh” – you need this password to unlock your wallet to make claim

Now that your wallet is created, let’s create a key pair

cleos create key –to-console

Private key: 5K1yCXD7xdtcRpxU7qkAcYm3D9Z1WLaXe6tSFKxTYpkcgVoEnVs

Public key: EOS8kJS8uXm3hGpxy12U2VsTx1G4g1eFMx9s2R9av6eH81dKnHmWY

CREATE NEW PERMISSION

With the new key pair created, let add a permission to your account with this key pair.

cleos -u https://api.eosnewyork.io:443 set account permission {YOUR_ACCOUNT_NAME} claimer ‘{“threshold”: 1,”keys”: [ {“key”: “EOS8kJS8uXm3hGpxy12U2VsTx1G4g1eFMx9s2R9av6eH81dKnHmWY”, “weight”:1}] }’ active -p [email protected]

replace YOUR_ACCOUNT_NAME with your real account name.

claimer – this is the name of the permission that we giving, you can name it anything you want.

Now that we have the permission setup for you account we need to link the action you want this permission to have.  In this case we want this permission to only have the claim permission for the ednazztokens contract only.

cleos -u https://api.eosnewyork.io:443 set action permission {YOUR_ACCOUNT_NAME} {CONTRACT_NAME} {ACTION} {PERMISSION_NAME}

cleos -u https://api.eosnewyork.io:443 set action permission {YOUR_ACCOUNT_NAME} ednazztokens claim claimer

Now that you have a new permission and auth link up properly, you ready to go.  Here’s the command to run to make your claim.

cleos -u https://api.eosnewyork.io:443 push action ednazztokens claim ‘{“_stake_account”:”YOUR_ACCOUNT_NAME”}’ -p [email protected]

Putting it altogether into a script so that you can put into a cron to run it once a week.

#!/bin/sh

/usr/local/eosio/bin/cleos wallet unlock -n myClaimWallet –password PW5JS3Ubzq2yLj5tBb7KxHH43VyPC2weT3V8uZ6M9yvwXx13dcgoh/usr/local/eosio/bin/cleos -u https://api.eosnewyork.io:443 push action ednazztokens claim ‘{“_stake_account”:”YOUR_ACCOUNT_NAME”}’ -p [email protected]

If you going to run this as a cron, be mindful that every week you have to update the cron to run a minute later as there will be time slippage.  Because every time you run the script it take some time for the contract to process.  What ever the time it’s process, that the exact time it will need to run in 7 days time.  I just update the cron and add a minute more to it during the week before the next schedule kick in.

NodeJS version

Install eosjs library: https://github.com/EOSIO/eosjs

npm install [email protected]

I will assume you create a new permission for this as well, refer to the “CREATE NEW PERMISSION” as above.  Once that’s done here’s a simple script to do it.  This is a simple nodejs script so use it at your own risk.

const { Api, JsonRpc, RpcError, JsSignatureProvider } = require(‘eosjs’);

const fetch = require(‘node-fetch’);

const { TextDecoder, TextEncoder } = require(‘text-encoding’);

const defaultPrivateKey = “5K1yCXD7xdtcRpxU7qkAcYm3D9Z1WLaXe6tSFKxTYpkcgVoEnVs”; // Your private key for your claimer permission

const signatureProvider = new JsSignatureProvider([defaultPrivateKey]);

const rpc = new JsonRpc(‘https://nodes.get-scatter.com’, { fetch });

const api = new Api({ rpc, signatureProvider, textDecoder: new TextDecoder(), textEncoder: new TextEncoder() });

try {

        (async () => {

            const result = await api.transact({

            actions: [{

                account: ‘ednazztokens’,

                name: ‘claim’,

                authorization: [{

                    actor: ‘{YOUR_ACCOUNT_NUMBER}’,

                    permission: ‘claimer’,

                 }],

                data: {

                    _stake_account: ‘{YOUR_ACCOUNT_NUMBER}’, 

                },

              }]

    }, {

             blocksBehind: 3,

             expireSeconds: 30,

    });

    console.dir(result);

    })();

} catch (e) {

    console.log(‘\nCaught exception: ‘ + e);

    if (e instanceof RpcError) {

        console.log(JSON.stringify(e.json, null, 2));

    }

}

Make sure you replace {YOUR_ACCOUNT_NUMBER} with your real account name.

25 votes, average: 4.20 out of 525 votes, average: 4.20 out of 525 votes, average: 4.20 out of 525 votes, average: 4.20 out of 525 votes, average: 4.20 out of 5 (25 votes, average: 4.20 out of 5)
You need to be a registered member to rate this.
(506 total tokens earned)
Loading...

Responses

  1. Smitty

    Thanks for this information, it helped me understand the process. Do you know how much leeway we have on the claim process every week? If my stake period ends at 7:50:52 do I have one hour to claim or 1 second before I lose that weeks tokens?

    (0)