As an Amazon Associate I earn money from qualifying purchases.

Friday, December 27, 2013

Bitcoin ASIC ROI

Going along with my earlier post, someone asked me about Bitcoin ASICs and their current ROI. I'm going to give my thoughts on the subject, but know in advance that there's one real killer: all of the worthwhile Bitcoin ASICs are pre-orders, which means you have to fork over a large sum of money in the hope of future profits. It's a huge risk, with quite a few companies failing to ship at anything close to their originally promised dates -- Butterfly Labs being the easy scapegoat. But let's just start with a few of the ASICs that are currently promised.

The Block Erupter was the original ASIC, used by ASICminer back when no other companies weren't yet shipping. They are now readily available, but difficulty has skyrocketed and the prices on Block Erupter haven't kept pace. At present, a single Block Erupter USB ASIC will cost around $80 new, $45 used. Why would anyone sell one of these awesome miners for half price if they're so great? Simple: they're not great -- at least not now. At the current BTC difficulty, a single USB Block Erupter will earn less than $3 per month. Difficulty is increasing pretty consistently at 15% every two weeks (thirteen days), so you'll likely never earn back your investment.

A 10GHash Block Erupter Blade is marginally better; you pay $489 new ($387 used) and generate roughly $85 per month. Note that you need to add a power supply and some other parts to the mix, so $489 doesn't just get you up and running. If you're ready to try that route, you could go with a Block Erupter Cube with three blades, for 30GHash, priced at around $1200. Add a PSU for $100 or so and you'll generate about $325 per month in profits at the current price/difficulty ratio -- so you could potentially match the break-even time for GPU scrypt mining of Litecoin.

Difficulty is of course still going to curtail those earnings, which means in reality it's more like $150 in the first two weeks if you have the 30 GHash rig right now. The next two weeks you drop down to $127, then $108, $92, $78, $66, $56.... That's assuming a constant rate of increase, but what you end up with after one year is that you will actually be past the point where the Block Erupter Blade or Cube earns money, and you'll never actually recoup your initial investment. Add in some of the faster upcoming ASICs that will likely spike difficulty and it looks even worse. So Block Erupter is out.

Let's take one of the hot new ASICs, the KNC Jupiter. It was offered for $5000 for 550GHash, which at present means if you ordered one and now have it up and running you're making around $175 per day and you'll hit the break-even point in just over a month. But they're sold out... so if you want one, you can buy this used one for "only" $20,000. A year from now, instead of rolling in the dough, difficulty increases will mean you'll have earned about $16,000 back from your initial investment and the miner is no longer profitable. I suspect difficulty increases might slow down somewhat, so you could at least break even in a year, but it's still a dicey proposition.

If you want to take a gamble on a not-yet-shipping ASIC, Cointerra is asking $6000 for a 2THash (2000GHash) TerraMiner IV that will show up around April. If they hit their ship date, you break even in about a month, and even if they're a month late you still break even in about 60 days. And realistically, I think difficulty increases will slow down for a bit, as the TerraMiner IV is one of the most efficient ASICs and it's only available in limited supply, which means five months from now you recoup your investment and you actually break even just three weeks after you start mining.

It sounds great on the one hand, but considering you could potentially take the same $6000 and build four perfectly capable scrypt-mining rigs today, it's still a gamble. You could have four rigs with three R9 280X cards each pulling a total of around 9000 KHash/sec up and running within the week. Six weeks to eight weeks and you could be free and clear on your initial investment, while those betting on CoinTerra are still two or three months away from getting their TerraMiner IV.

But I'm just staring at my crazy little crystal ball, so don't take this as anything set in stone. More likely than any of the above scenarios of course is that prices take a dive, at least for the short-term, which means your $6000 investment in hardware is going to make a bunch of noise and look like a money loser for months or even a year, until we get the next big bubble and you're sitting on $100K or more of LTC/BTC/whatever. And if you're an entrepreneur and can play the long game, why not diversify and buy $12000 worth of hardware (one TerraMiner IV and the rest into GPU rigs for scrypt)? One of them is bound to give at least a 2X ROI, paying for both, and the rest is just gravy.

Mining Litecoin and Alternative Cryptocurrencies - Estimated ROI

