Pages:
Author

Topic: Finally, a correct (endgame) difficulty calculator (Read 12398 times)

hero member
Activity: 1014
Merit: 1055
Forget all these history based linear/exponential extrapolations. Now you can actually calculate where bitcoin difficulty is headed.

To be able to calculate that, you need two simple assumptions:
- overall miners are rational and will only keep buying hardware until they reach the point of marginal profitability within a given period (investment horizon).
- Likewise, ASIC vendors will keep producing and selling chips as long as  its profitable, ie, as long as miners are wiling to pay a price above their marginal costs.

To be able to calculate the point where these two cross over, you need to have an idea what the chips cost to produce (and a minimum operational profit margin), and a clear view of costs of the miner.

Fill out your own assumptions by downloading this spreadsheet:
https://docs.google.com/spreadsheet/ccc?key=0ApaVTTCEb_oudGFsUnNuQUVNUGc2Z3VUVmF3ZVBuV2c&usp=sharing

Here are mine, using Hashfasts published numbers:


Feel free to add the cost of casing/PSU/shipping/handling etc in the "per chip" field, Im assuming in the long run these things will be sold bare bones without fancy enclosures and the costs of PCB is negligible and miners already have PSUs or wont factor in that cost given they have decent resale value. Feel free to alter those assumptions.

Also note the investment horizon should NOT be compared to today, when difficulty is growing explosively. This spreadsheet calculates the "end game" where difficulty remains fiarly stable, or at least is only really influenced by BTC exchange rate and perhaps mining fees. In such environment, an investment horizon of a few years is entirely reasonable.

Finally, I did make a shortcut in the formula to calculate the cost of these chips. To accurately calculate that based on die size and wafer size, you need a special tool:
http://www.silicon-edge.co.uk/j/index.php?option=com_content&view=article&id=68

My formula uses the correct numbers for hashfasts chip size (177 candidates for a 18mmx18mm chip), but I simply extrapolate linearly for bigger or smaller chips. IN reality smaller chips will generally yield a number of chip candidates per wafers thats slightly more than proportionally to its size (up to a point), and larger chips will yield less than proportional. If you want more exact numbers, just use that calculator and redo the cost per die math yourself, but all the other assumptions are likely a much bigger variable.

In a chart:



edit: corrected yield calculations and per chip costs.

PCB, Power, Housing, etc missing to make a good speculation. A good point anyway. nice one.
full member
Activity: 209
Merit: 100
A few things;
First of all, bitcoin mining would be perfectly suitable to switch dynamically from one location to another, far easier than any other form of data processing. You are probably thinking it cant because the hardware is so expensive, but thats only temporarily. IN the long run, electricity cost will be far more important than the hardware cost.

Secondly, varying electricity costs over time for a google/facebook/ebay datacenter is something else than for bitcoin. Those companies look at 10+ years to select a location for a major DC, miners currently have an horizon of a few months and I figure, in the future of at most a few years.

Lastly; at least in Iceland they guarantee you the price for up to 20 years.
http://www.greendataisland.com/whyiceland.html

Anyway, the main point is that at current exchange rates, electricity price of all mining really isnt going to make a difference.  So what if you max out a local small hydroelectric plant causing local prices to go up (which would be unlikely already), you will just put your miners somewhere else, or if you dont, someone else will. This is about as "profound" as one particular collocation provider running out of rackspace and therefore increasing its prices. So what?


(1) I agree that electricity cost will be far more important, but that does not mean that the hardware cost will be trivial.  And that hardware has to get to the cheap electricity somehow.  That means that there are transportation costs, fuel costs, costs to lease space, costs to move personnel, and that's just a few off the top of my head.  To the extent that hardware moves to cheap electricity, there will still be a cost to move that hardware away.  And this cuts both ways - if the transfer costs are low, that just means that more hardware will move to low cost areas, further driving up demand and thus price.  The real question is the supply of cheap electricity - Bitcoin mining may not have enough of an impact to increase the price of electricity in most areas where price is higher, but, if concentrated, it may impact the price in areas where the price is lower.  

