Skip to content

Instantly share code, notes, and snippets.

@nerdralph
Last active October 29, 2016 21:17
Show Gist options
  • Save nerdralph/dc4b6ad4f0f8f58098187be2f6debd5f to your computer and use it in GitHub Desktop.
Save nerdralph/dc4b6ad4f0f8f58098187be2f6debd5f to your computer and use it in GitHub Desktop.
python zcash mining calculator
#!/usr/bin/python2
# 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