Sunday, March 16, 2014

Things to consider for profitable cryptocurrency mining

There is a looong discussion on Reddit on whether Dogecoin mining is profitable or not. I do not claim I'd had the stamina to read all the way through it, but a theme seems to get repeated ("yes it is" - "no it isn't").

The opinions also vary widely on the usefulness of so called altcoins (meaning anything other than Bitcoin). Surely any coin (I think I'll from now on use "coin" instead of the more tedious "cryptocurrency") that is not accepted widely as payment isn't really useful as a token of exchange, i.e. payment, but both for miners and traders they might prove useful. However, as these coins come and go it's essential to assess if the value of a given coin is expected to stay or increase in the future to prevent losses.

Trading aside (since that's not my cup of tea), once one has established adequate level of trust on a given coin, there are things to consider (after considering the efficiency of your mining hardware):
  • Do you want to take the exchange risk involved in holding on a coin for more than a day? If you do, do you see a given coin increasing in exchange value in the near future?
  • If you're going for low exchange risk and will immediately sell what you mine, does the lower risk factor counter the daily transaction and exchange fees? Also, what coin is the most profitable today regarding difficulty, reward, network hash rate and the target coin/currency?
  • Even if you're willing to take the exchange risk, it's worth checking the profitability based on difficulty, reward and network hash rate.
There are a number of mining profitability calculators around the Net. There are CoinWarz, Dustcoin, CrabCoins and whatnot (please don't get offended if your favourite one is not listed, those are just random ones I ended up to). I got interested in how those calculators actually estimate (as for that it is, estimation, since random events are in play) the profitability - and I think everyone who's using the calculators should be interested as well. CoinWarz does the calculation on the server so I couldn't check their code, but both Dustcoin and CrabCoins reveal their formula in the page source. Both also use pretty much the same formula:

 time [s] x hashrate [H/s] x reward
------------------------------------
         difficulty x A

where A = 0x100010001h at Dustcoin and A = 2^32 at CrabCoins. Since those values are close to being the same, the sites give almost exactly the same results.

At this point I started looking up more calculators. CoinSelect, Where to Mine and Criptovalute seemed to give the same results so I guess they use the same formula, too. And hey, the formula does make sense: The longer the time, the greater your hash rate or the greater the reward, the greater will be the profit - and the greater the difficulty, the smaller will be the profit. What bugs me is that coefficient A as I don't know where it is derived. The actual code at Dustcoin uses two other constants in place of it, but they are likewise as cryptic to me. I'd be glad if someone pointed me to an explanation for the coefficient.

One thing to note about the calculators: Always check if they are using the correct up-to-date data. Difficulty might be off from the current one, as well as exchange rates, and even the reward (but that would mean their data is really stale). It makes sense to check at least two sources that you trust to eliminate the risk of deciding based on incorrect data.

It is very likely that an extremely favourable mining situation will not go on for long, as also other miners will come to mine thus raising the hash rate which in turn will make difficulty rise. So, there will be constant ebb and flow which also means one should automate pool/coin switching based on estimated profit to continuously adapt to the changing situation. There is already software for that, quick googling brought up CryptoSwitcher and I remember having seen others as well. E.g. cgminer has API that allows centralised remote controlling of miners and when you add automatic decision making based on network data, your miners should be always after the largest profits, or at least staying away from the least profitable coins.

It should be quite easy to implement home-brewn mining automation since e.g. CoinWarz offers an API that one could use to directly access their profitability data. The free version allows 25 calls in 24 hours, meaning the situation could be checked once an hour, which should be quite enough when you're not doing this too seriously. The lack of real-time network data can be compensated by steering away from the most volatile coins. There will still be the risk of sudden large exchange rate changes, but those should be rare enough to keep the risk relatively small.

Finally, for those who want it to be extremely easy, there are mining pools that automatically do the switching for you. If you trust their algorithm does a good work, one of those is the easiest way to get the benefits of coin switching.
submit to reddit Delicious

No comments:

Post a Comment