(2) That may be true, but aren't you doing a longer term analysis?

(3)  That's interesting - I did not know that about Iceland - how much electricity will they guarantee for low rates at 20 years?  Are there any restrictions?  

Again, my only point is that, to the extent that bitcoin mining increases to the point where ASICs are a commodity, it is unlikely to benefit from significantly below market electricity prices.  I may very well be wrong - maybe there's a bunch of places with stable internet connections and 1.21 gigawatts of continuous electricity available at $0.02 per kwh.  If that's the case, I'm wrong, I just haven't seen that yet.
hero member
Activity: 770
Merit: 509
A few things;
First of all, bitcoin mining would be perfectly suitable to switch dynamically from one location to another, far easier than any other form of data processing. You are probably thinking it cant because the hardware is so expensive, but thats only temporarily. IN the long run, electricity cost will be far more important than the hardware cost.

Secondly, varying electricity costs over time for a google/facebook/ebay datacenter is something else than for bitcoin. Those companies look at 10+ years to select a location for a major DC, miners currently have an horizon of a few months and I figure, in the future of at most a few years.

Lastly; at least in Iceland they guarantee you the price for up to 20 years.
http://www.greendataisland.com/whyiceland.html

Anyway, the main point is that at current exchange rates, electricity price of all mining really isnt going to make a difference.  So what if you max out a local small hydroelectric plant causing local prices to go up (which would be unlikely already), you will just put your miners somewhere else, or if you dont, someone else will. This is about as "profound" as one particular collocation provider running out of rackspace and therefore increasing its prices. So what?


Electricity price will make a difference. People taking advantage of energy arbitrage will squeeze all the profit out of mining they can.

I think your equation is pretty accurate but the unpredictable variables like future hardware efficiency, btc exchange rate and large scale mining ops make predicting the end difficulty nearly impossible.
legendary
Activity: 980
Merit: 1040
A few things;
First of all, bitcoin mining would be perfectly suitable to switch dynamically from one location to another, far easier than any other form of data processing. You are probably thinking it cant because the hardware is so expensive, but thats only temporarily. IN the long run, electricity cost will be far more important than the hardware cost.

Secondly, varying electricity costs over time for a google/facebook/ebay datacenter is something else than for bitcoin. Those companies look at 10+ years to select a location for a major DC, miners currently have an horizon of a few months and I figure, in the future of at most a few years.

Lastly; at least in Iceland they guarantee you the price for up to 20 years.
http://www.greendataisland.com/whyiceland.html

Anyway, the main point is that at current exchange rates, electricity price of all mining really isnt going to make a difference.  So what if you max out a local small hydroelectric plant causing local prices to go up (which would be unlikely already), you will just put your miners somewhere else, or if you dont, someone else will. This is about as "profound" as one particular collocation provider running out of rackspace and therefore increasing its prices. So what?
full member
Activity: 209
Merit: 100

Makes sense for the materials, but would there be an impact on electricity prices, particularly if ASICs were centralized in a low-rate area?

Sounds far fetched. Most of those cheap electricity area's have cheap electricity because there is an abundance of eg hydroelectric power. There are enough of such regions that I cant see bitcoin mining making a difference there, not at todays exchange rate anyway. You speak of dozens of MW, but the larger hydroelectric installations have a capacity in the thousands of MW (and are often under utilized). The entire world uses 20000TWh per year, just how much difference can you imagine bitcoin mining will make?


I don't think bitcoin mining will make any difference in worldwide energy usage - you're right it is too small.  I am talking just about localized usage in areas where rates are low - I do think dozens of MW can make a difference in price in local areas where price is low and supply is in the thousands.  For one, the energy usage for bitcoin mining is continuous - once you have a 15 MW datacenter in place, it will draw 15 MW 24/7/365, or as close to it as possible, by design. 