My last post on the ROI for mining Litecoin with the new R9 290/290X GPUs is still more or less on target -- difficulty is stabilizing for now, with an expected return of around 2 LTC per week per R9 GPU. That works out to around $45 per week, or $180 per month, so you'll have paid for your R9 290/290X in three months, give or take. But what about switching to some alternative cryptocurrency?

In roughly one week of mining, I mined about 1 BTC with 7000 KHash of GPUs. That works out to over $700 per week for hardware that you could match with seven or eight R9 290X GPUs, eight or nine R9 290 GPUs, or ten R9 280X GPUs. Now if you do the math, at present that means best case you would need $4600 worth of R9 290X cards, $4000 or R9 290 cards, or just $3500 worth of R9 280X (HD 7970) cards. Until prices are closer to MSRP, it looks like the 280X is the one to get.

Now, if current alternative cryptocurrency mining remains even close to where it's been, we're looking at roughly $2800 per month, so you'd pay off the GPUs in less than two months, and realistically all of the hardware could be paid for within two months. That's pretty darn appealing if you ask me! And you don't have to go out and buy dozens of cards in one fell swoop either -- just start with a single rig and if you go with 3-way R9 280X you could have the whole system for around $1500, and it would be paid for in about six weeks.

The problem is Hashco.ws is still in a state of disarray following the hack, so I've moved to Middlecoin for now. I switched about 5000 KHash of PCs to Middlecoin six hours ago, and at present it looks like my BTC balance is 0.0135 BTC. For a full day of mining that works out to 0.054 BTC, which would yield roughly $40 per day, $1200 per month -- not quite so rosy. I'll update tomorrow when I've seen just how many BTC I get through Middlecoin after a full day of mining, as it could still be ramping up my payouts; I'm hoping to get about twice that (0.1 BTC per day), which is closer to my previous rate with Hashco.ws.

Update: I've switched most of my systems back to Hashco.ws as the primary pool, with Middlecoin as the secondary pool. Hashco.ws is still a bit of a pain, as you can't log in to create new workers, and if you don't have an account already you're out of luck until they get the front end to their site working again. However, I'm getting payouts of around 0.075 BTC per day from Hashco.ws, and Middlecoin is typically providing another 0.015 BTC per day. So around 7000KHash/sec is generating 0.09 BTC daily, or close to $70 per day in income. Power costs are around $400 per month for my systems, but modern R9 builds should be more like $200-$250. Net income per month thus works out to $1500-$2250.

Thursday, December 26, 2013

Hashcows Christmas Eve Hack -- What Now?

I've been around the BTC world for a while now, and people running off with your coins is far from unusual. I lost about 50 BTC in the implosion of Bitcoinica, and I witnessed all the PirateAt40 shenanigans, for example, and there have been more than a few collapsed exchanges and pools. When things go wrong, everyone starts by talking a good game -- "We'll figure out what went wrong and then reimburse people as we're able!" A few days turns into a few weeks, then a month, and then suddenly silence. Then maybe a final message saying, "We're almost done and will reimburse next week..." and that's it.

So what's going to happen with Hashco.ws? At first I thought they might just fix a minor security flaw and then move on, maybe with some 0% fees for those that had BTC stolen, or maybe paying out refunds as they were able. After all, we're "only" talking about a 40BTC heist, give or take. However, 40BTC is still worth roughly $30,000 so for two guys running a pool that could represent a lot of money. And if they can't actually fix the security vulnerability properly, calling it quits might be best.

At present, the Hashco.ws site is in "read-only mode" for BTC withdrawals, and if you weren't actively logged in at the time the site went into lock down, you can't see your balances, workers, etc. I'm lucky in that I have a PC that was logged in, so I can see what's going on. I have nearly 0.40 BTC in earnings I haven't not yet collected, and I'm certainly worried that I may never be able to collect. Not surprisingly, my choice has been to move my mining operations elsewhere on most of my systems -- Middlecoin is my poison of choice for now, so we'll see how that goes.

I wish those involved with Hashco.ws the best of luck, and I really hope they can rectify the problems and get the site back up and running, but even though my current estimated payout per day is looking quite good (something like 0.02 BTC per MHash), I'm not going to risk mining there until they're running properly, with working logins and payouts. I'd suggest at the very least diversifying your mining portfolio in the short term.

Merry Christmas -- definitely a lousy way to wake up, which is why I'm glad I don't run a mining pool!


Update: Hashco.ws has posted the following as of this evening. It looks like they're trying to do the right thing and cover the losses for most of the miners. How long will it be before the site is back to normal and regains all trust? That's yet to be determined....

As has been mentioned in an earlier update, on December 24th 2013 someone was able to modify the Bitcoin payout addresses of many users of Hashcows, and trigger a manual cashout of current balances. 754 total users (out of a total of 8,142 registered users, 5,000+ of which have a BTC balance > 0) had BTC removed from their accounts, accounting for approximately 14.2% of users who held BTC on Hashcows. A total of 40.7815 BTC was removed and sent to address 13R87ropkDKzDEuVeQoX64kkcLvPWVdTKH. Hashcows staff have followed up with all major exchanges and a number of other large pools to confirm if they had any trace of this address in their systems, which as of this time has not turned up any useful results.

Since the attack was noticed on the 24th, we've placed the site in a locked down read-only mode, and disabled all payouts. While we understand this has caused some frustration among users, not being able to see if their accounts were affected, we felt it was the responsible course of action to take, given we knew we were unable to dedicate the time required to diagnose and address the security issues on Christmas Eve and Christmas Day.

We've been working since this time, both in determining the cause of the attack, and its potential scope, including an external audit of the source code by a trusted 3rd party. At this time the belief is still sql injection, based on the nature of the attack and how it was carried out. However, regardless of the technical results of ongoing audits, 2 things are confirmed. #1 The web instance and the mining/stratum instances are physically seperate. The mining instance remains unnafected by the web based lockdown, which is why mining continues to function as usual. #2 The web front-end is undergoing a rebuild from scratch as we speak, by both myself and another developer, utilizing different technologies, improved security features, and new hardware. We hope to have a basic version of this up in the coming days.

What does this mean in the immediate future? We'd prefer to not turn on write access for the website in its current form, but obviously understand people can't be expected to wait much longer for balances held up by the system (both old balances still intact, and earnings mined over the days since lockdown). We'll be posting a simple tool for people to use, allowing you to login with your credentials, at which point it will send out an email verification link, including your current balance and payment address the site has for you. Once clicked, your balance will be sent to the address specified. If you need to make changes to these details, instructions will be provided on the tool page. We hope to have this posted by tomorrow.

Last but not least, perhaps the question many have been waiting for an answer on. What does Hashcows plan to do about the missing 40 BTC? We've thought long and hard on this, and its obviously one of the most important decisions we'll have made in our short existence as a pool and community. Its a situation and decision that has hung over us throughout the last couple days spent with family.

Hascows will be re-imbursing every miner 100% of losses incurred on earnings made within the last 7 days prior to the incident (Dec 17th's payout inclusive). This means any funds you earned between Dec 17th and Dec 24th that were cashed out of your account by the attacker, will be re-added to your account at Hashcows expense. This payout will recover 100% of losses for 463 of the 754 affected users. For the remaining 291 users, we'll be offering reduced fees of 0.5% for at least the next 60 days to help with any shortfall.

In closing, both aTriz and I want to make a statement on more of a personal level, we have been absolutely stunned by the community that you have all created with this pool. There has been a tremendous amount of support and encouragement through these not so fortunate times and we would personally like to say Thank You. We look forward to the future of this pool while we begin the rebuilding stage which will continue to bring this wonderful community more features, more safety, more support, and more cows!

nearmiss.

Tuesday, December 24, 2013

Building a Linux Litecoin / Scrypt Miner

I've had a few people ask me about this, and while there are other walkthroughs of the process (I owe a serious debt of gratitude to Cryptobadger), many of those are a bit out of date and don't say much about the new R9 290/290X GPUs. So, here's my take on building a Linux system, as of December 24, 2013 -- Merry Christmas Eve!

Fundamentally, getting scrypt mining going under Linux requires a similar process to Windows:
  1. Install Linux (duh)
  2. Install AMD Radeon drivers
  3. Install cgminer or bfgminer (I have used cgminer 3.7.2)
  4. Configure cgminer and launch
  5. Create a startup script so that cgminer automatically launches (i.e. for occasions when the system crashes and restarts, or there's a power outage).
I might need to create a more detailed set of instructions, but if you're mostly familiar with Linux here's the short summary. Before you begin, set your PC (in the BIOS) to automatically turn on when power is restored. How you do this varies by motherboard, but usually press DELETE to get into the BIOS/UEFI screens and look in the Advanced settings. (Email me or post a comment with your specific motherboard model if you need help.) From there...

First, grab the Linux distro you want to use. I've used 64-bit Xubuntu 13.10 (Saucy Salamandar) as it's pretty simple, but others should work fine as well. (You're on your own for installing other distros!) Short summary: create a bootable device with the image (either a CD/DVD or a USB stick), then launch the installer and set things up. You can use a second USB stick as your OS device if you want, but they can really be slow so I recommend an inexpensive 60GB SSD or even a cheap 2.5"/3.5" HDD over a $5-$30 USB stick. (Seriously, you're spending $500 per GPU or whatever; go nuts and spend $50 on a decent boot device! You'll thank me in the long run, as every time you screw up and crash the OS and need to reboot can feel like an eternity...speaking from experience here.)

The setup process is pretty straightforward. About the only thing to note is that you'll want to automatically log in when the OS starts. (This is a total security no-no, but we're not worried about files on the PC -- we just want it to mine!) Once the OS is installed and you log in, you have a couple options. Either never worry about getting updates, or grab them all right now is my advice. (If something goes wrong, you want it to happen now rather than after everything is mining!) Now we're ready to install the AMD drivers and cgminer.

Open a terminal window. Now remove any old drivers:
sudo apt-get -y remove fglrx-updates fglrx-amdcccle-updates fglrx-updates-dev
(sudo will prompt you for the super user password the first time you run it in a terminal windows.)

Download the latest AMD Linux drivers and unpack to your user directory. Then from a terminal window:
sudo chmod +x ~/amd-catalyst*.run
sudo ~/amd-catalyst*.run
(Reboot)
sudo aticonfig --lsa
sudo rm -f /etc/x11/xorg.conf ~/.Xauthority
sudo aticonfig --adapter=all --initial
sudo reboot
(Wait for reboot again...)
At that point you should have all of the necessary AMD drivers installed. Now get cgminer (nothing after 3.8 supports GPUs, so get the last 3.7.2 build), then extract:
wget http://ck.kolivas.org/apps/cgminer/3.7/cgminer-3.7.2-x86_64-built.tar.bz2
tar jxvf cgminer-3.7.2-x86_64-built.tar.bz2
You're almost ready. Now set some items for future use so that you can mine properly. The sudo ln line is to create a link so cgminer knows where to find libudev. (This has been necessary on the latest 13.10 Xubuntu for me, at least.)
export DISPLAY=:0
export GPU_MAX_ALLOC_PERCENT=100
export GPU_USE_SYNC_OBJECTS=1
sudo ln -s /lib/x86_64-linux-gnu/libudev.so.0 /lib/x86_64-linux-gnu/libudev.so.1
exit
(Note that you may have to close and restart a new Terminal session to have the above stick, I think? In Windows, I know you need to open a new command prompt after setx; doesn't hurt to be safe.)

At this point, try running the following just to see if you can mine at all. (You can change to your own pool, or just test this and throw a few uLTC my way in the process):
export DISPLAY=:0
export GPU_MAX_ALLOC_PERCENT=100
export GPU_USE_SYNC_OBJECTS=1
cd ~/cgminer-3.7.2-x86_64-built
./cgminer --scrypt -I 20 --thread-concurrency 24000 -w 256 -g 1 --temp-target 85 --temp-overheat 95 --gpu-fan 40-95 --auto-fan --gpu-engine 875 --gpu-memclock 1425 --gpu-powertune 30 -o stratum01.hashco.ws:8888 -u trogdorjw73.tester -p tester
Assuming that all works okay, you should get around 725-850KHash/sec per GPU, depending on whether you're running R9 290 or R9 290X, as well as some "luck of the draw" on each card. You'll find that some GPUs will do better than others, and that's normal. From here you need to tune the clocks and thread-concurrency to get optimal performance. Note that if you want to exit cgminer, unless you can find a recompiled version to fix the problem, you do NOT want to press "Q" to quit -- it will crash your system and require a hard reset in my experience. Instead, close the terminal window manually to kill off cgminer.

For tuning, generally speaking go for max memclock first, then play with the core clock to find a good value -- often you'll find that if you push the GPU above 900MHz, it will actually be slower than at lower clocks, as AMD's hardware will throttle if it detects too much power or something going through the card(s). When you've got good RAM and GPU clocks, I tune the thread-concurrency in steps of 64. I haven't noticed a huge difference with changing TC, but you might get an extra 2% out of a GPU with the right value.

Of course, the tuning needs to be done for each GPU as well. One thing to try is once cgminer is running, press G (GPU Settings), the C (Change Settings), and from there you can tune the RAM clock and core clock in real-time, on each GPU. So start on GPU 0, and bump the RAM clock up in 25MHz increments from 1425MHz or so. You'll probably eventually cause the system to crash, so back the RAM clock down 25MHz and you're done on that card. Repeat for the other GPUs.

On the engine clocks, start probably closer to 800MHz and let cgminer run for maybe 5-10 minutes to stabilize. Look at the average hash rate for the GPU, and bump the core clock up 25MHz. Let things stabilize again for 5-10 minutes. If performance didn't go up, try the next step, and you'll probably see performance drop, which means you have reached the limits of that particular GPU for RAM and GPU clocks. Move on to the next GPU and repeat the process.

Tuning thread-concurrency unfortunately requires restarting cgminer each time, so I'd find good clocks first and then tune TC as a group. Start at 24000 or so, run cgminer for 5-10 minutes and note the averages for each card. Close out and bump TC up by 64 and run again. Repeat this for probably 10 iterations (20 at most) and you'll usually find a pattern where every five or so steps of 64 you'll see a peak and/or valley in hashing performance on each GPU.

Now just use the best result for each GPU in your cgminer.conf file and do a test run for a few hours. You may find that after the first 5-15 minutes performance will drop some and then stabilize. This is normal, and if you want you can see if you can tweak the settings a bit more to improve performance. (You might need to back off the RAM a bit more as well -- redlining any part of the GPU may end up in lowered performance over time, not to mention the potential for killing the hardware after six months or so.)

Another idea: having a large fan blow air across the GPUs may help out, though be careful with the potential for dust buildup if you do this. When everything is running well in cgminer, generate a conf file for future use. Press S (Settings) and then W (Write config file) and give your file a name (or use the default); I like to use something other than the default so that cgminer doesn't automatically load a config file when I don't expect it, so for my purposes I use cgminer-current.conf.

When everything is running smoothly, you'll also want to set Linux up to auto-launch cgminer on startup. Crytobadger has some scripts that work well enough, which I'll copy here with minor tweaking. First we make a script:
sudo nano mine_scrypt.sh
Paste the following into nano:
#!/bin/sh
export DISPLAY=:0
export GPU_MAX_ALLOC_PERCENT=100
export GPU_USE_SYNC_OBJECTS=1
cd /home/[LINUX USER NAME]/cgminer-3.7.2-x86_64-built
./cgminer --scrypt --auto-fan --failover-only --config cgminer-current.conf
Save and exit (CTRL+O, CTRL+X), then make the script executable:
sudo chmod +x mine_scrypt.sh
If you open a terminal and type "./mine_scrypt.sh" you'll start mining. (Note you can press [TAB] to auto-complete file and directory names, so typing "./mine[tab]" is usually sufficient.) First we need to make sure we have "screen" installed:
sudo apt-get install screen
Now we need to create a second script to start mining when Linux boots:
sudo nano start_mining.sh
Paste the following into nano:
#!/bin/bash
DEFAULT_DELAY=0
if [ "x$1" = "x" -o "x$1" = "xnone" ]; then
   DELAY=$DEFAULT_DELAY
else
   DELAY=$1
fi
sleep $DELAY
su [YOUR LINUX USERNAME] -c "screen -dmS cgm /home/[YOUR LINUX USERNAME]/mine_scrypt.sh"
Save and exit again (CTRL+O, CTRL+X), and make the script (scrypt? Hahaha) executable:
sudo chmod +x start_mining.sh
Now we edit the system config file to automatically call our script:
sudo nano /etc/rc.local
Add the following line just above the "exit 0" line; the 15 is a delay in seconds, so you can use more or less as you see fit:
/home/[YOUR LINUX USERNAME]/start_mining.sh 15 &
Save and exit (CTRL+O, CTRL+X) and you're done. The only catch is that now when you boot Linux, cgminer is running in the background and you can't see it. To bring it to the foreground, open a terminal window and type:
screen -x cgm
You can also make an alias (command shortcut) to open the cgminer window by editing your own .bashrc file ("sudo nano .bashrc") and add the following near the bottom:
alias cgm='screen -x cgm'
When you close the window showing cgminer now, however, cgminer will continue running. To actually kill and restart cgminer, type "ps -A" find the "cgminer" process, and then type "kill -9 [Process ID]". Now you can just type ./mine_scrypt.sh to restart cgminer if you want (e.g. after you tweak the config file).

Is Linux any faster at mining than Windows? I haven't noticed any major difference, so the main draw is that Linux is free. Personally, I continue to use Windows on my PCs, because I'm more familiar with the programs and things like MSI Afterburner are handy. Besides, again we're talking about $89 for Windows 7 64-bit (or $96 for Windows 8.1 64-bit) on a system that has $2000 worth of other hardware. It's less than 5% of the total cost and increases the resale value if you ever decide to stop mining. Anyway, YMMV.

LTC tips: LfCLyykrNFftzpdWejR73hf478ZtBzQ9jE
BTC tips: 1GGJUb1gFpydygpeKzd6oFoShLRUSyThV7

Monday, December 23, 2013

Flashing Radeon HD 7970 GHZ to R9 280X

I'm in perhaps a bit of an unusual situation in that I have a Radeon HD 7970 GHz Edition GPU, direct from AMD. The Vendor ID is 1002 and the Subsystem ID is 3000. The VRM on this card identifies as CHL822x and the memory is Hynix H5GQ2H24AFR. Looking through TechPowerUp's VBIOS catelog, I kept looking for VBIOS that would provided decent hashing performance from this card. Previously, I only managed to hash at around 510-520KHash/sec, which is quite low for a 7970, but the problem appears to be with most 7970 GHz Edition cards. The solution is to flash to a non-GHz Edition -- if you can!

I tried numerous VBIOS options from a variety of vendors -- ASUS, Sapphire, Gigabyte, XFX, etc. -- all to no avail. I had to force-flash most of these, due to a Subsytem ID mismatch, and not surprisingly several of the VBIOS options I tried ended up requiring me to boot up off a different GPU to recover to a working VBIOS. Up until last night, I was met with zero success -- the Sapphire VBIOS I tried flashed successfully and I could usually boot into Windows, but I would get a BSOD any time I tried to tax the GPU.

As you might guess from the title, the solution for me ended up being to flash to a Radeon R9 280X VBIOS. I still had to force flash (ATIWinFlash.exe -f -p 0 R9280X.rom), but the Vendor ID was 1002 and the Subsystem ID was 3001, so I figured I had a good chance of succeeding...and it worked! Thank goodness -- no more of this 500KHash silliness for my 7970 GHz card!

If you're having a similar problem, most likely you're in the same situation and have one of the "not very fast for scrypt" GHz Edition/Overclocked cards. You'll probably have to try more than one VBIOS before you can find one that works, but don't lose hope! Symptoms of the problem are that your 7970 will actually hash slower at intensities above 13, plus as noted the inability to break 600KHash, let alone 700KHash. Here's what I was running prior to the flash:
cgminer.exe --auto-fan --failover-only --scrypt -o stratum01.hashco.ws:8888 -u trogdorjw73.tester -p tester -I 13 --gpu-fan 40-95 --gpu-engine 1050 --gpu-memclock 1550 --gpu-vddc 1.170 --thread-concurrency 24160 -g 1 --temp-target 85 --temp-overheat 95 --temp-cutoff 100
With that configuration and the original VBIOS I was pulling 510KHash, and I really couldn't get it to run any better. With the update to an R9 280X VBIOS, I'm now pulling around 700KHash with the same settings but I 20. That makes for decent hashing but a totally useless system if you need to do anything else, but the 7970 (R9 280X) has an interesting quirk: you can often get equal or better hash rates at lower intensities with -g 2 and a lower thread concurrency. Here are my current "usable PC" settings (and note that the GPU core is now clocked at 1000MHz instead of 1050):
cgminer.exe --auto-fan --failover-only --scrypt -o stratum01.hashco.ws:8888 -u trogdorjw73.tester -p tester -I 13 --gpu-fan 40-95 --gpu-engine 1000 --gpu-memclock 1550 --gpu-vddc 1.170 --thread-concurrency 8192 -g 2 --temp-target 85 --temp-overheat 95 --temp-cutoff 100
Hopefully that will help some of you out, and if you have any of the 7970/R9 280X cards you can use similar settings to get over 700KHash. Considering a lot of R9 290 GPUs are topping out at 750-800KHash/sec (at least using their stock VBIOS), and the R9 290 cards are currently selling for over $500 (never mind the $650+ R9 290X cards!), if you can find a reasonable price on the Radeon R9 280X (some are going for $350) or one of the older Radeon HD 7970 cards (these tend to be more expensive, so look for the 280X first!) it's definitely worth considering.

Sunday, December 22, 2013

Radeon R9 290/290X Litecoin Mining: New Settings and Revised Expectations

Over the past several weeks I've had a flood of comments and emails about R9 290/290X hashing performance when mining Litecoins (or any other scrypt-based cryptocurrency). Initial experience with the cards suggests that the Radeon R9 290 can hit up to 900KHash and the Radeon R9 290X can hit 1000KHash, but the key part of that is "up to". In practice, the cards vary, sometimes wildly.

There are a lot of 290X cards that seem to top out in the 800-850KHash range, and short of adding better cooling I'm not sure how much farther you can push them. R9 290 tends to be more like 750-800KHash on a lot of cards. I think if we could get voltage adjustments working, we might be able to improve on those results for a lot of cards, but we probably won't have that for a few more weeks if not months.

One of the keys to understanding what's required for tuning performance on the new Hawaii R9 290/290X cards is that AMD has built in safety protocols to keep the cards running "safely". A lot of people have tried my original settings and come up with far lower performance than expected. This is why I provided batch files to help you tune and tweak performance.

Scrypt hashing by design is far more memory intensive than SHA256 hashing. The idea was to make it impossible or at least impractical to do scrypt hashing on GPUs, let along FPGAs and ASICs. So far, no one has yet released any FPGA or ASIC hardware for scrypt devices, and I suspect we're probably still at least a year away from such hardware becoming publicly available. (There may be early hardware undergoing "testing" for month in China or elsewhere first, of course.) So when you're looking to fine-tune your GPUs, start with the memory clocks and push those as far as you can while maintaining stability -- and maybe add a few extra cooling fans to help out! If you want to hit extremely high hash rates, you'll want the memory clock at 1600MHz or higher, and most cards won't do that without some sort of additional cooling or other modification.

Once you've found the maximum reliable memory clocks for your GPUs, only then should you start tuning the GPU clock speed. What's interesting is that even though most cards will happily accept GPU engine clocks of 1000MHz or higher, in reality they'll often run at far lower clocks -- this is AMD's safety protocols kicking in. So if you start off at 950MHz core and 1350MHz RAM and a thread concurrency of 32000 (give or take), and you find your hash rates are closer to 600 or 700KHash rather than 800-900KHash, don't despair!

Start with a lower GPU clock of around 800MHz (on R9 290/290X) and then start bumping it up 25MHz after about 10 minutes or more testing at each clock speed. You'll most likely find that 850MHz ends up being the sweet spot, and then you can play with clocks a bit more bumping it up/down in 5MHz increments to see if you can squeeze a bit better performance out of your system. When all of that is done, only then should you bother with tweaking your thread concurrency.

And with that said, here are my revised settings for R9 290/290X graphics cards. I'm going to include cgminer settings for four cards as an example this time, just to illustrate what you would use. I've also included three pools, the first two being multi-coin pools, since that's what I use these days. I'm also going to try toying around with BFGminer to see if I can coax anything better out of it. For the time being, these settings are more or less "stable".

cgminer.conf settings for ~810 KHash R9 290X / ~770 KHash R9 290
{
"pools" : [
{
"url" : "http://stratum01.hashco.ws:8888",
"user" : "trogdorjw73.tester",
"pass" : "tester"
},
{
"url" : "stratum+tcp://middlecoin.com:3333",
"user" : "13saHMFfUAv1crYp3QLbFr9aP1JYnb89oh",
"pass" : "x"
},
{
"url" : "http://coinotron.com:3334",
"user" : "trogdorjw73.tester",
"pass" : "tester"
}
]
,
"intensity" : "20,20,20,20",
"worksize" : "256",
"kernel" : "scrypt",
"lookup-gap" : "2",
"thread-concurrency" : "24272,24272,24272,24272",
"gpu-engine" : "850-850,850-850,850-850,850-850",
"gpu-fan" : "45-85,45-85,45-85,45-85",
"gpu-memclock" : "1475,1475,1475,1475",
"gpu-memdiff" : "0,0,0,0",
"gpu-powertune" : "50,50,50,50",
"gpu-vddc" : "1.100,1.100,1.100,1.100",
"temp-cutoff" : "100,100,100,100",
"temp-overheat" : "95,95,95,95",
"temp-target" : "85,85,85,85",
"api-mcast-port" : "4028",
"api-port" : "4028",
"auto-fan" : true,
"expiry" : "120",
"failover-only" : true,
"gpu-dyninterval" : "7",
"gpu-platform" : "1",
"gpu-threads" : "1",
"hotplug" : "5",
"log" : "5",
"no-pool-disable" : true,
"queue" : "1",
"scan-time" : "60",
"scrypt" : true,
"temp-hysteresis" : "3",
"shares" : "0",
"kernel-path" : "/usr/local/bin"
}
And just in case this isn't clear, with the above settings you would launch cgminer.exe with the following command:
cgminer.exe --auto-fan --config cgminer.conf --failover-only

Friday, December 20, 2013

Avoiding the CGminer BSOD/Crash on Exit for R9 290/290X

One of the major annoyances with mining via cgminer on R9 290/290X hardware is that it will hard crash your system when you exit "gracefully" -- by pressing "Q" or "CTRL+C". Some people will tell you that the problem is your clock speeds, or that you're using unstable settings, but this is absolutely false. The reality is that the crash is caused by outdated code in cgminer.

You see, cgminer's developer has decided to stop supporting GPUs. I don't blame him -- he's probably earning a ton of money working on developing and maintaining his program for ASICs, and since he's only one man he can't really keep doing both. But it means that code that worked fine in the past may now have difficulties. And that's exactly what's happening.

With their Hawaii architecture, AMD updated some things for the R9 290/290X. Specifically, they've updated their Overdrive engine from version 5 to 6, which helps with things like preventing the GPUs from frying if you run them too hard. This is part of the reason why you need to carefully tune your mining rigs for each GPU -- one R9 290X may run great at 975/1550 clocks while another will totally fail at those speeds. You can often see that you've pushed the GPU engine clocks too far by watching the clocks in MSI Afterburner; if you've set the engine for 950MHz and it's bouncing around between 800-950MHz, AMD's hardware is doing its job and dropping clocks to reduce power draw and protect the chips. Drop the engine clocks 25MHz (or 50, 75, etc. MHZ) and see if clocks go up. But I digress....

So the problem with R9 290/290X (Hawaii) and BSOD/crash on exit is that cgminer is tying into older software/hardware paths that don't behave quite the same on the latest GPUs. When you exit normally and cgminer tries to release things, there's a glitch and a BSOD is the result. Note that this happens on Windows as well as Linux (though without the BSOD on Linux, obviously), so it's not just an OS problem. But what's the solution?

Update: Forget everything below this point! There's a recompiled version of cgminer available that fixes the problem, and I recommend using it.


[Old text follows so you can see how things have developed.]

Simple: don't use any of cgminer's GPU overclocking and/or temperature monitoring features. That means you have to avoid the following (as far as I can tell):
  • auto-fan
  • gpu-engine
  • gpu-fan
  • gpu-memclock
  • gpu-powertune
  • gpu-vddc
  • temp-cutoff
  • temp-overheat
  • temp-target
Okay, those are easy enough to remove, but there's a problem: without tuning your GPUs, performance, hash rates, temperatures, and stability are all compromised. Yuck. The temperature targets in particular are important, as if you leave AMD's drivers to manage everything you'll have severe throttling. So you need to turn to other utilities to manage temperatures and clocks as best you can...or just live with the inability to do a normal exit from cgminer.

For what it's worth, I'm still using cgminer to control things. I tried playing with MSI Afterburner to get things to work "properly", but getting everything to persist between reboots isn't something I've fully figured out yet. When I do, I'll post instructions.

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?