As an Amazon Associate I earn money from qualifying purchases.

Thursday, December 19, 2013

Alternative Cryptocurrencies: What to Mine?

After branching out into testing Hashco.ws and doing some Frozen mining, I started to realize that there's a huge amount of potential to make more money simply by mining some of the lesser known coins. New coins in particular can be quite profitable -- in the first couple of days of mining FZ, I managed to get something like 10K FZ. I traded that for roughly 6 LTC at the time, but today that same 10K could fetch probably 30 LTC. Even with the recent price drop, that would be a rather staggering $540 in two days. What's more, that was from mining with eight CPUs -- CPUs that were otherwise sitting idle on my GPU mining rigs!

Frozen is somewhat unique (or at least rare) in that it uses the Quark algorithm for proof of work, and Quark is more resistant to GPU mining as I've already mentioned. However, there are other altcoins where you can still generate a decent return without using your highest power GPUs. Most of these coins are newer or not traded as heavily, so you'll want to be cautious and not put all your eggs in one basket (at least not all the time). Personally, I am trading most of my altcoins for BTC right now, but with patience I could probably get far more by holding and waiting for a higher price. YMMV.

So which altcoins are the most profitable right now? The "created as a joke" DOGE (Doggy) is actually pretty common, but we'll have to see where that goes in the coming weeks. I wouldn't hold onto too much DOGE as all value could evaporate...but then again, never underestimate the power of humor! Hashco.ws and Multipool are both doing a fair amount of DOGE mining, for example. But if you want to go out a bit further on the fringe, take a look at Coinchoose.com. Here's a couple screenshots of the current average profitability relative to BTC and LTC:


What you can see in those charts is that quite a few coins are potentially outperforming LTC and BTC mining, sometimes by a substantial amount. If you go after one of the coins with a really low network hash rate, the risks -- and rewards -- can be even greater. But how do you go about mining these alternative coins?

Assuming you don't want to use a multicoin pool, you will either need to find a pool where your mined coins will be held, or set up your own wallet for each currency and then configure your miner(s) and pool(s) to send coins to the appropriate address. So let's just take the current top coin as an example, Diamond. Note that I have not mined any Diamond to date, so this will be a test run for me as well.

First, let's go find some information on Diamond. I searched for "Diamond Coin" and found this thread at Bitcointalk, announcing the coin, and later in that thread we find that Diamond has recently been revitalized. It looks like Diamond was launched back in July 2013. It has a steady state of generation of 1 block every minute, with each block being worth one Diamond (coin). So far so good. It also adds some other features to potentially secure the coin against a 51% attack, like Proof of Stake along with Proof of Work -- I won't get into that here. Diamond is scheduled to run for eight years at 1 block (and 1 coin) per minute, with bonus blocks randomly given out each day, yielding a total of 4,380,000 coins total (give or take). The current exchange rate can be found on Cryptsy: 0.0037 BTC per DMD. Network difficulty on the other hand is reportedly very low at only 1.27MHash/s, but perhaps that's not showing up correctly. Everything looks reasonable, so let's try mining some Diamonds.

First, decide if you want your own Diamond wallet (e.g. for long-term storage). If not, you can skip steps 1-4 and go straight to step 5.
  1. Download the Diamond client/wallet.
  2. Run the diamond-qt.exe (for Windows) client once and then close it; it creates a default directory (C:\Users\[UserName]\AppData\Roaming\Diamond) for you, though you could create that on your own if you prefer.
  3. Create a diamond.conf file in the above directory. There's an example given at the official site, but below is what I've put in my diamond.conf file.
  4. Run diamond-qt.exe again, and now it should begin syncing with the network. This may take some time as there are roughly 200,000 existing blocks to download. You don't need to finish syncing before you can begin mining, but you do need to be synced up to send/receive any DMD.
  5. Mining is pretty simple, as this is yet another scrypt-based coin, so you can mine with the usual cgminer, bfgminer, cudaminer, etc. But first we need a pool to mine with (unless you want to go solo).
  6. I created an account at this pool, since it looks active at around 12MHash/s (so the network hash rate is much higher than what Coinchoose is reporting). After verifying your account via an email link, create a worker in the usual way.
  7. Using your normal cgminer settings (or whatever miner you run), point it at the pool stratum and start mining. For a Radeon HD 6970, here's what I run:
cgminer.exe --scrypt --auto-fan --failover-only -I 20 --thread-concurrency 8000 --gpu-engine 925 --gpu-fan 50-100 --gpu-memclock 1400 --gpu-powertune 25 --gpu-vddc 1.1 --temp-cutoff 99 --temp-overheat 95 --temp-target 85 -o stratum+tcp://dmdpool.digsys.bg:3333 -u trogdorjw73.tester -p tester
With the miner up and running, you should start to see shares periodically. Based on the pool's information, it looks like the rate of return is around 0.08 BTC per 1MHash/s. At a current price of $650-$700, that works out to $52-$56 per day per MHash (1000KHash). If you were mining LTC instead, you'd be earning about 0.3 LTC per day, for around $6 per day.

So here's the question: do you actually get that much DMD (or other altcoin) into BTC? I'll start one system mining as a test and report back later....

Wednesday, December 18, 2013

The China Crash, Altcoins, Playing the Long Game

Not surprisingly, the currently high BTC and LTC prices simply aren't able to be sustained, especially in light of all the speculation by Chinese investors who have now been told that Bitcoin is basically persona non grata. This has been a relatively large bubble from the $150 range up to around a $1200 high, and now we're back in the $550 range and potentially still have a bit more to fall before we bottom out and start rising again. We've seen it before, and we'll see it again -- and we'll see it with pretty much every popular Altcoin worth mining! While BTC had about an 800% increase from mid to late November, Litecoin was actually even more impressive, going from less than $4 to a high of nearly $50 -- around a 1200% gain. I suspect Litecoin is going to see single digits again very shortly, but if you can, keep your coins and just wait for the next bubble, because it's inevitable.

The reason for China and other countries fearing Bitcoin and these other digital currencies is simple: it makes it too easy to move money out of the country! Oh, you can already do that in a variety of ways, but with Bitcoin/Litecoin/etc. it's trivial -- assuming you can buy the coins in the first place, of course. That's probably a large part of what has sparked this latest tumble, with China making it more difficult to buy BTC and investors getting spooked, but that's just it: governments may not like these digital currencies because they can't fully control them, but long-term this is the future.

Related to this is a comment someone made to me recently when discussing Frozen Coin (FZ). He said in effect, "Well, it's not like all of these digital currencies can survive -- most will fail." I disagree, because just like the distributed computing nature of Bitcoin makes it powerful and useful, the altcoins are just another way of distributing things. Bitcoin is the biggest name by far -- I heard a statistic that something like 45% of Americans have heard of Bitcoin -- and so it's going to be the biggest target for the governments. Heck, maybe they even succeed in shutting BTC down in some way. But if BTC fails, there are dozens of others, and some of these are working to make them even more difficult to kill off (e.g. Peercoin, PPC).

Consider this: governments and corporations have been trying to kill off illegal file sharing for years now. Eventually, they more or less realized that it's a fruitless endeavor and what they really needed was to embrace new technologies. And so iTunes went from heavy DRM music to basically go-anywhere music, Blu-rays now come with free digital copies and even a DVD, etc. And guess what? Not only did they not kill piracy, but piracy didn't kill them either -- arguably the movie industry is as healthy as ever! DRM isn't totally dead, but after all the hand-wringing and fear-mongering ("Please, somebody think of the children!"), technology marches ahead.

Bitcoin, Litecoin, and the other various cryptocurrencies are all marching ahead, some more quickly than others. While some governments are sitting back and just watching Bitcoin happen and China is actively trying to fight against Bitcoin, still others are talking about Bitcoin in a positive way. Big names in the US are discussing Bitcoin, and millions of dollars has been invested, with billions more waiting to come.

So if you bought BTC at $1000 or Litecoin at $40 and are feeling like a fool, just sit back, relax, and go find something else to do for a while. Sit on those coins and check back in five or ten years and you'll be able to laugh with others when you tell how you bought them at $1000 or $40 or whatever and thought you screwed up. Then they'll congratulate you on your good fortune and ask you to take them to a nice place for lunch -- because after all, you can afford it.

Or sell what you have, try to cover your losses in other ways, and bemoan your fate for a few years. Then move on and some day you'll be kicking yourself. Mark my words: you'll be sorry twice!

Disclaimer: This is a blog and is full of my own opinions, based on my experiences with Bitcoin, Litecoin, technology, etc. Could I be wrong? Sure. If you invest your life savings into BTC right now and lose it all, don't come knocking on my door. Be responsible and spread out the risk some. This is why I buy and mine coins rather than just buying $2000 worth of coins on a big drop like today -- I'm bad at day trading! Don't invest more than you can afford to lose, and don't go into massive debt because BTC/LTC look like a major opportunity. Grow your cryptocoin portfolio/mining farm slowly, over time. Start with $2000 and when you've recovered that cost, invest the future profits into more hardware. That's how I'm doing it!

Tuesday, December 17, 2013

Adventures in Alternative Cryptocurrency: Frozencoin (FZ)

Last week I got curious about Hashco.ws and did some testing, but as I was investigating whether or not the Hashcows multipool was better than mining LTC (verdict still pending), I got sidetracked by Quark. My testing of Quark quickly confirmed what others have said: it's mined out. 246 million QRK are now out in the wild, and going forward there will only be 1 million QRK per year. That seems short-sighted, but the people that held them until last week likely made a ton of money! Then in the midst of looking at Quark, I found a new coin called Frozen.

Frozen uses the same algorithm as Quark, which makes it more resistant to GPU and ASIC mining (for now at least), and since I have about 20 largely idle CPUs around I thought it would be interesting to mine some FZ and see if I could make any money off of it. The short story: absolutely! The long story? I'm not quite so sure where FZ is going in the coming months.

It's basically Quark 2.0, with only 7.777 million coins (instead of 250 million), plus a guaranteed 1 FZ reward per block minimum (~1051920 FZ per year after the initial mining, corresponding to one block worth 1 FZ per 30 seconds). What that means is that like QRK, when FZ is done, it's not really done... and I'm not sure that's a good thing, as it appears FZ will also be mined out in around six months? But if the value is high enough perhaps the 1 million FZ per year perpetually will be useful.

There's a site for Frozen, but it's in the process of being migrated to a new server (supposedly), which makes trading the coin a bit more difficult. (Update: Trading Forum is back!) The mining difficulty has spiked up ten-fold since I started, which means it's no longer giving me a 5X return relative to LTC mining, but I did get about 10LTC per day in trades several days last week. Thankfully, I also sold the LTC when it was going for $30, but we'll be back to $30+ again -- some day soon, hopefully, but if not then it will still happen.

Okay, back to Frozen. Let's say you want to mine it, since you have some rigs with GPUs and you could do FZ on the CPU still without really impacting performance (though it would use more power). The steps for getting Frozen mining going are pretty simple.
  1. Download the CPU miner and/or Smolen's GPU Smelter. Quad-core i7 will do around 800KHash/sec, while smelter will take 10% of coins to give to the developer. Smelter does 1400-1500KHash/sec on 7950/7970, 2000-2500KHash/sec on 5850/5870 and 6950/6970. (Apparently the developer doesn't have any GCN hardware, so it's not optimized for AMD's newer cards, at least not yet.)
  2. Download the Frozen-QT client, run it once and exit, and then edit Frozen.conf in:
    C:\Users\[Username]\AppData\Roaming\Frozen (mine is below for reference, or included in the chain snapshot).
  3. Now run Frozen-QT again and it should update the block chain and you're ready. (I've got a snap-shot of the chain as of 12/16/2013 available to help get you going faster). The conf file I provided has most of the settings needed to solo mine, including setting rpcthreads (the number of clients that can connect) to 40.
  4. Start mining, with either solo or pooled mining. CPU clients use the following command for the pool, replacing the address with your FZ address from the client:
    minerd64_sse4 -a quark -t 8 -o http://fz.mine-pool.net:9372 -u FTKf7WumfNRJA94frNsSJiudFJhvcGYH3t -p x
    For solo CPU mining, you can run:
    minerd64_sse4 -a quark -t 8 -o http://[Your IP]:18450 -u user -p pass
  5. For GPU mining, it's not possible to use a pool, so you have to do solo with smelter (again, swap in your own FZ address):
    smelter -o http://[Your IP]:18450 -u user -p pass -w 64 -g 2 -i 100 -a FA5Q97XuGzszbpNgGUjUWveTPGiJ9NnzR5
  6. You might need to open up ports 18450/18451 in your firewall, or at least tell the firewall to let traffic through when it prompts (if you're on Windows).
And that's pretty much it; you can sit back and mine Frozencoin. But there's the question: how much is Frozen worth? It's not on any exchanges yet, so you have to trade with people manually. You also need to figure out how much you're willing to accept. I've seen a lot sold at 1 LTC per 1000 FZ, but that may be too low -- or FZ could collapse and no one would want it, but that can happen potentially to any cryptocurrency. If FZ ends up equaling QRK (Quarkcoin), it could be worth $0.10 per coin. Since there are only 7,777,777 FZ (plus ~1 million per year), it should be worth quite a bit more in theory. Time will tell. In the meantime, the difficulty is still reasonably low, so you could mine a few thousand in a week and hold them for the future. Enjoy!

Donations in FZ: F8sGbVmiepUAmVQA3foaW2t4jP2a8sHYKo

Frozen.conf:
rpcuser=user
rpcpassword=pass
rpcport=18450
port=18451
testnet=0
rpcallowip=127.0.0.1
rpcallowip=192.168.1.*
rpcthreads=40
listen=1
daemon=1
server=1
gen=0
addnode=192.241.200.142
addnode=71.84.113.165
addnode=75.142.224.140
addnode=75.166.71.201
addnode=84.249.109.128
addnode=98.214.94.227
addnode=98.242.20.240
addnode=87.119.221.84
addnode=78.128.6.26
addnode=5.9.44.164
addnode=84.238.225.19
addnode=86.100.125.187
addnode=176.215.214.89
addnode=95.85.21.252
addnode=106.187.41.6
addnode=50.201.141.6
addnode=71.84.113.165
addnode=75.142.224.140
addnode=75.166.71.201
addnode=84.249.109.128
addnode=98.214.94.227
addnode=98.242.20.240
addnode=137.117.216.239
addnode=137.117.218.209
addnode=139.190.255.127
addnode=162.242.223.73
addnode=174.100.51.46
addnode=194.68.104.18
addnode=218.74.37.218
addnode=222.126.164.66

Friday, December 13, 2013

LTC4You: Fun with uLTC

I'll keep this short, but a few days ago a family member (cousin) posted on Facebook about LTC. I thought, "What the heck -- she doesn't know about computers, what's she posting about LTC for?" Turns out it was for the site LTC4You.com, which gives away free LTC, plus a 50% bonus on all games played by people you refer. I have a blog and it gets a decent amount of traffic (around 5K views per day at present), so I thought, "What the heck, let's give it a shot!"

I registered early on December 11, so two days later I have played 13 games. Every time so far I have only received the 40 uLTC reward, so for my clicking and typing captchas that works out to a whopping 520 uLTC. Thanks to referral bonuses, however, I'm totally rolling in the uLTC: my current balance is 4410 uLTC, meaning almost 10X as much from my referrals.

Here's the problem: uLTC is essentially worthless. 4410 uLTC sounds like a big number, but the "u" is for micro, or one millionth of a Litecoin. After two days, the total earnings I have received from my games and the 35 referrals is valued at $0.13. So one penny for typing a captcha is my current rate (with referrals), and you can only do at most 24 per day.

Put another way, I type reasonably fast at around 65 WPM. Even with zero delay between games, accounting for refresh time plus the time to actually play the game, at best you might be able to play 10 times in a minute (being generous), and you'd be stuck staring at the screen all day. That would be 14,400 games per day, most winning 40 uLTC, for a grand total of 0.576 LTC in a day. I don't know about you, but as a best-cast scenario I don't think $15 per day is worth the effort, and realistically you're more likely to get about $0.05 per day.

You've been warned. Now all of you go play off my referral link so I can earn another $0.10 for this awesome post! </sarcasm>

Litecoin vs. Hash Cows: Profitability Compared

There's plenty of interest in mining Litecoin right now, as it's generally considered the most profitable of the alt-coins (Bitcoin being the primary cryptocurrency). In fact, LTC is now at the point where it's basically no longer an alt-coin -- mission accomplished. But there are a ton of other alt-coins that are still being mined, some potentially more profitable than others. Here's a somewhat complete list of the market capitalization of various cryptocurrencies if you're interested -- basically Bitcoin is now at just under $11 billion, and Litecoin is about 7% of that at $764 million. Third place is Peercoin (PPC), at 13% of the value of LTC: $97 million. Quarkcoin (QRK) is fourth, and represents the top coin that can still be mined with CPUs, but it's basically mined out now (despite the recent brouhaha where it increased in value 500% over a few days -- good for those that mined early, but with seven systems I only created about 6 QRK per day, or $1.50 -- maybe just barely enough to pay for electricity for the systems in question).

Anyway, getting on to the point of this post, all of the cryptocoin miners know by now that difficulty and pricing for every coin fluctuates quite a bit. Lately, BTC and LTC are just increasing in difficulty quite rapidly, but that's because for those that have the latest hardware (second-generation ASICs for BTC and 7900 or R9 290 series GPUs for LTC) are making great returns. What if you want to skip the two most popular coins and instead mine something not as well known? What if you created a pool that would look at all of the major Scrypt-based coins (excluding LTC) and choose the one that is currently the most profitable to mine? What if the pool automatically converted all of your alt-coins into BTC every day? That pool is Hash Cows. (Other similar pools exist, but Hash Cows is what I'm testing right now.) From their FAQ:
What Does your Pool Do? The pool automatically mines the most profitable coin from our list of available coins and the miner has the option in their settings page to either be paid out in that coin, or directly in Bitcoin. This decision can be made on a coin by coin basis, with some being paid out as the original coin and some being paid out in Bitcoin, and in any combination.
Sounds great, doesn't it? So here's the deal: I have about 6500KHash/sec that is currently going into LTC mining, which nets me a bit more than 2 LTC per day. At current LTC prices, that's $70 or so per day, with an electricity cost of $10, so a net profit of $60. It's not enough for me to quit my day job by any stretch, and certainly it's not something I would feel confident in depending on right now, but it's a nice bonus -- plus the PCs help heat my house in the winter. (Summer isn't so nice, though!)

By way of comparison, Hash Cows has a profitability chart showing the returns you can expect from their service. Based on that chart, doing 6500KHash (6.5MHash) would get me anywhere from 0.039 BTC (11-16-2013) to as much as 0.24 BTC (12-09-2013) in a day. Even at $900 the first value isn't very interesting: $35 in a day is less than half of what I would get from mining LTC. The second option on the other hand looks really nice, as it would mean a whopping $216 per day -- about three times as much as I make by mining LTC! It was enough for me to point all of my rigs at stratum01.hashco.ws:8888 for the past day and a bit. (Note that I kept LTC mining as a secondary fail-over pool for mining as well.) And the result? Well, that's where we run into problems.

The first day I only had my PCs mining at Hash Cows for maybe a third of the day. Then I noticed that all of my rigs had switched back to LTC mining, and apparently Hash Cows' stratum proxy was having problems. Anyway, my payout for the first day was pretty uninspiring: 0.00913815 BTC ($8.22 at the current price). I hoped that by devoting a full 24 hours to mining I would get a better result, and I did: 0.04457882 BTC ($40.12). That's still about half of what I would have earned mining LTC.

Here's the real problem. Remember that "Profitability Chart" that I linked. Above is the screenshot showing yesterday (12-12-2013). In theory, based on that chart I should have made 0.019 BTC per MHash. If my PCs were doing 100% of their work at Hash Cows, that would yield 0.1235 BTC ($111.15). In practice, I received about one third that amount.

There are some other issues as well, like the bit about automatically mining the most profitable Scrypt-based alt-coin. That's basically false, or their algorithm is really bad, or their statistics chart is totally inaccurate (and has bad math). If I look at the returns from their pool right now, just in the past few hours I see 1:14:10 spent mining WDC generating 0.004423 BTC (that would work out to 0.08588 BTC per day), and then I see another where 43:58 was spent on MEM  generating 0.001778 BTC (that would work out to 0.05823 BTC per day).

You might be inclined to call this a scam of some form, but I'm going to give it a shot for another day and see how it goes. I've also noted my exact LTC balance at my mining pool so I can see how many LTC I mine when (not if!) Hash Cows is a bit too slow at responding and my rigs fail over to Hash Cows. We'll see how it goes tomorrow, but right now it's not looking very good for Hash Cows. There is a lovely disclaimer at the bottom of the profits chart, though:
* Please note, the data above is a somewhat small sample size taken from miners known to have mined 24/7 and auto-exchanged 100% of coins. Your results may vary slightly based on reject rate or receiving non-btc for some coins etc.
Like I said, I mined 24 hours on Hash Cows yesterday and their chart just doesn't match my result. I think part of the problem is inefficiency though -- every time they switch coins, my miners all seem to swap over to my secondary pool for several minutes, and they tend to switch coins every 20-30 minutes on average. That could mean I earned $40 from Hash Cows and another unknown amount from LTC mining (perhaps as much as 1 LTC), which would then be more or less a tie. But if you're looking at the chart above and expecting to make three times as much as you would get mining LTC, you're likely going to be sorely disappointed.

There is an upside however: while it looks like LTC is currently outperforming Hash Cows, if the difficulty of mining LTC continues to go up 5-10% every few days that may not be the case in another month or two. Given the choice between mining 0.5 LTC per day or the 0.045 BTC I got from Hash Cows yesterday, they would come out ahead. That's of course assuming their mining profitability doesn't go to crap in the meantime.

To be continued....

Tuesday, December 10, 2013

Finding Optimal Clock Speed for CGMiner and R9 290/R9 290X

Update, 12/12/2013: There were some bugs in the batch files (an errant "--" in one, for example), so I've updated them with new versions that should run properly now.

Going along with the previous post on finding the best Thread Concurrency setting for your hardware, you'll probably first want to find some good clock speeds. Unlike searching for a good TC value, tuning your clock speeds could very well lead to a system crash/hang and/or BSOD. Ideally, your system will automatically reboot, but in some cases it will get stuck and you'll have to manually intervene. Once again, I've created a couple batch files (that build off the previous batch files) for helping you find optimal values for your hardware, which you can download here. The contents of the two batch files are included below for reference:

engine-clock-test-r9version.bat:
@echo off
set threadconcurrency=24000
set gpuclock=800
set memclock=1300
set gpufan=50-75
set gpuvolt=1.100
set gpupowertune=50
set gpustopclock=1100

if exist currentgpuclock.txt (
  for /F %%x in (currentgpuclock.txt) do set gpuclock=%%x
)

setlocal EnableExtensions

:startloop
echo Current GPU Clock is %gpuclock%
echo %gpuclock%> currentgpuclock.txt
start "MinerThread" miner-tc-r9version.bat %threadconcurrency% %gpuclock% %memclock% %gpufan% %gpuvolt% %gpupowertune%
sleep 300
taskkill /im cgminer.exe /f
<nul set /p =GPU Clock %gpuclock%: >> AvgHashrateGPU.txt
grep -i "(avg)" %threadconcurrency%.txt | tail -1 >> AvgHashrateGPU.txt
set /a gpuclock=gpuclock+5
if "%gpuclock%" GTR "%gpustopclock%" goto :EOF

goto :startloop
memory-clock-test-r9version.bat:
@echo off
set threadconcurrency=24000
set gpuclock=800
set memclock=1200
set gpufan=50-75
set gpuvolt=1.100
set gpupowertune=50
set memstopclock=1700

if exist currentmemclock.txt (
  for /F %%x in (currentmemclock.txt) do set memclock=%%x
)

setlocal EnableExtensions

:startloop
echo Current RAM Clock is %memclock%
echo %memclock%> currentmemclock.txt
start "MinerThread" miner-tc-r9version.bat %threadconcurrency% %gpuclock% %memclock% %gpufan% %gpuvolt% %gpupowertune%
sleep 300
taskkill /im cgminer.exe /f
<nul set /p =RAM Clock %memclock%: >> AvgHashrateRAM.txt
grep -i "(avg)" %threadconcurrency%.txt | tail -1 >> AvgHashrateRAM.txt
set /a memclock=memclock+10
if "%memclock%" GTR "%memstopclock%" goto :EOF

goto :startloop
Other than modifying the GPU Engine or GPU Memory clock each iteration, the two files are the same. They also use the same miner-tc-r9version.bat file as before (which I didn't rename because why bother). If you create a link to the batch file you're testing and put that in your Startup folder, the batch files will also continue from where they left off in the case of a system reboot...which means if your system is unstable before the stopping clock you specify, it will be stuck in a reboot loop, so keep an eye on things or don't put the files in the Startup folder and instead save that for a stable cgminer configuration -- and be sure to set the gpustopclock and memstopclock to appropriate values.

My recommendation would be to choose a reasonable starting memory clock (around 1300 is usually safe on all R9 290/290X GPUs) and run the engine-clock-test-r9version batch file. When that finishes (or reaches a point where it cannot continue), look at the AvgHashrateGPU.txt file and you should end up with one of to things. Eiher you find out how far you can push clocks before becoming unstable and crashing (with each increase in clock speed bringing improved performance), and in that case I'd probably back off 10-25MHz from the point where the GPU crashed, but you can do as you please. The other possibility is that you'll find hash rates peak at a lower clock speed (say, 825-850MHz), and as you try going higher the AMD GPU will begin to throttle automatically. If this is happening, use the clock speed that gives you the highest hash rate.

Once you've found a good GPU clock, set the gpuclock=800 line in the second batch file, memory-clock-test-r9version, to that clock speed and then run the second script. It will do the same thing as before, except now RAM clocks go up 10MHz every five minutes until you reach the stopping clock speed (1700MHz is what I put in) or you crash -- and a crash is far more likely if you try for 1700MHz GDDR5! Check your AvgHashrateRAM.txt file for the best result and use that for your GPU, and then go run the Thread Concurrency optimization batch file and find the best TC for your system.

Here's the tricky part: you need to do the above for each and every GPU in your system(s) if you want to get optimal performance, while means you also need to tweak the miner-tc-r9version.bat file and add "--device [Number]" to the cgminer.exe command for each GPU. You might not need to do this for Thread Concurrency, but for the Engine and RAM GPU clocks it will definitely help out! Also, once you find values for each GPU that work well, you may find that running all your GPUs at once will require slightly lower clocks in order to be stable (which potentially could mean you need to check TC again, though that's probably overkill).

Now all we need is for more R9 GPUs to be available at reasonable prices -- I'm seeing prices of $700 for R9 290 and $830 for R9 290X right now! And Newegg isn't really any better last I checked (well, maybe a bit better, but still price gouging). If you've already got yourself some shiny R9 290 GPUs, happy mining while everyone else is stuck waiting!

Donations and referrals gladly accepted if this helps you out:
LTC: LXpEZcNJtikd263z7Ha3vrdYDcLU7hiKWv

CGMiner Optimal Thread Concurrency for R9 290/290X

Continuing from my previous post, I've now created a batch file to help find the optimal Thread Concurrency setting for R9 290/290X systems. The difficulty with doing this stems from the fact that normally exiting CGMiner on Windows with the new GPUs will cause a BSOD on most (all?) systems, so you can't use my other batch files. They work great on HD 7970/R9 280X and earlier systems, though, and last night I managed to increase my HD 7950 test system by 20KHash/sec per GPU. So how do we deal with R9 290/290X? We tweak things a bit and end up with some new batch files, which you can download via my Dropbox.

Instructions:

Extract the contents of that Zip file to your CGMiner folder (Windows only right now). There are five files inside, including three EXE files, but nothing dangerous; here's the quick summary of the EXE files.

Sleep.exe is a program that can be used in batch files to pause for a set amount of time (e.g. 300 seconds = "sleep 300").

Grep.exe is a common Unix program that allows you to search through files for matching strings; you can use "find" on Windows, but the output of CGMiner messes find up because it includes special characters.

Tail.exe is the last executable and it's also a port from Unix; it allows you to output the last few lines from a file (or a command); so "tail -1" gives the last line from a file or command.

I use the above three files in the batch files to help with creating a useful summary of the mining results for each thread concurrency. The two batch files are similar to before, but with some tweaks. Here's what they contain if you don't want to download:

thread-concurrency-test-r9version.bat
@echo off
set threadconcurrency=18000
set gpuclock=900
set memclock=1400
set gpufan=50-75
set gpuvolt=1.100
set gpupowertune=50

if exist currenttc.txt (
  for /F %%x in (currenttc.txt) do set threadconcurrency=%%x
)

:startloop
echo Current TC is %threadconcurrency%
echo %threadconcurrency%> currenttc.txt
start "MinerThread" miner-tc-r9version.bat %threadconcurrency% %gpuclock% %memclock% %gpufan% %gpuvolt% %gpupowertune%
sleep 300
taskkill /im cgminer.exe /f
<nul set /p =%threadconcurrency%: >> AvgHashrateTC.txt
grep -i "(avg)" %threadconcurrency%.txt | tail -1 >> AvgHashrateTC.txt
set /a threadconcurrency=threadconcurrency+64

goto :startloop
miner-tc-r9version.bat
@echo off
set threadconcurrency=%1
set gpuclock=%2
set memclock=%3
set gpufan=%4
set gpuvolt=%5
set gpupowertune=%6
cgminer --scrypt -o stratum+tcp://coinotron.com:3334 -u trogdorjw73.tester -p tester -w 256 -v 1 -I 20 -g 1 -T --gpu-engine %gpuclock% --gpu-memclock %memclock% --gpu-fan %gpufan% --gpu-vddc %gpuvolt% -- --temp-target 80 --temp-overheat 95 --temp-cutoff 99 --thread-concurrency %threadconcurrency% > %threadconcurrency%.txt
exit
The first files starts with some variables you can modify for clock speeds, starting thread concurrency, voltage, fan speed, and powertune. It the calls the second file (passing the variables along), which actually starts CGMiner running. Because we can't let CGMiner exit gracefully without a BSOD, the first file waits 300 seconds after starting the second file and then kills the CGMiner.exe process, at which point it uses the output from the mining results and grabs the last average hash rate, which ends up in a text file called AvgHashrateTC.txt.

So to use this, you first need to delete (or at least rename) your cgminer.conf file in your CGMiner folder, then extract the Zip file to the directory and just run thread-concurrency-test-r9version.bat and walk away (though you might want to tweak the clocks or other settings first). Come back in a day or so and look at your averages and you'll see something like the following:
18000: (29s):1.398M (avg):1.569Mh/s | A:640   R:0    HW:627  WU:616.8/m
18064: (29s):1.368M (avg):1.565Mh/s | A:1600  R:0    HW:710  WU:610.6/m
18128: (29s):1.264M (avg):1.585Mh/s | A:1600  R:0    HW:537  WU:608.4/m
18192: (29s):1.330M (avg):1.536Mh/s | A:1600  R:0    HW:600  WU:685.5/m
18256: (29s):1.409M (avg):1.575Mh/s | A:1920  R:320  HW:347  WU:707.8/m
18320: (29s):1.339M (avg):1.544Mh/s | A:2240  R:0    HW:467  WU:626.2/m
18384: (29s):537.3K (avg):1.357Mh/s | A:640   R:0    HW:384  WU:681.4/m
....
If all goes well, you will have a lot more lines than the above, but it's possible your system will crash during the testing. To get around that, the currently tested TC is spit out to a file which gets read when the first batch file starts. If you create a shortcut to thread-concurrency-test-r9version.bat and put that in your Startup folder, even after a crash/reboot the testing will pick up where it left off.

In the meantime, based on more experience with the GPUs, I'm recommending the Radeon R9 290 over the R9 290X for Windows users -- you can probably get closer to 1000KHash/sec on the 290X with Linux, but on Windows it can be rather difficult. Also, the default voltage used on your GPU will affect your ability to hit higher clocks and hash rates -- lower voltages being better.

Donations gladly accepted if this helps you out:
LTC: LXpEZcNJtikd263z7Ha3vrdYDcLU7hiKWv
Go win some LTC!

Finding Optimal Litecoin Mining Settings

Tuning your Litecoin mining system to get ideal performance can be a royal pain in the rear -- this I know from personal experience. Settings that work great for one person can end up being terrible for another individual. So if you've just bought a shiny new Radeon R9 290 or R9 290X (or any other GPU for that matter) and you're trying to get better hash rates, here's the general plan of attack for getting optimal mining performance from your system:
  1. Ideally you want to mine at intensity 20, as that will result in the fastest performance, but the system will not really be usable for other work.
  2. Start at reasonable settings and then start increasing GPU clocks and memory clocks until your system becomes unstable.
  3. You'll probably need to play with fan speeds and/or voltages in the process of tuning.
  4. Once you've found the clocks that your GPU will handle, start looking for the optimal thread concurrency setting.
Needless to say, dialing things in can take days if not weeks, and every crash and restart can be maddening. I'm trying to build a set of batch files to automate things under Windows. Here's what I have so far, for finding an optimal thread concurrency setting. You need to put the two batch files in your CGminer folder, without any active cgminer.conf file.

ThreadConcurrency.bat:
@echo off
set threadconcurrency=18000
:startloop
echo Current TC is %threadconcurrency%
start /wait "MinerThread" miner-tc.bat %threadconcurrency%
<nul set /p =%threadconcurrency%:  >> AvgHashrateTC.txt
type %threadconcurrency%.txt  | find /i "average hashrate" >> AvgHashrateTC.txt
set /a threadconcurrency=threadconcurrency+64
goto :startloop
miner-tc.bat:
@echo off
set threadconcurrency=%1
cgminer --scrypt -o stratum+tcp://coinotron.com:3334 --shares 5  -u trogdorjw73.tester -p tester -w 256 -v 1 -I 20 -g 1 -T --gpu-engine 965 --gpu-fan 70 --gpu-memclock 1550 --gpu-vddc 1.075 --temp-target 85 --temp-overheat 95 --temp-cutoff 99 --thread-concurrency %threadconcurrency% > %threadconcurrency%.txt
exit
Place those two files into your cgminer folder and then run ThreadConcurrency.bat (tweaking as needed for your mining pool, temps, etc.) and walk away. Your PC will run through five shares at each thread concurrency setting and spit out the result to a file called "AvgHashrateTC.txt", and you can look at that in the morning after running the batch file all night (or in the evening after running it all day if you prefer).

There's a catch, of course: I set the above to do five shares, and sometimes you'll get lucky or unlucky so hash rates can be higher/lower. Setting the shares value higher (like 20 or 30) would take longer to get through a sequence but it would be more accurate. When you're fine tuning that's worth a look, and maybe you could even change the increment from "+64" to "+32" or "+16" -- or even "+1" if you think that might help.

You can use the same approach for clock speeds as well, but you'll probably want a maximum clock (or just let it go until your PC reboots). I'll post some batch files for that tomorrow. Also note that on the R9 290/290X cards under Windows, when cgminer exits it often causes a BSOD -- no fun! I'm not sure if that's drivers or cgminer 3.7.2; I need to try poking around a bit, but it's a real irritant. Closing the window with the X in the corner avoids the problem, but that doesn't work with CGWatcher or my batch files above.

If you find this useful, go ahead and run the files as above and I'll get a few mining shares during your testing. Optionally, feel free to donate to my blogging efforts by shopping online or via LTC donations. Or win some for free and give me a commission.

LTC: LXpEZcNJtikd263z7Ha3vrdYDcLU7hiKWv

Friday, December 6, 2013

News from China: Banks and ISPs Told to Not Use Bitcoin

Many have speculated that much of the current Bitcoin (and Litecoin) pricing bubble has been caused by wild speculation in China. Well, that bubble may have just burst, so plan accordingly. Long-term, the outlook for Bitcoin and Litecoin is still good -- in fact, the outlook in some respects is even better now. China is telling banks not to accept Bitcoin because they are afraid of the inherent power in an unregulated (meaning, not controlled by the governments) currency that can be used without their consent.

Remember when someone stole 25,000 BTC from an account and BTC prices took a dive? Remember when the US came down on MtGox and closed Dwolla withdrawals, seized a bunch of money, and made wire transfers to/from the US very difficult? The price of BTC took a short-term hit and then recovered. Remember when Silk Road got closed down and the price of BTC plummeted, followed by a rise to new heights? Remember the previous two bubbles?

We've seen this all before. If you want to play the market, by all means: sell now while prices are high and hope to buy in at a lower price. How low will we go and when is the right time to buy back in? That's the real question.

As I've said before, we're going to see $1000+ BTC again at some point, probably within the next three months, but almost certainly in the next year. Given there will only be 21,000,000 BTC ever, I'd even go so far as to say we're likely to see BTC hit $50,000 USD or more within the next decade -- that would represent a market cap of $1 Trillion, which sounds like a lot but given it's potential use as a global currency free from government regulation, I'd say it's looking more and more likely. Every government that ends up in a debt crisis (Greece, Italy, etc.) is just lending more power to the idea of cryptocurrencies, and as the two most prominent citizens, BTC and LTC are set to reign supreme.

LTC for Free

Litecoin Mining ROI for R9 290 and R9 290X

If you're wondering about the ROI (Return On Investment) for Litecoin mining with a shiny new R9 290 or R9 290X, there are quite a few calculators out there that will help with some rough estimates. The problem with the calculators is that they're very rough -- they assume a constant increase in difficulty and a constant price for Litecoin, neither of which are even remotely likely. They always end up at the point where Litecoin mining becomes "unprofitable", but my experience says that isn't likely to happen -- "ever" (though we need to dig into this more, which is the point of this point). Some may account for hardware upkeep and other factors, but even then you're going to need to do a bit more work to even come close to reality. So what is "reality"? That's what I'm here to talk about today.

My earlier post about paying for the hardware in a month or two was perhaps a bit overzealous -- especially if you haven't ordered the hardware yet! You see, Litecoin and Bitcoin (and pretty much all of the other cryptocurrencies) are designed to have someone find a new block of coins via mining every set interval; on Bitcoin it's every 10 minutes and on Litecoin it's every 2.5 minutes. The more people start mining, the faster blocks would be found, so they scale the difficulty to try to keep the rate more or less constant. The result is that every 2016 blocks that are found, the algorithm looks at how long it took and either scales the difficulty up, down, or keeps it the same. You can find the current difficulty and estimated next difficulty at many places, but the key thing to remember is that it's always changing.

The biggest factor affecting difficulty is the price -- if Litecoin mining becomes highly profitable, as it did during the past month, then more people will mine and difficulty will go up. At the start of November 2013, the difficulty was around 1000; now it's at nearly 2000 -- twice as difficult, or put another way your hardware is now generating half as many LTC. As an even more extreme example of what can happen, Bitcoin difficulty went from around 3.2 million at the start of 2013 to its current 707 million in eleven months -- a 221X increase in difficulty! And it's not set to slow any time soon. But for the time being, that won't happen to Litecoin. Here's why.

Bitcoin difficulty has generally followed the price such that for any set of hardware, you could expect to pay it off in around six months (accounting for electricity costs in the US or $0.10 per kWh). Early on this didn't hold, and even in the CPU mining days it wasn't quite accurate, but since 2011 that's more or less been the status quo. Pricing bubbles cause the difficulty to spike and price crashes cause it to drop -- albeit more slowly -- but the result is pretty constant. There were two major wild cards that screwed things up, however: the advent of GPU mining, followed by the dawn of Bitcoin ASICs.

Even at it's lowest point in 2011 (around $2 per BTC), my GPU mining was pretty close to the break even point, and thanks to constantly dropping difficulty (remember: it follows pricing; it does not lead) my rigs that at one point were perhaps costing a bit more than they were earning in mined coins eventually returned to profitability. Thanks to my $0.10/kWh electricity cost, I can still mine at a profitable rate (even if it's a low rate) when those with higher electrical costs have to quit. Europeans in particular pay some pretty insane rates and thus they don't tend to mine unless it's highly profitable (or if they're looking at a long-term view of the value of BTC/LTC).

So my GPUs are chugging along happily, averaging 5 BTC per day at lower difficulties, then 4, 3, 2, 1... you get the point. My daily power costs are around $10, and my mining income has usually been around $15 -- at the current price at least. Then ASICs start arriving and the early offerings could mine at 330 MHash and 5W compared to my 5870 GPUs doing 380 MHash at 300W -- or in other words, they were 50 times as efficient! The problem was that ASICs weren't readily available, so those that had them reaped massive rewards while those that didn't started trying to get ASICs as quickly as possible.

I should note that FPGAs were always more efficient than GPUs as well, but their costs were such that most people didn't jump on that train -- they're around $600 for a good FPGA (e.g. BitForce) that could mine at 800MHash with a power draw of 80W -- about eight times as efficient as a GPU, but still quite a ways behind any of the proposed ASICs at the time.

When the first generation ASICs actually started shipping, we naturally saw a massive spike in difficulty, just like what happened with the GPU spike a few years earlier. Eventually, difficulty hit the point where anything short of a good ASIC became unprofitable -- which lead to things like a single Block Erupter dropping to a low of $15 on Amazon before the BTC price jumped up to $1000+. You could have purchased 10 for $150 to get 3.3 GHash and a power draw of 50W, and 45 days ago it would have earned $25 per month or so. Today, a better bet would be a similar Block Erupter Blade that will do 10.7 GHash and draw 85W or so of power, for $600. That's actually not a bad deal if you want to grab it, as you will "earn" $200 per month right now. But difficulty for BTC is still increasing quite fast, so it will likely end up being a 5-month ROI.

Okay, I've been talking around things a lot, but let's get to some real numbers. Since difficulty follows price, the only time we will actually reach the point where GPU mining of Litecoin becomes unprofitable is when Litecoin ASICs become so prevalent that GPUs can't compete. There are companies talking about making Litecoin ASICs -- FPGAs having been ruled out due to cost and efficiency considerations -- but the Scrypt algorithm was intentionally designed to make it difficult to implement on GPUs, let alone ASICs. This is why you get 600 KHash from an HD 7950 compared to 650 MHash for SHA256 (Bitcoin) -- it's 1000 times more complex to run the Scrypt hashing algorithm. But that doesn't mean an ASIC is impossible -- just more difficult to make.

One company I've read about is claiming they'll have a Litecoin ASIC in mid-2014 that does 500KHash per chip at 20W. That's over 100X as efficient as mining with a 7950 or R9 290 GPU, though pricing hasn't been fully disclosed yet. Here's the thing: the same company was making claims about an amazing FPGA design for Litecoin before determining it wasn't cost effective, and now they're making big claims for ASICs. I was around when the first Bitcoin ASICs were being discussed, and the claims were similar. Preorders for companies like Butterfly Labs rolled in, with people investing 100BTC at a time when the coins were worth $2.50; two years later when they finally received their ASIC, BTC was worth over $100 -- if they had just "invested" the $250 in holding BTC, they would have made far more than the ASIC will ever deliver. Litecoin ASICs are going to be the same thing, so before you drop $500 or $1000 on an unproven and not yet shipping product, ask yourself: how much will 10 to 25 LTC be worth in a couple years?

With all of that out of the way, here's my final rough guess on how LTC difficulty will proceed. I've normalized LTC production to one R9 290 getting 850 KHash/sec to make things easy. Assuming you start mining today, you'll get around 0.43 LTC until the next difficulty change (every 3.5 days). At that point, we'll likely jump up 10-15% in difficulty, because with a net profit of $50 after just 3.5 days people would be silly to not mine LTC. I'd guess that rate of increase will continue for about three weeks, at which point we'll be at a difficulty of 4000 -- twice what we are now. The rate of increase will start to slow, ranging from 5-10% for the next three weeks, at which point we'll have doubled again up to ~8000 difficulty. From there, it will continue to stabilize until we end up at around 12000-15000 difficulty.

If the price increases or drops (and it will), those difficulty estimates will of course change. If we see $100 LTC I would expect the difficulty to stabilize at a much higher value -- maybe 20,000 or so. If the price drops down to $10 per LTC on the other hand, difficulty will end up closer to where we are now -- around 2,000. Basically, my guess is eventually difficulty will stabilize at a value that leads to a single R9 290 generating $3 per day in profit. At that point, the GPU pays for itself in about four months, and with a four month ROI instead of two or four weeks, people become far less likely to purchase more hardware for mining.

For those that didn't know, Litecoin difficulty has a cool feature: divide your hash rate by the difficulty to determine how many coins you mine per day. That means at a difficulty of 20,000, a single R9 290 would only generate 0.0425 LTC per day, or 1.275 LTC per month. The power cost for running a single R9 290 is going to be about $25 per month, so in order to break even in four months you need to mine $125 per month in LTC. LTC was stable at around 1000 (give or take 10% as it went up and down) from August until early November, because the price wasn't attractive enough to draw additional miners into the fray. A single 7950 was only making about $1 per day, depending on the price, so it was technically profitable but the ROI would have been almost a year for a single 7950 purchase.

We'll eventually get to that point with R9 290 and 290X, and then the early adopters will pat themselves on the back and those that came late will curse their stupidity. They might even exit Litecoin mining altogether and sell off their hardware in order to recover some of the cost. And then, a year from now when LTC is at $100 or more and the next bubble is going on, they'll think, "If only I had kept mining...." Hopefully you have the ability to stick it out until that time.

Got LTC?