Staking Rewards with Energi

energi staking rewards

Here are some gotchas since I started my journey with an Energi staking node.

If you want to earn stake rewards you need to be connected online all the time with your node, so a node on a server is much better for this purpose than having it at home.

There is a great article here on how to setup a staking node:

And here you can find a NRG Staking calculator:

Some things to consider:
Energi staking rewards will be always the same amount, namely 2.28 NRG at the time of writing this article.

What varies is the reward time so the more you stake, the quicker you will get rewarded.

For example with 200.00 NRG staked, the reward interval is 260 hours, about 10.8 days.

So with 200.00 NRG staked, you will get rewarded 2.28 NRG after 10.8 days.

With 1000.00 NRG staked, the reward interval becomes 52.88 hours, or about 2.2 days.

These are important details, specially if you are thinking at compound interest rates, which is when you add the interest to the principal invested capital.

Compound interest is very powerful and can give you a lot of leverage, if this is a new concept for you, I suggest you google it and learn more.

If you send your NRG to multiple wallet addresses, they will be staked separately, each one with is own timed reward, so if you have 5 addresses with each 200.00 NRG in it, even though that is the same wallet, it will take 5 times longer to get your rewards.

Consider that the staking calculator gives just average projections, Energi support (on Discord) advice is to keep in mind staking rewards happening in double or triple the time suggested by the calculator to smooth out probabilities, for example if the calculator output is 2.28 NRG every 2 weeks, it’s much better thinking like getting 2.28+2.28+2.28 every 6 weeks.

Also, if you move around NRG in your staking addresses that will reset the staking time, so it’s best to do that at the end of a staking cycle.

Staking rewards will not automatically end up in your main staking address, so to compound your gains, you will have to “roll-up” the rewards, there is a process for that described in the Energi discord channel. I will ask if it’s ok to post the direct link to that here.

Energi support is very fast and I’ve been very pleased by talking with them.

Happy staking!

AWS Firehose Lambda template for vpc-flow logs to ELK cluster

When creating a Kinesis Firehose Stream, some Lambda blueprints are available to process and convert data.

Using the Python blueprint:



To add a timestamp in front of it, modify the transformLogEvent(log_event) function like this:

# return log_event['message'] + '\n'
ts = str(log_event['timestamp'])
return ts + ' ' + log_event['message'] + '\n'

Python aws boto3 print instances list per vpc

import boto3

session = boto3.Session(profile_name='awsdev')
ec2= session.client('ec2', region_name='eu-west-1')


# get vpc list
for i in range(len(response["Reservations"])):

# dict with k=vpc v=[instances]
for v in vpcs:
    for i in range(len(response["Reservations"])):
        if instance_vpc == v:

# print vpc and instance list
for i in dict_vi:
    print("---------------------- %s ---------------------" % i)
    print(', '.join(dict_vi[i]))

Python3 argparse

Supports -h and --help automatically :D

So you automagically get this:

~$ ./myprog -h
usage: myprog [-h] [--cron] [--ms MS]

optional arguments:
-h, --help show this help message and exit
--cron use when you want to lock i.e. when run by cron
--ms MS overwrite milliseconds treshold in

See example snippet to use booleans switches or pass values:

import argparse

# parse cli args
parser = argparse.ArgumentParser()
parser.add_argument("--cron", action="store_true", help="use when you want to lock i.e. when run by cron")
parser.add_argument("--ms", type=int, help="overwrite milliseconds treshold in")
args = parser.parse_args()

    ms_treshold =

Python import csv file with support for comments in dictionary

import csv
from collections import OrderedDict

# Import csv as list

with open('owners.csv', 'r') as owners:
reader = csv.reader(filter(lambda row: row[0]!='#', owners))
o = list(reader)

# convert list into dict with k=name[0] v=[rest of list]
for i in o:

odsorted=OrderedDict(sorted(od.items(), key=lambda t: t[1]))

example csv file:
~$ cat owners.csv
# comments supported :)

to access dict (i.e. in ipython):
In [1]: od["name1"][0]
Out[1]: 'owner1'
In [2]: odsorted["name1"][0]
Out[2]: 'owner1'