Data centers in the US of comparable size already struggle with varying power costs, enough that researchers are proposing algorithms that would allow data companies to shift server load to data centers where the price is low at the moment.  (http://www2.ece.ohio-state.edu/~xwang/papers/icpp12_datacenter.pdf)  Bitcoin mining does not have that option - it has to run constantly.  It's not hard to find articles discussing concern on an increase in energy prices in areas where companies propose to build data centers that would utilize dozens of MW. 

My point is only that while Bitcoin miners can locate themselves where power costs are lower than average, they cannot necessarily count on power use that is dramatically lower than average, at least not on a large scale. 
legendary
Activity: 980
Merit: 1040

Makes sense for the materials, but would there be an impact on electricity prices, particularly if ASICs were centralized in a low-rate area?

Sounds far fetched. Most of those cheap electricity area's have cheap electricity because there is an abundance of eg hydroelectric power. There are enough of such regions that I cant see bitcoin mining making a difference there, not at todays exchange rate anyway. You speak of dozens of MW, but the larger hydroelectric installations have a capacity in the thousands of MW (and are often under utilized). The entire world uses 20000TWh per year, just how much difference can you imagine bitcoin mining will make?
hero member
Activity: 770
Merit: 509
BTW, googling for electricity prices, wikipedia shows rates in russia can be as low as 2.4 cents per KWH. That gives this result:



In kuwait its only 1 cent, that would allow the network to reach 1 exahash (1000 PH) if you can solve the cooling problem Smiley
Free electricity would bottom out around 1.7 EH.




Don't forget about chip improvements. AM supposedly will release a 0.2w/gh 40nm chip so I would assume 0.1w/gh is possible with some fine tuning of a 20/28nm chip.

Also with immersion-cooling you can have very high densities and combined with cheap electricity+energy arbitrage means very low running costs.

I would guess we hit the point where we are finally limited by electricity costs at 5000ph. This also assumes the btc exchange rate stays constant.
legendary
Activity: 980
Merit: 1040
Very good question as the gross margins TSMC and Global Foundries charge for Hashfast type volumes are closer to 70%. An 85% yield on a device of this size at this point on the learning curve is totally unrealistic - more like 60%. Taking these two together, the price per die should be closer to
$100, with testing and packaging on top of that.

It's not likely to change much in the near future unless huge volumes (Qualcomm scale) of wafers are ordered

What do TSMC magins have to do with anything? The cost Im projecting is the processed wafer cost for the fab customer.  Feel free to disbelieve my estimates, but as yet another public reference:

http://www.soiconsortium.org/pdf/Economic_Impact_of_the_Technology_Choices_at_28nm_20nm.pdf

For a 100mm² chip, die cost is estimated to be around $7 and that includes a *very* low yield estimate (probably because the document is a few years old, 28nm has matured tremendously since). Moreover bitcoin asics are so simple and so redundant that yields will be far higher, probably close to 95% after harvesting chips with a few bad cores.

full member
Activity: 161
Merit: 100
Where did you get your numbers for 36$ per 28nm ASIC Manufacturing Costs?

I'd expect that to be behind several NDAs..


Very good question as the gross margins TSMC and Global Foundries charge for Hashfast type volumes are closer to 70%. An 85% yield on a device of this size at this point on the learning curve is totally unrealistic - more like 60%. Taking these two together, the price per die should be closer to
$100, with testing and packaging on top of that.

It's not likely to change much in the near future unless huge volumes (Qualcomm scale) of wafers are ordered
full member
Activity: 209
Merit: 100
At some point would the number of ASICs produced increase the price of their raw materials, silicon, PCB, power supplies, as well as the price of electricity?  Or is supply of these things so great that the increase in demand won't materially change the prices of those components?  

For some perspective, the industry ships 10 billion ARM based chips per year. Yes billion with a B. While those are much smaller, far lower power etc, they still use the same fabs, still need PCBs, need to be packaged etc, so no, bitcoin asics will never be so high volume as to cause systemic shortages anywhere.

The only place I can imagine were you might see temporary shortages is (water) cooling and highend PSU's, but those vendors should have no real problem ramping up production given a bit of time. After all, the PC industry ships a million PC's per day, so the supply chain and infrastructure is in place (and increasingly running idle as PC shipments dwindle).

Makes sense for the materials, but would there be an impact on electricity prices, particularly if ASICs were centralized in a low-rate area? Particularly in the case of places like Kuwait, where someone pointed out that electricity rates are extremely low ... in many of these areas they are low because the region is energy-rich and the government subsidizes the cost of electricity.  I doubt those same governments would subsidize a massive, for-profit ASIC farm.  They can run the farm themselves, but then their cost of electricity is what they could otherwise sell that electricity for, not the cost minus the subsidy.  In other areas, prices may be low due to weak demand.  What would adding 15 MWh (roughly the cost for 10 PH/s, right?) do to the electricity market in some of the low cost areas in Russia, for example (where prices vary greatly, I understand).

I may be off in my calculation, or the amount of electricity is similarly small compared to the size of the overall market.  Otherwise, it is best to use a rate of electricity where there would be no marginal impact on price by adding the additional power consumption - I don't know what that rate is, though I would guess it is closer to the rates seen in the US and Europe than other places.
legendary
Activity: 980
Merit: 1040
At some point would the number of ASICs produced increase the price of their raw materials, silicon, PCB, power supplies, as well as the price of electricity?  Or is supply of these things so great that the increase in demand won't materially change the prices of those components? 

For some perspective, the industry ships 10 billion ARM based chips per year. Yes billion with a B. While those are much smaller, far lower power etc, they still use the same fabs, still need PCBs, need to be packaged etc, so no, bitcoin asics will never be so high volume as to cause systemic shortages anywhere.

The only place I can imagine were you might see temporary shortages is (water) cooling and highend PSU's, but those vendors should have no real problem ramping up production given a bit of time. After all, the PC industry ships a million PC's per day, so the supply chain and infrastructure is in place (and increasingly running idle as PC shipments dwindle).
full member
Activity: 209
Merit: 100
Where did you get your numbers for 36$ per 28nm ASIC Manufacturing Costs?

I'd expect that to be behind several NDAs..

The silicon cost is calculated based on the price per wafer and number of candidates per wafer.  Its not like TSMC or GF have pricelists on their website, but there is plenty of industry analysis literature out there that gives an idea. Im using $4000 per processed 300mm 28nm wafer, which is last years average price. I dont have a public source for you for that, but this may show the ballpark is at least correct:
http://www.xbitlabs.com/news/other/display/20110912192619_TSMC_Reportedly_Hikes_Pricing_on_28nm_Wafers_Due_to_Increased_Demand.html
Note the articel is from 2011.

Prices may have come down further since 2012, and I strongly suspect bitcon asics use less layers than the average (making them cheaper), but otoh $4000 is a volume price that may be out of reach of bitcoin asic vendors today. Since this is an endgame calculator, that doesnt matter much. To get to the above numbers, bitcoin asics would have to become fairly big volume anyway.

As for the other costs, chip packaging is typically calculated per ball, with $0.003 per ball being a good rule of thumb. That works out to ~$3 per chip. The additional $4 per chip I used for testing and handling is probably way too much.

At some point would the number of ASICs produced increase the price of their raw materials, silicon, PCB, power supplies, as well as the price of electricity?  Or is supply of these things so great that the increase in demand won't materially change the prices of those components? 
full member
Activity: 154
Merit: 100
nice one  Grin
hero member
Activity: 750
Merit: 601
In winter miners make good heaters, so can run much less profitable if you also take into account reduced heating bills. As energy is so expensive in the UK, and it can get quite cold, the benefits are greater than a country where electricity is cheap and the climate is hot.
newbie
Activity: 3
Merit: 0
Brilliient analysis.  Puts a framework around conclusions I came to a few weeks ago and I totally agree except maybe with the assumption that miners will be completely rational. 

Another analysis I recently read projected the possibility that, depending on power efficiently, miners might shutdown in "efficiency blocks" reducing hash rate and thus leaving only the most power efficient to continue mining but at a substantiately reduced network rate.  This could cause a reduction in difficulty if no profits exist for chip manufacturers to continue to pour hash rate into the network.  At that point, less efficient equipment might become productive again so it will be turned on. I guess that could lead to a permanently oscillilating difficulty.  However, as everyone always knew, power efficiency (and cost) rule.  10 nm structures, coming?  Quantum computers? 
member
Activity: 86
Merit: 10
I dont think you understand what Im trying to calculate here?
 IM trying to figure out the hashrate where mining costs and income are in balance (for a given BTC exchange rate and for the current block reward). Thats just a number that depends on a lot of variables, but mostly electricity cost, energy efficiency, and to some extend, investment horizon, hardware production costs. There is no timeline on when we will approach this, there is no historical data to check against.

This has already happened at least once previously, when difficulty levelled out for a year or so until the exchange rate increased. Does your calculator indicate that would have happened?

What happened in 2012 was different. We mined with GPU's and gpu pricing is not dependent on bitcoin profitability. AMD (and nVidia) price their products for gamers mostly. They didnt charge huge premiums when GPU mining was highly profitable, and when bitcoin mining stopped being profitable, it didnt cause AMD to lower its prices. ASICs pricing will behave very different since they serve no other market besides mining.

Still, lets see what we get. Lets take January 2012
BTC exchange rate ~$5

Assuming most people were doing GPU mining. Lets take a 5870 @350Mh @200W at the wall.
Lets say it costed $250.

If I plug those numbers in I get a network speed of 5000 GH. edit: I forgot block reward was double back then. So Id get 1000GH.
 In reality it was ~8000 GH.
If you take in to account FPGA mining, and given the range of possible outcomes of my current spreadsheet, thats close enough in my book.


All in, new equipment, psu, cpu, ram, cards, fans, and power distribution 1 gigahash cost ~$1,000. You could do cheaper with used cards but not in bulk.

legendary
Activity: 1204
Merit: 1000
I think your calculations should include ancillary pcb, power, and cooling costs as even if these items aren't sold as a package miners still have to buy them and will calculate the costs into the equation.  At some point I'm sure the extra stuff will cost more then the ASIC chips. 
As a rule of thumb, a system with ICs in it costs about 4x the price of the ICs alone. (The multiplier is less for very high volume items, more for low-volume items.) Cooling cost varies with climate and cooling system, but multiplying electricity cost by 1.5 to 3 is reasonable. You also have to account for cost of capital, floor space, and staffing if you're operating beyond the back bedroom level.

That's how you price it out as a business.  What does it look like with reasonable business-type cost assumptions?
legendary
Activity: 980
Merit: 1040
Overall or average rates per country dont really matter.  In the US price differences are also really big between different states or area's, but mining will just move to where its cheaper.  Once you get close to marginal profitability,  miners with higher rates will just shut down or sell their gear. Whatever latitude that leaves for cheaper electricity miners will be filled either by them buying used gear or deploying new gear. And yeah, that might lead to centralization.
hero member
Activity: 826
Merit: 501
in defi we trust
Another question - in your example you've used average miner electricity costs at 0.12c per kWh. Do you still think this is a reasonable estimate? I suppose you assume that miners will move rigs to the lowest cost areas - overseas if necessary?

THere is a reason I put that variable on an axis of the chart Smiley. In the long run, yes I assume mining will migrate to where electricity is cheaper.
The cheapest rates I found are in Kuwait at an astounding $0.01 per KwH. Not sure if anyone will want to invest in a huge bitcoin mine located there, but for sure it will move to Russia, China, certain US states where prices are lowest.

You've quoted that 2.5 cents price from Wikipedia in Russia but be aware that is the cost per kw for a certain plan in a certain time frame (23-07).
Overall cost are much higher.
legendary
Activity: 980
Merit: 1040
Another question - in your example you've used average miner electricity costs at 0.12c per kWh. Do you still think this is a reasonable estimate? I suppose you assume that miners will move rigs to the lowest cost areas - overseas if necessary?

THere is a reason I put that variable on an axis of the chart Smiley. In the long run, yes I assume mining will migrate to where electricity is cheaper.
The cheapest rates I found are in Kuwait at an astounding $0.01 per KwH. Not sure if anyone will want to invest in a huge bitcoin mine located there, but for sure it will move to Russia, China, certain US states where prices are lowest.
Pages:
Jump to: