Pages

Thursday, 1 November 2012

9.1 ASIC choices


0. Introduction.
You're a bitcoin miner. ASICs will be here soon and GPU mining will in most cases be no longer cost effective. Many miners want these new devices, but few of them have been able to devise a method of determining which will be best for them. I hope this post answers those questions for you.

So, you want to buy an ASIC device but you're not sure which one will still mine profitably as difficulty increases, and you want to make sure you at the very least are able to earn sufficient coin to pay for the electricity use and the ASIC. How can you go about determining which ASIC device will be best for you?

This is a much more interesting and difficult question than it might appear at first glance. I have seen a few analyses on the bitcointalk.org forums but all of them require a reader to accept certain assumptions. Can this question be answered  in a way that avoids making any assumptions, or in a way that presents results for a range of assumptions? The answer to both questions is "yes".

In this post I am only commenting on the profitability of ASICs, and which ASIC might be more profitable in a given exchange rate / electricity cost / Difficulty environment. Although I have not addressed such here, other important factors such as the reliability of an ASIC device and expected downtime should not be ignored when deciding on an ASIC to purchase. I hope this post helps you determine which ASIC you should purchase, and although I've included lots of pretty charts I hope you will be able use the information I've provided so you can assess the profitability of ASICs in your environment, and with your own assumptions (which may be more valid than mine).


1. How are earnings calculated?
The expected per second btc earnings of a bitcoin device are approximated very closely as:

btc earnings per second = B / D * hashrate * 1e09 / 2^32

where
B = the bitcoin mining block reward
D = the bitcoin mining difficulty
hashrate = your device's hashrate in Ghps.

for example, if B = 50, D = 3304356 and your device hashrate is 5 Ghps, then you should expect to earn:

50 / 3304356 * 5 * 1e09 / 2^32 = 0.0000176 btc/sec.

The per second electricity cost of a device in local currency is:

fiat electricity cost per second = (device wattage + computer wattage) * cost per kWh / 1e03 / 3600

where
device watts = electricity consumption of the ASIC device in watts
computer watts =  electricity consumption of the attached computer in watts
cost per kWh = electricity cost per kilowatt hour in local currency.

For example, if the device wattage is 60 W, the computer wattage is 100 W and the cost per kWh is USD$0.15, then the cost per second to mine is:

(60 + 100) * 0.15 / 1e03/ 3600 = USD$6.67e-06 per second.

Note that this assumes the computer has a low end and energy efficient CPU, no power consuming peripherals apart from the ASIC and performs no other task than managing the ASIC.

Finally, the net earnings per second (not including the cost of the ASIC) is given by:

(btc earnings per second * exchange rate - fiat electricity cost per second)

=  B / D * hashrate * 1e09 / 2^32 * exchange rate -  (device watts + computer watts) * cost per kWh / 1e03 / 3600

For example, if B= 25, D = 5000000, hashrate = 60 Ghps, device watts = 120, computer watts = 100, and cost per kWh = USD$0.3, and the exchange rate is USD$12 / BTC then the expected net earnings per second are:

expected net earnings per second = $6.984919e-05 / sec  -  $1.833333e-05 / sec = $5.151586e-05 / sec

This is quite profitable - electricity costs only take 26% of the expected per second earnings. However, if the mining difficulty is much higher, a device may become unprofitable very quickly. Repeating the example above for a difficulty of 50 million:

expected net earnings per second = $6.98e-06 / sec  -  $1.83e-05 / sec = -$1.13e-05/ sec

In this case it is costing you to mine so your mining activity is unprofitable.

The difficulties for which a device will be profitable can also be calculated. If fiat net earnings per second > 0, then your ASIC device will be profitable when:

btc earnings per second * exchange rate -  electricity cost > 0

B / D * hashrate * 1e09 / 2^32 * exchange rate >  (device watts + computer watts) * cost per kWh / 1e03 / 3600

D < B  * hashrate * 1e09 / 2^32 * exchange rate / ((device watts + computer watts) * cost per kWh / 1e03 / 3600 )

In other words ASIC device will be profitable only if the bitcoin mining difficulty is less than the bitcoin reward x hashrate x 1e09 / 2^32 / electricity cost.

The chart below shows the profitable mining limit for four ASIC devices for which I was able to obtain hashrate and power consumption estimates. It can be used to find the maximum difficulty at which an ASIC device can profitably mine. For example, at an electricity cost of USD$0.20 per kWh and an exchange rate of USD$20 / btc, the BFL Single SC plus a 100 W computer will be still profitable at a difficulty of 750 million, but not at a difficulty of 1 billion.



2. How long will an ASIC device be profitable?
You might that knowing that the BFL Single SC in the example above is profitable at D = 4 billion is not very useful in planning which ASIC device to buy. However, by accepting some additional assumptions  the maximum number of years a device will be profitable can be determined.

The difficulty at which you will be mining at some point in the future can be estimated if you assume an average percentage increase in D per difficulty period. Since the start of this year, that average increase in D has been approximately 5% per difficulty period. If you start mining at an arbitrary D and assume that D increases by 5% per difficulty period, then all following D are a function of time:

D[n] = D[1]*pc^n
where
D[1] = initial D when starting mining
D[n] = D for the nth difficulty period after starting mining
n      = number of difficulty periods since starting mining 
pc     = percentage increase in D per difficulty period

