Skip to content

Instantly share code, notes, and snippets.

@jinhwanlazy
jinhwanlazy / bos_profit.py
Last active September 6, 2017 16:20
Boscoin rewards calculator
"""
Calculates expected number of rewards by operating a BOScoin node.
Note that this is speculation, since we don't know how many frozen units/nodes
will be until genesis. Also note that this script is not applying increasing
number of total supply. However, roughly saying, rewards will not be changed
while every node operators, frozen coin holders try to reinvest all their rewards.
Becasue rewards are distributed by shares.
"""
class RewardCalculator:
def __init__(self, initial_rewards, decrease_rate, decrease_cycle, end):
@jinhwanlazy
jinhwanlazy / bos_ico_distribution.py
Last active November 22, 2017 10:32
bos_distribution.py
import json
import signal
from operator import itemgetter
from decimal import Decimal
from boscoin_base.address import Address
def handle_timeout(signum, frame):
raise
if __name__ == "__main__":