Calculating my yesterday's earnings on Steem in JavaScript

avatar

Most of us here on Steem have been earning multiple tokens thanks to Steem Engine tribes for a while now. Some people have been investing, some - mining, some - earning through engagement and curation and some - all of these combinations (I'm one of them).

Some tokens have been rewarded more than others and it was interesting for me to look what they are worth today.

How much have I earned on the Steem blockchain yesterday in terms of USD value?

So today I took a look at the statistics at the notifications and here's what I found out. I've been using a script for auto claiming, transferring to my alt accounts and staking those tokens that @contrabourdon has created and notifications have been coming to my email inbox.

So yesterday I earned (in the order the notifications came in) 1.691 SP, 31 PAL, 8 LEO, 439 NEOXAG, 548 CCC, 10 SPORTS, 2 STEM, 22 LEO, 1563 NEOXAG, 173 CCC, 7 SONIC, 162 SPORTS, 0.068 SP. 26 PAL, 8 LEO, 690 NEOXAG, 220 CCC, 23 SONIC, 0.95 STEM and 0.888 SP. For the sake of the clarity, I only used the round numbers of most tokens so my earnings are actually a little bit higher.

First, let's convert them to USD according to the current prices on the Steem Engine.

1 PAL is $0.04816
1 LEO is $0.01581
1 NEOXAG is $0.00489
1 CCC is $0.00657
1 SPORTS is $0.00034
1 SONIC is $0.00965
1 STEM is $0.02166
1 STEEM is $0.194

I set up the values of different tokens in JavaScript. Later I caught myself that I should have used small letters for token symbols as variables in JavaScript but I didn't want to go back and repeat this process again because apparently Chrome Developer Tools don't allow for editing past entries (I apologize for this and will try to be more careful in the future):

image.png

And then I calculated the exact earnings this way:

image.png

Now I need to add the earnings to have total value in USD:

image.png

There you have it - I earned $23.883297 USD worth of STEEM and various Steem Engine tokens yesterday from posting, curation and mining. Not bad considering we are in this bear market and I didn't use any promotion tools and bid bods for my posts. Looks like NEOXAG, CCC and PAL are giving me the most return on investment at the moment. This is to be expected because I'm mining NEOXAG and CCC plus using neoxian, creativecoin and palnet on most of my posts.

Even more importantly, I got to reinforce my beginner JavaScript skills.

What do you think? Any suggestions I could put JavaScript to use here even further?



0
0
0.000
8 comments
avatar

You could also have defined a new variable for every holding, instead of using the interactive way. The result would have been the same and you would have not noticed any improvement, but:

  1. You have just learnt the concept of variables. It is better to use them every time you could, even if it looks a silly usage.
  2. You will later or sooner be using a debugger. Assigning values to variables will help you detect problems in your code.
0
0
0.000
avatar

It's quite impressive how all these tokens add up. Imagine if the price of Steem went up to $2 and the token prices followed proportionately. You could be earning as much as $250 a day. Sounds like another good reason to invest in Steem plus tokens. Also, well done with the calculations.

0
0
0.000
avatar

Thanks! Do you think it would be wise to sell 50 percent of these other tokens for STEEM and power it up? On a day like the one I calculated with today's prices it would be 60 STEEM. 18k+ SP in a year without any fiat investment...

Posted using Partiko Android

0
0
0.000
avatar

I've been looking at starting to track my profits each day measured against my investment. I earn quite a bit from mining but I also dumped a lot of Steem into it. I want understand just how much return I really am getting for my investment and then also try to see just how fast that return is diminishing.

0
0
0.000
avatar

The problem with such tracking is that Steem Engine coins both earned and mined come from the account "tokens" and right now I don't know of any way to really determine the ROI of the mining coins.

Posted using Partiko Android

0
0
0.000
avatar

I would lump them together, I think my only coin that would really be out of whack would be PAL.

0
0
0.000
avatar

Thank you so much for participating in the Partiko Delegation Plan Round 1! We really appreciate your support! As part of the delegation benefits, we just gave you a 3.00% upvote! Together, let’s change the world!

0
0
0.000