pacmic profit calc


SUBMITTED BY: Guest

DATE: July 30, 2015, 11:25 a.m.

FORMAT: Python

SIZE: 2.1 kB

HITS: 444

  1. """
  2. DONATION 16RdQZ86NUWQbE6rM86JbxnnaCDcAKqa9
  3. AUTHOR http://steal1982.altervista.org/hashnest.php
  4. """
  5. ####PACMIC PROFIT CALCULATOR####
  6. #####EDIT THIS VALUES#########
  7. #number of contracts
  8. principal=1
  9. #AutoReBuy option values True/False
  10. autobuy=True
  11. #autobuy=False
  12. #how many days AutoReBuy will be active 0=Entire Contract Duration(infinite)
  13. autobuy_days=0
  14. #difficulty increase https://bitcoinwisdom.com/bitcoin/difficulty
  15. diff_increase=1.02
  16. #################################################
  17. sat=1*10**-8
  18. yeld=0.7*sat
  19. ghs=1000*principal
  20. balance=0
  21. profit=0
  22. blocks=0
  23. import urllib2
  24. import math
  25. import json
  26. def get_btc_block(difficulty,ghs):
  27. return (25/((difficulty*49710.2696)/((ghs*10**9))))/6/24
  28. def openjsonurl(url):
  29. res = urllib2.urlopen(url)
  30. r=res.read()
  31. return json.loads(r)
  32. def get_diff():
  33. data=openjsonurl('http://btc.blockr.io/api/v1/coin/info')['data']
  34. return float(data['last_block']['difficulty'])
  35. difficulty=get_diff()
  36. btc_block=get_btc_block(difficulty,ghs)
  37. start=principal
  38. while principal>=0:
  39. blocks+=1
  40. if blocks %2600==0:
  41. difficulty*=diff_increase
  42. btc_block=get_btc_block(difficulty,ghs)
  43. t=principal*yeld*10*60
  44. profit+=t
  45. p=(btc_block-t)
  46. principal -=p
  47. balance+= btc_block
  48. days=blocks/6/24
  49. profit=balance-start
  50. print blocks,days,balance,principal,profit,ghs,btc_block
  51. if autobuy:
  52. rebuy=balance/0.001
  53. principal+=balance
  54. balance=0
  55. profit-=balance
  56. ghs=ghs+rebuy
  57. btc_block=get_btc_block(difficulty,ghs)
  58. if autobuy_days>0 and blocks>autobuy_days*144:
  59. autobuy=False
  60. profit=balance-start
  61. print blocks,days,balance,principal,profit,profit/days,365/days*profit*100
  62. print "Blocks:",blocks
  63. print "Days:",days
  64. print "Profit:",profit
  65. print "Average Daily Profit:",profit/days
  66. print "APR:",365/days*profit*100

comments powered by Disqus