Skip to content

Instantly share code, notes, and snippets.

Last active Oct 29, 2016
What would you like to do?
python zcash mining calculator
# arg1 = current block number
# arg2 = current network rate in thousands of solutions per second
# arg3 = your solution rate
BLOCKS_PER_DAY = 576*10 # 2.5 minute block time
RAMP_BLOCKS = 20000 # mining slow start
import sys
block = int(sys.argv[1])
net_rate_k = int(sys.argv[2])
your_rate = int(sys.argv[3])
daily = int(BLOCKS_PER_DAY * block/RAMP_BLOCKS)
print 'Daily ramped mining reward in blocks:', daily
your_share = your_rate/(net_rate_k * 1000.0) * daily
print 'Your estimated earnings:', your_share
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment