Okay, I finished my little script.
Here's the source if anyone is interested in taking a look.
# This is written in python 3
# Feel free to use this in your own projects
def truncate(f, n):
'''Truncates/pads a float f to n decimal places without rounding'''
s = '{}'.format(f)
if 'e' in s or 'E' in s:
return '{0:.{1}f}'.format(f, n)
i, p, d = s.partition('.')
return '.'.join([i, (d+'0'*n)[:n]])
###################
# HARCODED VALUES #
###################
#Cost in USD of miner (grand total)
minerCost = 1542.5
#Revenue of miner $/day
minerRevenue = 10.21
#Power cost of miner $/day
minerPowerCost = 1.67
#this block should be mined on November 27th
startBlock = 385389
#this is my projected difficulty on the 27th
startDiff = 66500000000
#this is the starting % increase every two weeks
expectedDiffIncrease = 4.0
#this is the % change in difficulty increase every two weeks
diffIncreaseDelta = -3.0
breakeven = False
revenue = 0
daysElapsed = 0 #in days
currentBlock = startBlock
currentDiff = startDiff
print("Simulation start: \nDifficulty is {}. \nProfit is ${} per day.\nExpected difficulty increase is {}%, with future increases changing by {}%.".format(truncate(currentDiff, 2), truncate(minerRevenue - minerPowerCost, 2), truncate(expectedDiffIncrease, 2), truncate(diffIncreaseDelta, 2)))
while True:
#1 loop = 1 block
if (currentBlock % 2016 == 0):
currentDiff *= (100 + expectedDiffIncrease)/100
minerRevenue *= (100 - expectedDiffIncrease)/100
print("Difficulty is now {} (+{}%). Profit is now ${} per day".format(truncate(currentDiff, 2), truncate(expectedDiffIncrease, 2), truncate(minerRevenue - minerPowerCost, 2)))
expectedDiffIncrease *= (100 + diffIncreaseDelta)/100
if (currentBlock == 420000):
minerRevenue /= 2
print("The block reward has halved. Profit is now ${} per day".format(truncate(minerRevenue - minerPowerCost, 2)))
if (minerRevenue - minerPowerCost <= 0):
print("Miner is no longer profitable. Ending simulation\n")
break
if (currentBlock - startBlock) % int((144*(100+expectedDiffIncrease)/100)//1) == 0: #calculates real time, note that this accounts for less time between blocks when diff spikes
daysElapsed += 1
if currentBlock == 450000:
print("End of simulation reached.\n")
break
if (revenue > minerCost and breakeven == False):
print("BREAK EVEN REACHED ON DAY {}!".format(daysElapsed))
breakeven = True #hell yes
revenue += minerRevenue/24/6 - minerPowerCost/24/6
currentBlock += 1
print("{} days have elapsed.".format(daysElapsed))
print("Your total revenue after hosting costs: {}".format(truncate(revenue,2)))
print("Your net gain/loss: ${}".format(truncate(revenue-minerCost,2)))
Here's the results, guessing an initial 4.0% increase every 2016 blocks. This assumes that the difficulty increase changes by -3% every adjustment.
Simulation start:
Difficulty is 66500000000.00.
Profit is $8.54 per day.
Expected difficulty increase is 4.00%, with future increases changing by -3.00%.
Difficulty is now 69160000000.00 (+4.00%). Profit is now $8.13 per day
Difficulty is now 71843408000.00 (+3.88%). Profit is now $7.75 per day
Difficulty is now 74547306503.50 (+3.76%). Profit is now $7.39 per day
Difficulty is now 77268799058.20 (+3.65%). Profit is now $7.06 per day
Difficulty is now 80005019548.00 (+3.54%). Profit is now $6.75 per day
Difficulty is now 82753140848.50 (+3.43%). Profit is now $6.46 per day
Difficulty is now 85510382834.30 (+3.33%). Profit is now $6.19 per day
Difficulty is now 88274019729.60 (+3.23%). Profit is now $5.94 per day
Difficulty is now 91041386800.50 (+3.13%). Profit is now $5.70 per day
Difficulty is now 93809886395.30 (+3.04%). Profit is now $5.47 per day
Difficulty is now 96576993338.10 (+2.94%). Profit is now $5.26 per day
Difficulty is now 99340259691.70 (+2.86%). Profit is now $5.06 per day
Difficulty is now 102097318904.73 (+2.77%). Profit is now $4.88 per day
Difficulty is now 104845889362.98 (+2.69%). Profit is now $4.70 per day
Difficulty is now 107583777367.73 (+2.61%). Profit is now $4.53 per day
Difficulty is now 110308879565.73 (+2.53%). Profit is now $4.38 per day
Difficulty is now 113019184857.03 (+2.45%). Profit is now $4.23 per day
The block reward has halved. Profit is now $1.28 per day
Difficulty is now 115712775808.78 (+2.38%). Profit is now $1.21 per day
Difficulty is now 118387829603.62 (+2.31%). Profit is now $1.14 per day
Difficulty is now 121042618552.48 (+2.24%). Profit is now $1.08 per day
Difficulty is now 123675510201.35 (+2.17%). Profit is now $1.02 per day
Difficulty is now 126284967062.23 (+2.10%). Profit is now $0.96 per day
BREAK EVEN REACHED ON DAY 307!
Difficulty is now 128869545997.81 (+2.04%). Profit is now $0.91 per day
Difficulty is now 131427897289.49 (+1.98%). Profit is now $0.85 per day
Difficulty is now 133958763417.29 (+1.92%). Profit is now $0.81 per day
Difficulty is now 136460977579.81 (+1.86%). Profit is now $0.76 per day
Difficulty is now 138933461981.43 (+1.81%). Profit is now $0.72 per day
Difficulty is now 141375225912.73 (+1.75%). Profit is now $0.67 per day
Difficulty is now 143785363649.27 (+1.70%). Profit is now $0.63 per day
Difficulty is now 146163052192.63 (+1.65%). Profit is now $0.60 per day
Difficulty is now 148507548876.19 (+1.60%). Profit is now $0.56 per day
Difficulty is now 150818188857.25 (+1.55%). Profit is now $0.52 per day
End of simulation reached.
440 days have elapsed.
Your total revenue after hosting costs: 1641.04
Your net gain/loss: $98.54
My difficulty estimate is not very optimistic, although it's far from a worst case. We could do far better, or we could stand to lose money overall. And remember, this assumes a static BTC price, it could go anywhere.
How do you guys want to do this reward wise? Do you want to build a "company" of sorts, pool all resources and rewards to buy more hardware etc?
Or do you want to split all costs and rewards according to how many miners you "own"?
I want this project to have as little risk of scam as possible. That's why I've proposed multisig to collect funds, and after purchasing the miners never holding funds again. Using Kano's CKPool we can pay out mining revenue directly to multiple recipients.
Essentially, all we're doing is a group buy and group hosting. Simple!