So the number of difficulty periods since the start of mining will be:
n       = ln( D[n] / D[1] ) / ln( pc ))

In terms of years since starting mining rather than difficulty periods, this becomes:

years = ln( D[n] / D[1] ) / ln( pc ) / (26 * pc )

ln(D[n]) < ln(B  * hashrate * 1e09 / 2^32 * exchange rate / ((device watts + computer watts) * cost per kWh / 1e03 / 3600 ))

Finally, years of profitable mining is:

years = ln(B  * hashrate * 1e09 / 2^32 * exchange rate / ((device watts + computer watts) * cost per kWh / 1e03 / 3600 )/ D[1]) / ln( pc ) / (26*pc)

The chart below shows a comparison between the four devices listed (an additional 100 W added for the attached computer). The chart facets are groups according to assumed D when mining on the device started and the electricity cost. Pick a column closest to your local electricity cost, a row closest you the D at which you think you'll be mining, then if you agree that the average percentage increase in D per difficulty period is 5% you can determine for how long the devices are likely to be profitable.

If your environment or assumptions are not covered in the plot, you should be able to use the equation above to generate your own figures, even with Excel.




3. How long will it take an ASIC device to pay for itself?
This is the most important question for most miners. There's no point in mining profitably if your net profit is still negative due to your initial capital outlay. If we use a day's mining as the basis for the time estimate, then we can estimate the number of days until the device pays for itself, and conversely the expected net profit in a given period of time. 

net profit = net earnings per day * days since mining started - fiat purchase cost of device

 = (btc earnings per day * exchange rate - fiat electricity cost per day) * days since mining started - fiat purchase cost of device

 = (B / D * hashrate * 1e09 / 2^32 * exchange rate -  (device watts + computer watts) * cost per kWh / 1e03 / 3600) * 86400 * days - price

days = (net profit + price ) / ((B / D * hashrate * 1e09 / 2^32 * exchange rate -  (device watts + computer watts) * cost per kWh / 1e03 / 3600) * 86400)

where 
days = days since mining started
price = fiat purchase cost of device
D =  D[1]*pc^(floor(14/n))

The first chart below shows the number of days until the break even point (i.e. the device has paid for itself) for the devices for which I have price estimates, and the second shows the expected earnings for the first year. I have added a computer power usage of 100 W and assumed the increase in D to be an average of 5% per difficulty period.



4. Conclusions and discussion

Assumptions:
1. The average increase in D is 5% per difficulty period
2. The power usage of the attached computer is 100 W
3. All hashrate and power usage estimates provided by the manufacturer are correct 

If my assumption that the average increase in D is 5% per difficulty period, then regardless of your differing mining environment it is plain that of the devices assessed the BFL SC Single will always be more profitable to run than any other miner and will have a longer profitable life time. It will also net more in the first year than the Avalon or the bASIC, and will usually pay for itself sooner than the other devices, depending on the local mining environment.

If electricity is cheap or free and you don't think you'll start mining after D = 30 million, then the bASIC will pay for itself almost as quickly or slightly faster than the BFL SC Single, but won't net you as much in the first year. For a low starting difficulty and low electricity costs, the Avalon will net close to the BFL SC Single, but will take longer to pay for itself.

 I do not work for BFL  and this should not be taken as a promotion of the BFL SC Single. There are many variables I cannot address (such as device reliability, accuracy of power usage and hashrate estimates, price cuts, electricity cost increases), however based purely on the manufacturers' device specifications the BFL SC Single is the overall winner. 

I encourage you to repeat these calculations for your own mining environment and post the results on the bitcointalk.org forum. I will post updates as new devices become available or changes in manufacturer specifications are published.


Donations help give me the time to investigate pools and write these posts. If you enjoy or find them helpful, please consider a small bitcoin donation:
12QxPHEuxDrs7mCyGSx1iVSozTwtquDB3r





2 comments:

  1. The conclusions are interesting but misleading, I think.
    Especially the days to break even going to infinity.

    Why?
    The main error is the assumption of 5% grow of D per difficulty period during a whole year - it won't increase geometrically but arithmetically.

    Another one (quite lesser) is the power usage of the attached computer - people will use laptops or similar (my Mac Mini uses 20W, many want to use a Raspberry Pi) or/and use more mining devices per a computer.

    ReplyDelete
  2. Thanks for the feedback - but I will have to politely but firmly disagree with you on all counts.

    1. "Days to break even" must head toward infinity as the exchange rate approaches US$0 / btc. How could it be otherwise? If your bitcoin is worth US$0 then you can never break even.

    2. Mining Difficulty has been increasing at an average of 4.6% per difficulty period since the start of the year. This won't always be the case, but historically once bitcoin became popular mining Difficulty has increased geometrically. If the much overused Moore Law holds for bitcoin mining, then we can expect D to geometrically - apart from any changes to D driven by the exchange rate ( see post 10.1 and 10.2 ).

    3. I had to assume some power usage here. Not everyone will use a Raspberry Pi, and not everyone will use some power hungry gaming machine. I used 100 watts because it appeared to me to be a median value. I could be wrong, however. If I am and 100W is not close to the median power use of computers, let me know.

    ReplyDelete

Comments are switched off until the current spam storm ends.