How I'm managing to claim and stake rewards with all these tribes!

in #steemleo5 years ago (edited)

I've only been on Steemit for a short while—joined in February to partake in the weekly Secrets of Organ Playing Contests run by @organduo and @laputis. I think I have joined at an exciting time because all these tokens and various tribes have started popping up. The thought of earning and claiming tokens with a single post or curation activity is fantastic!

It's true that with anything in cryptocurrency requires a lot of self education. It was hard to find my feet the first few weeks here. I had no idea what I was doing, but when you're thrown in the deep end you seem to float faster ;) The excitement I felt when I received STEEM as prizes and claiming rewards was like a child getting candy.

As you become more involved in the platform, you start to receive a steady wave of rewards. Constantly checking my @partiko app to see if I had any to claim started to become a time consuming behaviour. Also with the emergence of other tokens, in particular PAL (@minnowsupport) and STEEMLEO (@steem.leo), this would increase my 'workload' again...Plus there isn't a friendly way to claim these rewards (yet) via a mobile app.

So, I thought to myself, I need a way to automatically claim these rewards and stake them. As an INVESTMENT, shouldn't these things be working for you, rather than you working for it? Staking your rewards is essential to continue your growth on the platform. There's probably tools like this already for Steem but I haven't come across any for the Steem Engine tokens. And secondly, I like to keep my private keys 'in-house' as much a possible! So, I introduce you to the Raspberry Pi!

Source

Apart from being an organist, I'm also a tech geek, so a Raspberry Pi is suitable for automating tasks like this on the blockchain. After several days of research, I settled on using the steem-js library. I'm a newbie to NodeJS, but as I've had programming experience, I just needed to learn the syntax to achieve what I wanted to achieve.

I won't go into the nitty gritty of the code and setup, but essentially to claim STEEM rewards, I'm using the following function:

steem.broadcast.claimRewardBalance( 
  privatePostingWif,
  'username', 
  '0.000 STEEM',
  '0.000 SBD',
  '0.000 VESTS',
  function( err, result ) {
    console.log( err, result );
  }
);

For claiming tokens (like PAL and LEO):

var json = JSON.stringify( { "symbol": `${token}` } );
Steem.broadcast.customJson( 
  privatePostingWif, [], [username], 'scot_claim_token', json,
  ( err, result ) => {
    console.log( err, result );
  }
);

Simply scheduling these via cron does the trick!

To power up Steem:

steem.broadcast.transferToVesting( 
  wif, from, to, amount, function( err, result ) {
    console.log( err, result);
  }
);

To stake tokens:

var json = JSON.stringify(
  { "contractName"    : "tokens",
    "contractAction"  : "stake",
    "contractPayload" : { "symbol": `${token}`, "to": `${username}`, "quantity" : `${amount}` } }
);

Steem.broadcast.customJson( wif, [username], [], 'ssc-mainnet1', json,
  ( err, result ) => {
    console.log( err, result );
  }
);

Again, scheduling these via cron does the trick also.

I have also configured an email to be sent each time rewards are claimed or staked. Here's a recent screenshot:

So if any other tribe/token comes along, I can simply add another cron entry to my Raspberry Pi to claim and stake. This leaves me more precious time to create and curate content :)

You can support me using Steem Basic Income

Sort:  

It's true that with anything in cryptocurrency requires a lot of self education. It was hard to find my feet the first few weeks here. I had no idea what I was doing, but when you're thrown in the deep end you seem to float faster ;) The excitement I felt when I received STEEM as prizes and claiming rewards was like a child getting candy.

Truer words could not be spoken. This applies to me as well. :)

I’m definitely not as tech savvy as some people on here... so this is far beyond me as well. All things I’m interested in learning though!

Posted using Partiko iOS

To listen to the audio version of this article click on the play image.

Brought to you by @tts. If you find it useful please consider upvoting this reply.

Coin Marketplace

STEEM 0.17
TRX 0.16
JST 0.029
BTC 74831.10
ETH 2823.14
USDT 1.00
SBD 2.52