As an Amazon Associate I earn money from qualifying purchases.

Tuesday, July 1, 2014

Mining CryptoNote Coins with NVIDIA - Settings and Performance

[Update: You can also just use Nicehash, with there auto-switching NiceHashMiner. That's what I'm doing these days, and it pays out in BTC.]

I'm going to assume most people are already aware of the AMD GPU miner for CryptoNote coins, so I'm not going to discuss that for now -- though it's probably worth its own post in the near future. Instead, I want to look at mining CryptoNote coins with NVIDIA hardware, since we now have an open source (thanks TSIV!) version of ccMiner for just that purpose. First things first, grab the Windows binaries (or if you're doing Linux, use the source code and compile it). But now that you have the executable, how do you get it running?

The good news is that all of the CryptoNote coins that I've looked at where you can use a pool just rely on your wallet's address. As Monero is currently the most profitable of the coins (AFAICT), I'm going to use that as my example, but other CryptoNote coins should be similar in practice. Before you can get mining, you'll need the wallet, and you'll want to download and sync with the blockchain. For Monero, that means grabbing the latest files and then running them. Assuming this is your first time running, do the following:

  1. Download the wallet and daemon files and extract them to an appropriate folder (e.g. C:\Mining\Monero).
  2. You'll save yourself a lot of time by downloading the partial blockchain that's available on the main thread -- get the appropriate chain for Windows, OS X, or Linux (64-bit only), or else you'll just need to run the daemon and wait for it to finish syncing (which can take hours the first time). For Windows, put the blockchain.bin file in %AppData%/bitmonero; on Linux/OS X put the blockchain.bin in ~/.bitmonero.
  3. Now start up the bitmonerod.exe daemon and wallet; I use the batch file below to accomplish this. If you want this to auto-start when you boot up the PC, create a shortcut to the batch file and put it in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp
@echo off
tasklist /FI "IMAGENAME eq bitmonerod.exe" 2>NUL | find /I /N "bitmonerod.exe">NUL
if not %ERRORLEVEL% == 0 (
  echo Starting node...
  start /MIN /LOW bitmonerod.exe
) else (
  echo Node already started.
)

tasklist /FI "IMAGENAME eq simplewallet.exe" 2>NUL | find /I /N "simplewallet.exe">NUL
if not %ERRORLEVEL% == 0 (
  if exist wallet.bin.keys (
    echo Starting previous wallet...
    start simplewallet.exe --wallet wallet.bin
  ) else (
    echo Starting new wallet...
    start simplewallet.exe --generate-new-wallet wallet.bin
  )
) else (
  echo Wallet already started.
)
At this point, you should have a wallet, which really is just an EXE that talks to the daemon and can send certain commands. The daemon is in charge of downloading the blockchain and staying in sync with the network, while the wallet holds your coins and had a key (which is password protected, so you need to input the password each time you start the wallet).

To get mining, you need to know your Monero address, so go to the wallet window and type in "address" (without the quotes). Other commands you can use are available by typing "help", and thankfully there are only a few commands you need to know. Now take that address and go to one of the Monero pools -- I'd suggest monero.crypto-pool.fr as the best candidate, though you're free to use others. With that address in hand, and a pool (or two or three) selected, it's time to start mining.

For mining, you now have three options: CPU, AMD GPU, or NVIDIA GPU. The basic settings are similar for each -- you use the miner with the pool address and your wallet address. For CPUs, use the number of CPU cores you have (real cores without Hyper-Threading is usually best on Intel, while for AMD you can use all available cores). For AMD, there's no real configuration to speak of right now -- fire and forget, with the knowledge that you're donating 5% of coins to the developer (Claymore), at least until an open source version becomes available. For NVIDIA, you can just run with the defaults as well, but my whole reason for this post is to tell you not to do that! The default syntax is as follows:
ccminer.exe -l 8x64 -o stratum+tcp://mine.moneropool.org:80 -u 48JM22E3ZfPSoFCukcizpSR2hCsBnAExT4ACvrpYx5czFgEyR12LWwK9JpgYRZKjsRHp8ynDcQegbhCspvjHd7gaL8qbzYy -p x
Okay, the addresses are really long, but the real item you want to pay attention to is the "-l [threads]x[blocks]" setting. Here's what I know: the default setting is 8x40, and on most NVIDIA GPUs that I've tried it absolutely sucks. That may be a bit harsh, but basically it's not doing any sort of tuning so you're going to get anywhere from decent to mediocre to terrible performance, but very likely not optimal performance. On one GPU (GTX 860M), the defaults gave me 50 H/s, but with fine tuning I got up to nearly four times that hash rate. So how do you tune the settings?

I suggest starting by trying to find a good thread setting; anything between 6 and 12 is potentially good, so start with 6x64 and then try 7x64, 8x64, etc. up to 12x64. Find whichever setting gives the best starting performance. Then start trying different values for the blocks setting. I started at 32 and then tried 48, 64, 80, 96, 112, and 128 -- so basically increments of 16. You'll likely find that many of these result in similar performance, but somewhere in that range you should see better results. Choose the two highest results and then try a thread settings half-way between those, and continue narrowing things down until you find what appears to be an optimal setting. It doesn't need to be an even number either, so just give it a whirl. Note that the first score you get will probably be a bit lower than your average hash rate, but it's consistent so if you get 150 H/s and then things level off at 180 H/s, a starting score of 180 H/s will likely reach an average speed of 210 H/s (give or take).

So far everything is simple enough, but there are a few final items to note. First, on most systems running the ccMiner for CryptoNote makes the system useless for doing much else -- it becomes extremely laggy. The exception is if you have a laptop with NVIDIA Optimus, as the Intel iGPU can still happily run the Windows code and stay responsive while your GPU gets pounded. But laptop GPUs are slower, so I don't really recommend that route -- I suppose a desktop with the display connected to the Intel port would also work similarly.

The second item to note is that on most systems I've tried, the NVIDIA drivers will "time out" and give you a crash message. This is Windows basically detecting that the drivers haven't responded properly for a while, and so it stops them and of course your mining quits as well. You can usually get around this via a registry edit, but in some cases even that may not work all the time so be prepared to fiddle around a bit. The registry hack is easy enough:

  1. Run "regedit.exe" from the Start Menu.
  2. Navigate to "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers"
  3. Right-click on the right panel and create a new 32-bit DWORD value.
  4. Name the key "TdrDelay" and assign it a value of anywhere from 10 to 30 (decimal -- 0A to 1E hex).
  5. Reboot and you should be set.
I've found that not all systems give the same hash rates, even with the same clocks, and there's certainly more investigating to be done. Here's what I'm running so far along with the approximate hashing rate, if you're interested. This is listed in order of increasing performance.
  1. GT 750M: -l 8x64 = ~56 H/s
  2. GTX 860M: -l 8x32 = ~200 H/s
  3. GTX 870M: -l 8x63 = ~205 H/s
  4. GTX 780M: -l 7x71 = ~210 H/s
  5. GTX 780M #2: -l 8x72 = ~225 H/s
  6. GTX 880M: -l 8x64 = ~245 H/s
  7. GTX 770: -l 8x72 = ~280 H/s (probably can do better with more tuning)
  8. GTX 780: -l 8x96 = ~380 H/s
As you can see, there's no clear rhyme or reason to what settings will work best, so you'll need to use some trial and error to figure it out. There are also some real oddities, for example the GTX 780 is rocking along at 380 H/s but I can't get anywhere close to that with the GTX 770 -- in theory, the 780 is only about 25% faster, but here I'm seeing a 35% increase. Maxwell also does reasonably well on the laptop side of things, bringing in 200 H/s despite being in theory quite a bit slower than GTX 870M and 780M.

What's interesting is that for desktop GPUs, most people are talking about getting around 260-280 H/s with the GTX 750 Ti, a Maxwell GPU with 640 cores running at 1020 MHz. The GTX 760M by comparison is the same 640 cores at a similar clock speed, but I can't get the same level of performance. The faster desktop VRAM (5.4GHz vs. 5GHz) might help some, but unless people are doing some decent overclocking to hit 260+ H/s I don't know why there's such a gap.

Obviously, TSIV and others are going to continue to improve performance over time, so I don't expect things to end at the above results, and I also suspect we'll see some auto-tuning implemented at some point. In the meantime, just know that for many of the GPUs I've played around with, specifying a launch configuration isn't just helpful, it's absolutely necessary.

Donations are welcome:
XMR: 48JM22E3ZfPSoFCukcizpSR2hCsBnAExT4ACvrpYx5czFgEyR12LWwK9JpgYRZKjsRHp8ynDcQegbhCspvjHd7gaL8qbzYy
BTC: 153qS9Ze32hnV3fwirZLWNka4wBAowc21E


If you like reading these blog posts but don't want to subscribe to my thrice-weekly newsletter, please consider making purchases through my Amazon Affiliate links!

Thursday, June 19, 2014

Piggycoin 2.0: How Far Can a Good Wallet Take You?

I'm not going to do a full deep dive on Piggycoin right now, but Piggycoin has so many similarities to other coins that I felt it was worht a discussion at least. You see, recently the original PIG was converted into PIGGY (at 1:1 trading), switching from Scrypt PoW to X11 with Proof of Stake. CAI/CAIx basically pioneered this sort of "bait and switch", and it worked... well, it more or less worked, but CAIx isn't exactly the hottest cryptocurrency right now. (DRK or XMR on the other hand...but those are topics I cover in my newsletter so I won't spoil them here.) Anyway, here are the quick specs for the two versions of Piggycoin, starting with the initial release:

Piggycoin 1.0 Specifications (6/19/2014)
SymbolPIG
Launch Date2014-02-25
Proof of WorkScrypt
Starting Difficulty0.000244 (ugh)
Block Time2 minutes
Block Reward4,000
Premine1% (21 million)
IPONo
Difficulty AdjustmentEvery 120 blocks initially
KGW from block 2000
Reward AdjustmentNever? (Changed to 62500 at some point)
Max Coins2.1 billion at ~729 days
Forum ThreadsBitcointalk (Old Thread!)
Block ExplorerYes (Alternate)

Note that the block explorers for PIG may shut down in the future. Also, the block reward was changed at one point, but then it appears it changed back, as blocks 62500 through 62827 have a reward of 0. My guess is there's a group of users that want to stay on the original PIG, but I don't see it going anywhere as all of the exchanges have converted to PIGGY. Anyway, the original design seemed a bit...lacking, and the code was changed a few times in the early going, so when it was altered most felt it was for the best. Here's the new version.

Piggycoin 2.0 Specifications (6/19/2014)
SymbolPIGGY
Launch Date2014-06-10
Proof of WorkX11
Starting Difficulty0.00024414
Block Time1 minute
Block Reward23,700 for PoW
15% for PoS
Proof of Stake8 hours minimum staking age
Unlimited maximum stake age
Premine1% (265,353,096 added to previous 21M in block 3)
IPONo
Difficulty AdjustmentEvery block
Reward Adjustment10,000 PoW blocks before PoS
Max Coins500 million at ~7 days
+75 million per year indefinitely
Forum ThreadsBitcointalk
Block ExplorerOfficial

Honestly, there's still not a whole lot that would make me look at PIGGY and say, "Wow! There's a coin that's going places!" But here's the thing: they've done a decent amount of work on the GUI wallet to make it more useful, and they also have an Android wallet app, as an added bonus. So how much is that worth? I have no idea really, but right now the price of around 30 satoshi seems rather low. I mean, DOGE doesn't have much going for it these days and there are already 83+ billion DOGE, each worth twice as much as a PIGGY.

And let's not forget the cute piggy bank. Will this coin really teach children anything about investing? Probably not, but I figure I can keep my PIGGY and earn 15% per year -- as long as the network keeps going. When my two year old enters college in 16 years, I will have about ten times as many PIGGY as I do right now. Which means if I currently have the equivalent of about 0.066 BTC of PIGGY, the $40 I "save" today could be worth a whopping $400 in sixteen years. Good luck finding a college that costs less than that! There's also the Piggycoin Foundation, which is undertaking charitable goals. Right now they're gathering PIGGY to buy bikes, but what that usually means is they take PIGGY, convert it to BTC, then convert that to fiat, and then donate the fiat.

Let's just hope that the price doesn't collapse -- and perhaps even goes up. And let's hope the network keeps going. And let's also hope the exchanges keep accepting PIGGY and don't forget about it as hundreds of new coins flood the network. Need I go on?

In truth, my outlook for PIGGY isn't too promising. Other than the improved wallet (see above), there's little to differentiate it from all the other PoW->PoS coins. 15% is at least a decent interest rate, but there's a very real chance the price of PIGGY will fall more than 15% per year. Restarting as a new coin also doesn't lend me confidence in the developers -- will Piggycoin 3.0 switch to a new PoW algorithm in a few more months? Let's hope not!

What I'd like to see from PIGGY right now is a better integrated ABE-styble block explorer, that shows difficulty, block reward, value, transactions, etc. instead of just some raw hashes. And if you really want to take things to the next level, integrate a way for users to trade PIGGY for BTC directly in the wallet -- have an internal exchange that runs on top of the network and doesn't require any intermediaries! That would be sweet, though I'm not sure how you tie that in to BTC exactly, and more likely than not you'd have hackers compromise the network at least a few times before everything worked properly.

Anyway, good luck my little PIGGY -- I expect big things of you, and we'll see if my children are actually able to use you when they hit college in 15 or so years. And if you'd like to donate to their PIGGY college fund, I promise I won't move the coins anywhere: pWf3PEfPuxRwed5dNtutrWndUZckXYdP8r


If you like reading these blog posts but don't want to subscribe to my thrice-weekly newsletter, please consider making purchases through my Amazon Affiliate links!

Friday, June 6, 2014

Dogecoin Specifications

Coin number four in my list of coin specifications is something I've talked about before, so I'm not going to beat a dead horse too much. No, I'm going to beat a dead dog instead! Dogecoin (DOGE) is near the top of the total market cap for cryptocurrencies, and it was at least "fairly mined" -- which is why I've skipped NXT and Ripple for now. But "fair" is somewhat relative, and the biggest claim to fame for DOGE is that what started as a joke on an Internet meme became big money. At one point I think the total hashing power dedicated to DOGE actually surpassed LTC, but that's no longer the case -- it's not even close, as LTC has over 6X more hashing power these days. So, sanity is at least prevailing in that sense, and DOGE is generally not as profitable to mine as LTC now.

So what's the real problem with DOGE? Quite simply: it was a joke, and there are too many coins, too fast, for the market to sustain prices. The DOGE/BTC has been on a slow but steady decline for months now, and even the drop in block rewards has only slightly delayed things. Where will it finally settle? That's a difficult question to answer, but I'd be surprised to see DOGE go back over 100 satoshi. There are simply so many other -- often more sensible, serious -- coins around. But here's the quick summary:

Dogecoin Specifications (6/6/2014)
SymbolDOGE
Launch Date2013-12-07
Proof of WorkScrypt
Starting Difficulty0.000244140625
Block Time1 minute
Block Reward~500,000 (1-1 million, random) initially
250,000 static from block 145000
Difficulty AdjustmentPrior to block 145,000: 240 blocks
After block 145,000: DigiShield
Reward AdjustmentHalving every 100,000 blocks (~69 days)
Minimum reward: 10,000
Max Coins~100 billion at 1.5 years
+5.25 billion per year indefinitely
Forum ThreadsBitcointalk - no longer updated regularly
Reddit - the usual chaos of Reddit
Block ExplorerOfficial with many alternatives

General Points of Interest:

DOGE hearkens back to an earlier time in cryptocurrencies, before multi-pools were online and coin hopping was only something the really dedicated miners really bothered doing. As such, the starting difficulty and block adjustment times were both rather conservative, but even so it only took about two days before things were more or less sensible -- at least, as sensible as anything could be with DOGE. After a slightly slow start, the meme caught hold and people started going crazy. Anecdotally, some of the early miners were able to make several BTC off of relatively modest GPU mining configurations. Once DOGE showed up on some exchanges, things started to level off, but it was still about 2-3X the profitability of mining LTC for quite some time.

As the mining scene developed, DOGE was hit pretty hard by multipools dumping coins, jumping on and off the "bandwagon", pools cherry-picking the most profitable blocks, etc. You see, the block reward was supposed to be truly random, but I'm not sure that was always the case, and evidently the developers didn't feel the long-term prospects of random block rewards were working out. The core code was eventually changed, and starting at block 145,000 the block reward became static (250,000 DOGE, halving every 100K blocks) and the difficulty adjustment algorithm was changed to DigiShield so that it adjusts every block.

Other changes have occurred as well, but after a major pump and dump that took the price to around 280 satoshi before it started dropping, DOGE has quieted down a lot. Many other coins have tried to copy DOGE's early success, but most have turned into abject failures -- EMU, PANDA, and many others have come and (mostly) gone now. Everyone had fun with DOGE and it got carried into the range of profitability and never really let go of that, but the copycats are not meeting with the same level of success and the problems with the core design are becoming more obvious.

First, there's the number of coins being created. Prior to DOGE, most cryptocurrencies tended to have a maximum number of coins somewhere south of 100 million, or perhaps 1 billion. DOGE tosses that out the window and goes for over 100 billion coins in just one year! What's more, with no ultimate cap on the number of DOGE that will be created through mining, the long-term prospects become even worse. 5% "inflation" per year generally isn't sustainable for a fiat currency, and it's certainly not working for DOGE right now.

At present, DOGE is nearing the 50 satoshi mark, and the market capitalization is only about 10% of LTC (after being nearly equal at the height of DOGE mania). LTC meanwhile is about 4% of the market capitalization of BTC. What that means is all of the DOGE currently available -- which is a rather large number at over 81 billion and counting! -- is only worth about 0.35% of the total BTC currently available. Now add to that the fact that there are over 6300 times as many DOGE in existence as BTC (and where BTC is now over five years old, DOGE is only six months old) and you have to wonder why DOGE should ever recover. Every day we get around 3600 more BTC mined, compared to generating 180 million DOGE -- or the rate of DOGE creation is 50,000 times higher than the rate of BTC. Until DOGE finally hits the 10K block rewards -- which will be in another six months -- I expect the value of DOGE to continue to drop.

Long-term prospects for DOGE are pretty weak, and the only thing that might save the coin is all the Scrypt ASICs coming online. They can't all mine LTC, can they? Well, actually they could, but they won't -- some SHA256 ASICs are still used for alternate cryptocurrencies, after all. I don't think DOGE will ever hit the point where it's valued at less than 1 satoshi, and in fact 10 satoshi is probably a reasonable minimum, but with the number of coins and the rate of blocks being so much higher than BTC and LTC, the market is flooded and this joke has run its course. Trying to turn that joke into something serious isn't funny either, so I'm pretty much done with DOGE now -- I just have to sell off my final 150K.


If you like reading these blog posts but don't want to subscribe to my thrice-weekly newsletter, please consider making purchases through my Amazon Affiliate links!

Scrypt ASICs Update

I want to revisit the topic of Scrypt ASICs. The reason for this is two-fold: first, mining income from Scrypt mining with GPUs is basically at (or just above) the break even point right now for most of the major coins, and that's only if you happen to have someone inexpensive power. Second and perhaps more importantly, Alpha Technologies sent out an email stating they are now entering the final 60 days of development on their Scrypt Viper ASICs, and thus the call has come for the final 70% payment from those that pre-ordered. As I mentioned a while back, I went in 50-50 with a good friend on one of the then-25MH Viper ASICs, and while I was nervous I figured it was worth the chance.

The payment request is sort of a good news/bad news scenario, unfortunately. The good news is that the ASICs are nearly done, right? The bad news is that some of the stuff surrounding the final couple of months is sounding all too familiar to me. I remember the Butterfly Labs fiasco, and while they did eventually ship the products and they delivered the expected/promised performance, it took so much longer to ship that even the somewhat early orders basically got hardware that hardly mattered on arrival. Today, 5GH of SHA256 hashing power is practically worthless, and even with power requirements of "only" 40W or so (which is a far cry from their earlier target of <5W), at the current difficulty level you would net around $2 per month.

The reason I mention Butterfly Labs is that, despite better communication, Alpha Technologies is basically unproven as far as cryptocurrency mining hardware is concerned. And what really makes me nervous is that they've gone from 25MH to 90MH (5 to 18MH on the lesser Viper), and now they've pushed the limits of credibility by promising 250MH (50MH for the small Viper)! I don't want to look a gift horse in the mouth, but we're now talking about a 10X increase in performance over the initial specs, all "due to increased competition". The competition of course comes from various places: KnCMiner, a company that has at least proven capable of delivering SHA256 ASICs in quantity, is offering 300MH for $10000. That's good but other companies are already shipping, including Gridseed (from various sources), Innosilicon, and Zeusminer.

While it's possible that A-Tech has managed to improve performance dramatically, much of the increase comes from trimming "extra" features like an integrated LCD display and doubling the number of ASICs instead -- all with a higher power requirement and a larger chassis of course. Ultimately they are giving away a lot of "free" extra performance to batch one customers. If they deliver that will generate a lot of good will, but there's a second possibility. Let's assume you have a bunch of preorders, and you've been paid a lot of money but still have costs and you need to get more money to finish the project. What do you do? Well, you can't really tell your customers, "Oops...we underestimated our initial costs; please pony up so we can finish!" So instead you tell them that you're "nearly ready to ship -- please remit the final 70% of your payment." And to further entice everyone to pay as quickly as possible, you then nearly triple the promised performance of a product where you already increased performance by 3.6X!

I really, really hope that they aren't going to disappear into the night with all the money from their customers, but let's be real: it wouldn't be the first time something like that happened in the world of cryptocurrencies! The size and power requirements of course have jumped, so what was going to be a 1U 25MH system became a 4U 90MH system, and now it will apparently be something like an 8U 250MH system... and it will require nearly 2000W (via three 750W PSUs last I heard)! It's a gamble still, as are all of the other non-shipping Scrypt ASICs, and if I lose it will hurt -- but thankfully income from other cryptocurrencies has basically got me covered.

Now with that all out of the way, let's talk about the performance and cost of running these Scrypt ASICs compared to standard GPU mining. This is why Scrypt GPU mining is about to die (assuming the ASICs are actually delivered). We'll start with my standard mining rig (3xR9 280X), then look at the ASICs from Gridseed, Innosilicon and Zeusminer (these are shipping; Gridseed is readily available, and the other two are both shipping as well now), and wrapping up with Alpha-Technologies and KnCMiner (not shipping yet).

Graphics Mining (3x280X):
Hash Rate: ~2.1MH
Power: ~750W
Price: ~$1500 for a complete system
Efficiency: 2.8KH per Watt
Daily Income: $2.60 (LTC)
Power Cost: $1.80

Gridseed Specs:
Hash Rate: ~70KH per chip, 300KH per "mini USB miner"
Power: ~1.3W per chip, ~7W for mini USB (~60W if hashing 9GH SHA256 as well)
Price: $1079 for a 5.2MH 80-chip blade that draws 140W
Efficiency: 37KH per Watt
Daily Income: $6.47 (LTC)
Power Cost: $0.34

Innosilicon A2:
Hash Rate: 86MH
Power: ~550W (?)
Price: ~$12000 for a complete system
Efficiency: 156.4KH per Watt
Daily Income: $107 (LTC)
Power Cost: $1.32

Zeusminer Thunder X3:
Hash Rate: ~28MH
Power: ~1050W
Price: ~$3100 (no PSU?)
Efficiency: 26.7KH per Watt
Daily Income: $35 (LTC)
Power Cost: $2.52

A-Tech Viper (250MH):
Hash Rate: 250MH
Power: ~1900W (?)
Price: ~$10000 for a complete system
Efficiency: 131.6KH per Watt
Daily Income: $312 (LTC)
Power Cost: $4.56

KnCMiner Titan:
Hash Rate: 300MH
Power: Unknown? (1500W?)
Price: $10000 (no PSU)
Efficiency: 200KH per Watt
Daily Income: $373 (LTC)
Power Cost: $3.60

So first things first, in terms of efficiency even the Gridseed ASISs are about 13x what you'll get from a good GPU mining rig. The Zeusminer is actually the least efficient ASIC and it's still 10X what you'll get from GPUs. Move to the Innosilicon and A-Tech and we're looking at around 50X better efficiency, while if my power guess on the Titan is accurate we're talking over 70X more efficient mining compared to GPUs. When these ASICs arrive en force, GPU mining for Scrypt basically dies, and it will die fast. The only "good" news is that the initial ramp up in production means it will take a bit longer before things really escalate, and as I've mentioned in the past, GPUs can still be used for other algorithms -- Scrypt-N, Scrypt-Jane, X11, X13, etc.

There's another aspect we need to discuss, of course: how long to recover your investment with these ASICs? Well, assuming income remains constant (which is way better than any realistic best-case scenario), we're looking at nearly six months for the Gridseed, 113 days for the Innosilicon, 95 days for the Zeusminer... and if it really delivers, only 32.5 days for the Viper 250MH! KnC Titan would be the best result of course, given it's the highest hash rate, paying you back in around 27 days, but we're still likely three or more months away from the Titan shipping. Of course, by the time the Viper and Titan ship, I suspect profitability of Scrypt mining might be down another 50% or more, but even if it's 60 days to break even I'll be quite happy.

The only problem is whether or not the darn things actually ship in July (or 2014 if they pull a Butterfly Labs). Let's just hope that doesn't happen.... And if you didn't take a chance on a Scrypt ASIC six months back, now you can be sad... and glad at the same time that you're not out $10,000 and wondering whether you'll actually receive the promised hardware -- on time or perhaps ever.


If you like reading these blog posts but don't want to subscribe to my thrice-weekly newsletter, please consider making purchases through my Amazon Affiliate links!

Friday, May 30, 2014

Darkcoin Specifications

Next up is one of the current trendy cryptocurrencies, Darkcoin (DRK). I happened to stumble upon DRK at the right time and mined thousands of coins in a relatively short period, which I then held for a while as I saw the potential in what DRK was promising -- specifically, a coin built around anonymous transactions (or at least, more anonymous than the standard BTC transactions). The other reason for mining DRK was that it was the first X11 PoW algorithm, and at the time it was CPU-only. There have been additional attempts at "CPU only" coins before and after DRK, and in most cases the all of the algorithms have been successfully ported to GPUs. The reality is that as GPUs become increasingly programmable, it becomes essentially impossible to create something that absolutely cannot be run on a GPU; whether or not an algorithm can be truly efficient on a GPU is another matter. Anyway, let's start with the core specs.
Darkcoin Specifications (5/30/2014)
SymbolDRK
Launch Date2014-01-19
Proof of WorkX11
Starting Difficulty0.0002421875
Block Time2.5 minutes
Block RewardVariable by difficulty - see below
Difficulty AdjustmentDark Gravity Wave (DGW) - see below
Reward AdjustmentSubsidy decreases 7% yearly (every 210240 blocks)
Max Coins~22 million
Block ExplorerYes (Alternate)
OtherDarksend anonymous transactions (WIP)
Masternodes (earn coins for participating in network)

General Points of Interest

So there are many items to cover with Darkcoin, and one of the things that needs to be stated up front is that DRK has gone through a number of changes since it first launched. You can argue for or against any of the changes, but at this point "it is what it is". On the one hand, I like that DRK has a very active developer -- what you would call a "benevolent dictator" as he basically decides what happens with DRK, and so far the community has been willing to follow along. On the other hand, there have been a lot of little hiccups along the way, resulting in quite a few hard forks of DRK to recover from various problems. If DRK were more open about their source, and let the community check the changes before committing to them, some of this could be avoided...but then there would simply be different problems like the "designed by committee" approach of other coins. But let's start with the block reward, as that's a good example of what I'm getting at.

Block Rewards

Initially, the block reward for DRK was supposed to "follow Moore's curve" -- so basically it would decrease as the hashing power and difficulty increased. The initial formula was used until block 5465, at which point it was changed to better deal with the rapidly increasing difficulty. There have been three block reward formulas used, and they apply as follows (and note that "Difficulty" refers to the difficulty of the previous block, not the block being mined):
  1. Blocks 0-5464:
    Reward = 1111 / (Difficulty + 1)2
    Minimum reward of 1, maximum of 500
     
  2. Blocks 5465-17000:
    Reward = 11111 / ((Difficulty + 51)/6)2
    Minimum reward of 25, maximum of 500
     
  3. Blocks 17000+ with difficulty > 75:
    Reward = 2222222 / ((Difficulty + 2600)/9)2
    Minimum reward of 5, maximum of 25
     
  4. Blocks 24000+:
    Reward = 2222222 / ((Difficulty + 2600)/9)2
    Minimum reward of 5, maximum of 25
The first reward option basically resulted in the block reward dropping too fast. At difficulty of less than 0.5 the reward was close to 500, but a doubling in difficulty to 1.0 drops the reward in half, and doubling again drops the reward roughly in half again. The problem is that while this would follow Moore's Curves and half the reward for every doubling of computation power, it also halves the reward if the number of miners doubles. It became clear early on that difficulty was scaling much faster than expected, and the total number of DRK generated in the first several years would end up being very low -- so the early miners would receive a lot higher percentage than latecomers. Basically, any difficulty higher than 32 would result in a block reward of 1 DRK.

The second option assumed GPU miners wouldn't appear until some time after block 17000, and it provided for an alternate reward scheme. From block 5465 to 17000, the reward was changed pay substantially more. Any difficulty greater than ~75 would result in a block reward of 25 DRK, while lower difficulties could pay up to 500. In practice, the difficulty ranged from a low of around 3 to a high of around 35, which means block rewards ranged from a high of 137 to a low of 50 DRK. Had DRK stayed with the original formula, there would be a lot less DRK right now (or a lot less DRK miners).

The third and fourth options are basically the same, except prior to block 24000 there was a requirement that the difficulty be more than 75 to trigger this final reward structure. If the second reward structure paid out too many DRK, the final option perhaps pays out too few. Now the maximum reward is dropped to 25 and the minimum to 5 DRK. At difficulty 75, the second and third options pay about the same amount (~25 DRK), but where the second option is bottomed out, the third allows a slow decline to much lower block rewards. Now a doubling of difficulty (from 75 to 150) only drops the reward from 25 to 23. Double again (to 300) and the reward is 21. In practice, every doubling of difficulty drops the reward by ~2 DRK. The minimum reward of 5 DRK per block is reached if difficulty exceeds 2877, which is generally the case now.

As a final note on block rewards, they will decrease 7% annually, which means if DRK stays close to the current difficulty (or higher), we'll go from 5.0 DRK block rewards to 4.65, 4.32, 4.02... which means when DRK is about 22 years old the block rewards will be 1 DRK. Also note that while the min 5/max 25 values are integers, at the block reduction we'll start seeing non-integer block rewards.

Difficulty: [Oops!] -> KGW -> DGW

Next up, let's talk about difficulty. DRK originally launched with a "normal" difficulty adjustment algorithm where the difficulty was changed every 576 blocks. Pool/coin hopping has become such a problem that this was no longer viable, so starting at block 15200 DRK began using the Kimoto's Gravity Well (KGW) algorithm. There were a few problems with KGW, so a new adjustment algorithm was created called Dark Gravity Well (DGW), and this went into effect at block 34140. The goal was to better deal with difficulty adjustments as well as to avoid some bugs/errors that KGW could expose. Apparently DGW v2 (DGW v1 was never used) also had some issues as it was tweaked again (DGW v3) starting at block 68589. I haven't dug into the code or the issues enough to say for certain what was going on, but in general the difficulty of DRK now deals well enough with coin hopping.

What About X11 PoW?

Now we get to the really interesting debate: how good is the X11 Proof of Work algorithm? Initially designed to be "GPU Proof" or at least "GPU Resistant", that obviously didn't last too long. However, it's worth noting that at present, the speedup from using a fast GPU (e.g. R9 280X) compared to a fast CPU (e.g. i7-4770K) is only around 5X, and what's more that's drawing about three times as much power for the GPU as the CPU. I've measured mining speeds with the latest x11mod sgminer of around 3MH/s for 280X and it draws ~225W, where an i7-4770X will do around 560KH and draw ~75W. So that means GPU mining of X11 is only about twice as efficient (perhaps less) as CPU mining. Compare that with Scrypt where the same CPU and GPU would do around 40KH and 700KH; the GPU is about 17.5X faster and still only uses 3X as much power, so it's nearly six times as efficient.

Okay, but what about ASICs -- Scrypt has ASICs and even faster ASICs will be out soon. Is X11 truly "ASIC resistant"? The answer to that can be a bit technical, but the short summary is that, no, X11 is not ASIC resistant any more than Scrypt is ASIC-resistant. The reason we now have people making Scrypt ASICs is that Scrypt became popular and profitable to mine. With the recent climb in DRK pricing -- and the proliferation of other X11-based coins -- it's more a question of "when" as opposed to "if" we'll see X11 ASICs.

"But there are eleven different hashing algorithms! Surely an ASIC can't do all eleven!" Why not? GPUs were able to run all eleven algorithms once people took the time to write the necessary code, and anything that can be done in software can be done faster in hardware. It's simply a matter of cost/benefit analysis. What's more, you could argue that the eleven hashing functions in X11 are actually less memory hard (i.e. constrained by RAM capacity and speed) than Scrypt/Scrypt-N, and they could be pipelined quite nicely. So instead of one general ASIC that tries to do all eleven functions, you make one ASIC each for blake, bmw, groestl, jh, keccak, skein, luffa, cubehash, shavite, simd, and echo. As far as I can tell, not a single one of those hashing functions is any more ASIC-resistant than Scrypt, and arguably less so. Thus, the difficulty is in making ASICs to support those eleven functions, but there's probably some overlap in the hashing functions as well which means in reality you might only need to implement a few different ASICs.

So really, the problem is hardly insurmountable and the only real factor in creating X11 ASICs is a matter of time and resources. Anything that can be done faster on a GPU than a CPU is very likely to port well to an ASIC, if there's a financial incentive to do so. If X11 continues to gain in popularity, I suspect we'll see the first announcement of X11 ASICs before the end of 2014, with the first X11 ASICs shipping in 2015. But here's the important thing to remember: ASICs didn't kill Bitcoin or SHA256 coins, they're not going to kill Scrypt coins, and they won't kill X11 either! They'll merely change the mining game, though of course that means a less decentralized cryptocurrency landscape.

Anonymity and Masternodes

Two of the big promises that people are looking forward to with DRK are the Darksend "anonymous transactions" feature and Masternodes. Darksend is basically a mixing service built into the wallet where you send DRK to Masternodes and your transactions are grouped together with a bunch of other transactions and thus obfuscated. It's not truly anonymous, but it will hide you identity much more than normal BTC-style blockchain transactions. It's funny that this major feature of DRK wasn't even functional or in any way present when the coin launched, but it continues to get a lot of attention.

Meanwhile the Masternodes are a new item where you can receive a percentage of the transactions you process if you're running as a Masternode. Except, the Masternodes code has introduced other bugs and problems and has now been pushed back twice. There's also the worry that people running as a Masternode could behave in a network-hostile manner and try to steal coins. Suffice it to say that there are many hurdles to overcome and we've already seen three hard forks thanks to Masternodes. On the bright side (maybe?), the latest version of the Darkcoin wallet is supposed to have a new mechanism that allows changes without a hard fork. Hopefully that doesn't result in more hard forking down the road....

Summary and Future Outlook

While the history of DRK is certainly a bit checkered, as with most cryptocurrencies I look at the overall "belief" factor. Lots of people believe in BTC and billions of dollars have gone into the BTC ecosystem; the same is true of LTC, though with more like millions instead of billions invested. DRK has recently picked up momentum and is currently the second most traded coin, with only BTC surpassing it, though LTC is still within striking distance. After a run up from 0.0014 BTC to a high of 0.0285 BTC in the past two months, DRK has now backed down a bit into the 0.015-0.02 BTC range.

I suspect in the coming months we'll see continued interest in Darksend and Masternodes, and given the projected coin supply it's entirely possible that DRK could end up being valued at ~4X LTC (assuming a similar overall market cap). I've had a knack for trading my DRK just before the price jumps, but I've held onto 20% of the DRK I mined early on and I doubt I'll be liquidating that asset any time soon. In fact, I actually bought back into DRK after the price dropped below 0.02, and I'm betting I can sell at greater than 0.04 BTC before the end of they year -- and very likely before the end of the summer.


If you like reading these blog posts but don't want to subscribe to my thrice-weekly newsletter, please consider making purchases through my Amazon Affiliate links!

Thursday, May 29, 2014

Litecoin Specifications

Bitcoin is very likely "too big to fail", but not far behind BTC is the next biggest cryptocurrency: Litecoin (LTC). This is the "original" alt-coin, and by that I mean the first major alt-coin that didn't just use the same SHA256 algorithm as Bitcoin -- and I suppose I should also add the caveat that the coin has also proven successful (as there might be one or two other alt-coins that came before LTC but didn't reach the same level of success/acceptance). Let's start with the quick summary:

Litecoin Specifications (5/29/2014)
SymbolLTC
Launch Date2011-10-08
Proof of WorkScrypt
Starting Difficulty0.00024414
Block Time2.5 minutes
Block Reward50
Difficulty Adjustment2016 blocks
Reward AdjustmentHalving every 840,000 blocks (~4 years)
Max Coins84 million
Block ExplorerYes (with several alternates)

General Points of Interest:

The initial starting difficulty of Litecoin was far too low, resulting in "instamining" -- instead of blocks coming on average every 2.5 minutes, after the genesis block and block 1, Litecoin was released to the public (sort of) and blocks started coming at a rate of several per minute. The real start of LTC occurs on 10/13/2011 at 02:59:41; from block #2 until block #10079 the total time is only about one day. The target rate for LTC should generate 576 blocks per day on average, which means the first day of mining was about twenty times too fast! Day number two of mining the difficulty started to catch up, and only 850 or so blocks were found. Some considered this an early form of pre-mining, but it's not clear whether it was intentional or not. Unfortunately, many coins clone and only slightly modify the LTC base code, which means the starting difficulty is still far too low, and the rate of difficulty adjustment is so long that the first hours of poorly launched LTC-clones can be horribly chaotic.

LTC's Proof of Work (PoW) hashing function was changed from BTC's SHA256 to Scrypt. (Side note: I've heard it pronounced "S-crypt" as well as "script"; I usually say the latter, just because it's one less syllable, but I believe "S-crypt" is correct -- as in "secure cryptographic hashing function". And it's usually not capitalized, but I'm going to capitalize it going forward because it makes sense to consider Scrypt a proper noun.) One goal of Scrypt was to prevent the use of GPUs, FPGAs, and ASICs from taking over. The reasoning at the time was that every computer has access to a CPU, whereas GPUs are more specialized and FPGAs/ASICs are even more so. If you want a truly decentralized network that can be run on as many systems around the world as possible, limiting it to CPUs should better achieve this result.

The first demonstration of Scrypt mining came within months (and some people may have even created them within weeks and held a mining advantage until public availability of GPU Scrypt miners occurred). Despite concerns of GPUs taking over and "killing" Litecoin, however, LTC continued to grow. Now ASICs for Scrypt are available, with significantly faster ASICs coming in the very near future. Will these kill off Litecoin? The LTC developers have weighed in on the subject, and their arguments are quite compelling: the answer is "no".

While GPU/ASIC-resistance was an original goal that has since been abandoned, a more important goal was faster confirmation times than BTC. With six confirmations being required and a block target time of 10 minutes, that means you need to wait about an hour to really "know" that you have received valid BTC. Even if a site decides to accept a transaction as valid after three block confirmations, that's still 30 minutes. LTC took the same core structure as BTC but cut the time required to confirm down to 15 minutes on average. Other coins have tried even faster confirmation times, but there are drawbacks to such approaches that I'll get into later.

Ultimately, then, Litecoin is arguably the next best coin to BTC in terms of overall volume and future outlook. It keeps all of the good, fixes a few problem areas, and it has been around long enough that few people expect it to fail. I'd go so far as to say that if Litecoin fails, cryptocurrencies in general are not far behind. That's not to say LTC is without problems, however.

The biggest problem now is that with hundreds of Scrypt clones out there that build off the core design of LTC, miners have a lot of incentive to switch coins if the difficulty/price ratio of a coin isn't very good. Up until about November 2013, this wasn't really a problem, but that's when the clone-coin phase of alt-coins really kicked off. With new coins appearing daily, jumps in LTC mining difficulty often put it at a profitability disadvantage for miners, so many will switch to a new coin until the next difficulty adjustment occurs. Then they all jump back on LTC until difficulty changes again, so you get a period of higher profitability followed by a period of lower profitability. The good news is that long-term, many/most of the clone coins are fading away, leaving mostly the "good" clones that are worth mining.

Looking forward, with high-performance (>100MH) ASICs coming in the July 2014 time frame, difficulty of Scrypt coins is going to jump probably 50X over the coming year. Such powerful ASICs are less likely to be used in pool hopping, simply because time spent not mining is time wasted, and dealing with dozens or more wallets can be extremely cumbersome. Multipools will pick the "best" coins and even auto-exchange those coins for BTC (or LTC, DOGE, etc.), and when the dust settles LTC will certainly be one of the Scrypt coins left standing.

In terms of price, LTC started a bit slow but quickly ramped up into the $5 range in April 2013, before falling back to $2-$3 for most of the remainder of 2013. Then in November 2013 we saw the first major bubble of LTC, taking the price from a low of $1.11 in October to a high of just under $50 in late November. Since then, the price has generally stayed above $10, with the lowest spike down being $7.90 in April 2014. Difficulty meanwhile started to see-saw around November 2013 but has lately resumed upward momentum. LTC is at a current all-time high difficulty of 8550, and I expect it will eclipse 10,000 before the end of June 2014.

Despite the overall positive outlook, mining LTC with GPUs however is now a questionable proposition; at $0.10 per kWh, roughly 75% of the gross income from mining would need to go to power costs. On the other hand, even the early Gridseed Scrypt ASICs will only use about 4% of the gross profits on power costs (though you still have to pay off the ASIC hardware, of course). But that's only looking at the short term.

My personal opinion -- do with it what you will -- is that Litecoin will continue to follow the pattern of Bitcoin. We saw a big bubble in LTC price last November, where the value went up around 25X in less than a month. If you can manage to mine and hold your LTC for the long term, we should see LTC prices top the previous high of $50 some time in the coming year. If you have confidence in the idea of cryptocurrency, buying LTC at the current $10.50 or so each would be a great longer-term investment. We will in all likelihood see lower prices before we see higher prices, but when BTC eventually passes the $2000 mark LTC will be following right along at $40+.


If you like reading these blog posts but don't want to subscribe to my thrice-weekly newsletter, please consider making purchases through my Amazon Affiliate links!

Tuesday, May 27, 2014

Bitcoin Specifications

I'm going to start going through all of the major cryptocurrencies and creating a list of their specifications, as it's something I frequently want to look up -- and it will also be interesting to see if (and how much) some of these items change over time. When there's a hard fork in any of the currencies that I encounter, I'll also update the appropriate page with the new information, but I'll keep the earlier specifications visible as a historical record. This is something many of the coin creators fail to do -- often in order to hide potentially questionable behavior. I'll start right at the top with Bitcoin, not because it's hard to find the specs but simply because it's the king of cryptocurrencies and I don't see that changing any time soon. For better or worse, it is simply "too big to fail".

Bitcoin Specifications (5/26/2014)
SymbolBTC
Launch Date2009-01-03
Proof of WorkSHA256
Starting Difficulty1.00
Block Time10 minutes
Block Reward50
Difficulty Adjustment2016 blocks
Reward AdjustmentHalving every 210,000 blocks (~4 years)
Max Coins21 million
Block ExplorerMany options

General Points of Interest:

The Bitcoin genesis block was mined on Jan 3, but it was almost a week before block 1 showed up; perhaps with a starting difficulty of 1.0 and CPU mining  it took a while to get going. The difficulty did not increase above the minimum value of 1.00 until block 32256, where it became 1.18 -- nearly a year after the launch! (Oh, for a time machine....) Relatively few people were involved with Bitcoin until 2011, where it experienced its first bubble; that's when I got involved.

The first bubble took the price from pennies to a high of over $30 in June 2011 in just a few short months, before crashing back down to under $2 by the end of 2011. The second bubble occurred a bit under two years later, peaking at over $250 in April 2013, while the third bubble topped over $1200 in December 2013. 2014 started with a downtrend, but as of late May we may be looking at the fourth Bitcoin bubble; we'll have to see what happens.

While Bitcoin originally started as a distributed CPU computational currency, the first GPU miners were created in July 2010. Once GPU mining came online, CPU mining became generally unprofitable within a few months. The first ASICs wouldn't begin hashing until late 2012, and wider availability of ASICs didn't occur until early 2013. It was still profitable to mine BTC with GPUs until around April 2013, at which point the difficulty/price ratio finally made ASICs the only profitable source of mining income.

While the block reward for Bitcoin halves every 210,000 blocks, technically we will never actually reach the point where there are 21 million BTC -- we'll get very close, but the block rewards will drop so that every four years, we will only mine half of the remaining BTC before we reach 21 million BTC. The network will be supported by transaction fees, which should overtake the block reward some time in the next 20 years. Of course, the size of the blockchain may become too unwieldy before that point, and blocks with tens (or even hundreds) of thousands of transactions could pose serious problems down the road; there are other potential problems as well, which I won't get into right now.

The general attitude in regards to technical problems is that "we'll cross that bridge when we come to it." This attitude is common among nearly all cryptocurrencies, which is why it can be a big gamble and a potentially huge payoff for mining new coins early. Some coins start with larger block rewards that quickly drop off, so those that get in early can benefit. Premines and IPOs (Initial Public Offerings) have also become commonplace, though as the first cryptocurrency Bitcoin had neither of those. All of this has resulted in many scam coins, but even the worst new coin seems to get a fair amount of publicity these days.

My personal outlook for Bitcoin in mid-2014: Excellent. China may be out for now, but it's hard to imagine BTC completely failing at this point, which certainly wasn't the case in late 2011. Millions and even billions of dollars has been invested into the Bitcoin economy, and as the first and biggest cryptocurrency nothing else is really anywhere close to competing. The biggest concern Bitcoin faces is that of centralization; as computational power has become more expensive, much of the network backbone has gone from individuals to large pools, companies, hashing farms, etc. None of these have any desire to see Bitcoin fail, but should a government want to shut down Bitcoin it becomes easier if 90% of all hardware is in the hands of a few dozen companies.


If you like reading these blog posts but don't want to subscribe to my thrice-weekly newsletter, please consider making purchases through my Amazon Affiliate links!

Wednesday, May 14, 2014

Goodbye CAI, Hello CAIx!

 
As I've mentioned, the current "short-term PoW stage transitioning into PoS" is all the rage. It started with Blackcoin, got cloned by Whitecoin, Asiacoin, Yellowcoin, Orangecoin, and probably a dozen or more others, and along the way several other coins that were formerly PoW-only decided to switch to PoS. One of the more interesting coins to do this is CAI, which is a Scrypt-N coin from the same team that helped to create Ultracoin.

The official change to PoS has already begun, and CAI (Caishencoin) has now officially become CAIx. Interestingly, if someone were really determined they could actually keep mining CAI and reject the wallet updates that halt mining and such, but I don't think there's enough impetus to make that happen. The reason I mention it however is that from the launch of CAI to the switch to CAIx, we've seen quite a few changes, so let's quickly cover them.

First, CAI launched with a maximum circulation of 28 million coins, to be distributed over a long period of time (similar to BTC, LTC, etc.). There was an IPO involved as well, with a premine of 2% used for the IPO as well as other bounties and marketing. (I think 1% went to the IPO, but I can't be sure as the original information has been deleted.) What that means is that the developers created a genesis block worth 560,000 CAI before releasing the coin to the general public. Now here's where things get interesting.

After about two weeks of mining, CAI was doing "okay" but not much was really happening. Then the developers announced their intention to transition CAI into a PoS coin, and the result was initially higher prices. The IPO price of CAI ended up being at most 0.0008 BTC per CAI (with earlier IPO investors paying less). Shortly after launch, CAI was trading at around 0.0003 BTC, then a week later it was 0.00055 BTC, and when they first announced their intention to take the coin PoS CAI was trading at 0.0007 BTC. It dropped from there back into the 0.0004-0.0005 BTC range over the coming weeks, and now that the move to CAIx is fully underway we have CAIx prices of...wait for it...0.00083 BTC (with short spikes to as much as 0.0011 BTC).

The results so far have been relatively minor in terms of price movement, but long-term any IPO investors basically went from holding around 1% of all CAI (28 million total) to potentially holding a much larger percentage of CAIx -- there's currently a 1-to-1 trade available at Coin-swap.net, so if you bought as an example 10% of the IPO coins and thus ended up with 0.1% of all potential CAI, you now have over 1% of all potential CAIx (depending on how long the PoS staking lasts) -- neat, isn't it? The developers are "still trying to determine the best way to use the remaining premine funds", so it will be interesting to see what they come up with. At least this is one case where the coin is clearly being actively developed, though, so they haven't simply taken the premine and disappeared, and I don't think they will.

Other initiatives to increase the value of CAI/CAIx include making games (e.g. Tiny Elementals is available for iOS and Android now), but I tried that game and frankly I can't see why anyone would spend money on it -- there are many better "free" games around. The developers are also involved with Ultracoin (UTC), so we might see a PoS transition there as well -- which might be for the best, as scrypt-jane seems to be going nowhere fast, and UTC in general is quickly fading into obscurity.

Lessons to be learned from this? I'm not really sure. Apparently pulling a "bait and switch" in the cryptocurrency world is simply par for the course. At least it's a step from an outright scam like the initial Asiacoin launch, and it's interesting to note that even Asiacoin is holding steady after the fixes were applied to nuke the 3.2 billion hidden AC premine. In the meantime, if you're holding CAI (like I was), you'll want to exchange that -- for free -- to CAIx sooner rather than later. I believe there's a two week window before the Coin-swap exchange goes away, and at that point I suspect that any remaining CAI will be largely worthless -- so unless you want to collect them as a souvenir, act now.

Monday, May 5, 2014

Asiacoin Scam, Microcoin Coding Issues, and the Whitecoin Cat Fight

The weekend was rather eventful, though sadly not in any good way. The chance for wanton abuse of people with alt-coins is so huge, that even with open source code all sorts of things are being missed. Case in point: besides the Whitecoin fiasco, we can now add Asiacoin and Microcoin to the list of coins that had some serious problems. Also, WC finally received a wallet update, but not before one of the volunteer developers quit and was then fired. It's all so awesome, I can't wait to write about it... LOL!

Asiacoin (AC)

Starting with Asiacoin (AC), the developer appears to have intentionally scammed people out of a lot of coin. The original launch stated that there was no premine or IPO, but it finally came to light that there was a sneaky bit of code in the system (credit to abrok):
Value ValueFromAmountWithFee(int64 amount)
{
    if(amount<=0 || amount >= MAX_TX_FEE * COIN)
    {
        amount = ( amount % (MAX_TX_FEE * COIN ) );
    }
    return (double)amount / (double)COIN;
}
Basically, it reports the number of coins mined as the amount of coins modulus MAX_TX_FEE. What exactly is MAX_TX_FEE? It's basically the number of AC that was supposed to exist. But instead of there being something like 300,000,000 AC from the PoW stage, there was a premine of 3.2 BILLION AC that was then cloaked from view with a few "clever" lines of code.

When someone finally made their own proper block explorer (note that the link may go dead, just like AC), we can see the 3,240,000,100 AC block as the second (block 1) mined block. The owner was able to slowly sell off AC in small chunks over the past two weeks. Last I saw, rumor was that around 300 BTC worth of AC was sold off and the rest of the premine is still around, but I don't know if that's true. There's talk now of trying to fix AC to remove the extra coins, but I'm not sure anyone will succeed as the coin's reputation has been irrevocably tarnished. Unlike WC, this wasn't a simple coding error but was fully intentional, so AC was a willful scam from the start.

Microcoin (MRC)

Next up, let's look at MRC (Microcoin). Another coding bug hit this one, so that once we passed block 310,000 the block reward jumped from 10K to 310K. Oops. So a fix was implemented that would kick in at block 315,000 reducing the block reward to the proper level...in theory. The problem is that the fix was incorrectly implemented (they forgot to multiply by "COIN"), so instead of 10K blocks starting at 315,000, there were 0.01 MRC blocks (COIN is 1000000, so they were off by a factor of one million). A new fix was proposed, which will kick in at block 318,000, leaving us with the following sequence of rewards:

  1. Blocks 0-9999: 0.0001 MRC rewards
  2. 10000-159999: Reward is block number (10K to 160K) MRC
  3. 160000-309999: Reward counts back down from 160K to 10K (320000 - block number) MRC
  4. 310000-314999: Wrong block rewards of ~310K MRC (counting down in 0.01 MRC increments)
  5. 315000-317999: Another wrong block reward of ~0.01 MRC (forgot to multiply by COIN)
  6. 318000+: Hopefully fixed to be 10K counting down to 1K in 0.01 MRC increments.

The problem with the last stage is that right now, the math is "bad" yet again. Hahaha... I posted about this here, but since we're still ~2K blocks from the next change the actual developers should be able to fix the problem. For now, you can't sync past block 159999 because they forgot the code to handle case #3 properly (it ends up using the fifth option and expects 0.01 MRC rewards, which it doesn't find and thus fails to continue downloading the chain).

Whitecoin (WC)

Now the final entertainment for the day: Whitecoin had a major cat fight between a 19-year-old guy trying to help fix the coin (tf2honeybadger) and the 20-something PR guy that has been trying to manage the fixing process (mogonzo). Basically, tf2 was taking way too long -- and I think everyone can agree with that. It turns out that tf2 really didn't know what he was doing with a hybrid PoS coin, so the real work was being done by mindfox I guess. Then because it was taking so long, mogonzo contacted a second team of developers and they were able to churn out a fixed wallet in about half a day or something.

When that wallet got launched, TF2 felt there wasn't proper testing and pretty much got pissed, then there was a fight on IRC with him calling mogonzo a liar and saying he wasn't being transparent, and a bunch of other stupidity. And he then left the main #whitecoinfoundation channel and went to his own #whitecoindebate channel. Why? As far as I can see it was because mogonzo had muted everyone except for the major people for a public discussion and tf2 apparently prefers chaos and stupidity; here's the rest of the story from whitecoindebate.

My take: software development can be a serious pain in the butt, and when you're in the public's eye it becomes even more so. And no matter how good you think you are at coding, there's always someone that's just a bit (or a lot!) better. The fix really shouldn't have been that difficult, but TF2 is just a kid, really, and was probably being a bit gun shy about releasing the code and updated wallet. Anyway, WC now has a "working" wallet apparently, and some people dumped coins and got out while others got in.

Summary

If you hadn't noticed, there are a lot of egotistical brats out there trying to make money on cryptocurrencies. Some are very shady, some are willfully scamming, and others are just stubborn and thick headed -- they're not willing to see things through other people's eyes. Whatever. What happens with WC now that it's staking properly is anyone's guess, but you can stop mining PoW to "save the blockchain" at least and switch over Whitecoinpool.com -- except that ChunkyPools is apparently struggling right now and is quite slow to load, so maybe that won't work too well?

A funny side note is that the current difficulty of PoW WC mining is at 3.6 as I write this (and has been for quite some time), which means there's still around 180 MH/s of scrypt mining power pointing at the PoW "protection port" or other P2P nodes right now that's earning nothing AFAICT. If you have extra hashes and you don't know what to do with them, just point them at Hashco.ws with the user name trogdorjw73.tester password tester. :-)

In all seriousness, WC staking is at least working for me, but the returns -- as I mentioned earlier in my newsletter -- are pretty pathetic. I have just over 54K WC (which isn't a lot compared to some people, I know), and in the past two days I have managed to get PoS mining of 42.145421 WC. Yes, I'm being exact again, because it's important to see the "returns". WC is 2% nominal annual interest, or 0.00548% daily interest. That works out to 2.96 coins per day for me from PoS, or 1080 coins per year (give or take), or at the current rate of ~700 satoshi it's 0.00756 BTC per year. At $500 per BTC, I make $3.78 yearly from running the WC client -- and probably downloading and storing around 2.5GB of block chain information yearly, with likely 10X that amount in general communications over the Internet. Let's all hope WC goes up from this point, because PoS isn't generating enough to be worthwhile.

Thursday, May 1, 2014

The Rise and Fall of Whitecoin

It's funny: after my last public post about why I didn't really like Proof of Stake as a solution, PoS decided to become the Next Big Thing (tm). [Note to self: find another idea to bag on, and then invest in that idea as it appears people like to be contrarians to my opinioins.] This was thanks in no small part to Blackcoin and Blackcoinpool -- the latter being a multi-coin pool that mines whatever is most profitable and then auto-trades for BC. That puts a constant buying pressure on the coin, at least as long as there are large numbers of miners, resulting in higher profits.

The thing is, at the end of the day the PoS stuff is still just encouraging people to hoard coins in the hope of higher profits, while realistically many of these coins will end up dropping more in value in a month than you can possibly hope to gain on the PoS annual percentages. BC for example is 1% nominal annual interest -- and don't get confused by talk of "compounding interest"; you could compound every second but with a nominal 1% annual rate, you'd only end up earning... wait for it...1.00501671%.

Anyway, I was talking about Whitecoin and what has happened since it launched. First off, Whitecoin is basically a clone of Blackcoin, except instead of a 1% nominal annual interest rate it's a 2% rate. Also, the distribution of coins was 300 million WC instead of 100 million BC, with block times of 1.5 minutes instead of 1 minute. (Yawn! It took the developers how long to manage all of this amazing work!?) But WC apparently didn't clone BC, instead choosing to clone some other coin I guess, so they had some errors. With the BC mania in full swing, and the yin-yang aspect of Black vs. White, everything was primed and ready and WC took off like a rocket to the proverbial moon.

Do you know what happened next? After the initial PoW distribution phase concluded roughly 11 days after the launch, as planned, the PoW block rewards continued... only at 10 WC each instead of 30K WC. PoS wasn't happening at all! This should have been the first PoS block, but instead it was still PoW. What was going on?

Funny thing is that I believe I was the first person to notice the problem and comment on it; I posted about it here in the WC thread. However, there was so much excitement about ChunkyPools and Whitecoinpool doing for WC what Blackcoinpool did for BC that everyone totally missed/ignored my post. So 30 minutes later after looking into things a bit more, I followed up with a second post on the subject of PoS. And we had a bunch of people shouting, "Who cares about PoS? Push the coin and let's get to 2000 or 20000 satoshi!" Well, I cared, and the reason was simple.

I am (was) a computer programmer; I haven't done a whole lot of actual coding of late, but I can read other people's code fairly well and figure out what's going on. More importantly, one of the things you learn in studying computer science is that if a major feature of an application is broken/buggy, there will be a ton of secondary effects and basically the whole thing turns into a worthless PoS (that's not Proof of Stake this time). I worked at a company where there was a lot of talk about creating the "Next Generation Internet" clear back in 2000, but the code was a steaming pile of dung and the CEO was a complete disaster. His claim to fame? "Completing final exams in his first year, he became one of the highest grant earners for [George Mason] University." Basically, he had no real skills other than the ability to spew BS and convince the government to fund his pet projects (with the help of his influential father, of course), which went nowhere. Hooray for government bureaucracies!

Over the next day, the problem with PoS not working became a lot more serious, as the hash rate on the WC chain dwindled to nothing. The reason this is a problem is that if you drop too far in hash rate, anyone with a reasonable amount of hardware can perform a 51% attack -- gain 51% of the hash rate and you can perform a double spend. It's not a trivial task, but if you know what to do it can certainly be done. So the PR guy for WC announced over the past weekend that everyone needed to "protect the block chain!" and mine on a specific port of ChunkyPools in order to prevent a 51% attack. Here's my response, again from the WC thread:
So I have a simple question: why do we need to protect against a 51% attack if we're going to hard fork the coin? This is really quite simple:

HARD FORK THE COIN AT BLOCK 10000. Done.

Okay, maybe not 10000, but there's nothing stopping anyone from doing that. We have the block chain right now going past block 10000, but everything happening there is basically meaningless as far as mining. So if not 10000, because of the latest trades and such, then fork it at the current block or one in the very near future (e.g. 12000). What people fail to understand is that if someone were to execute a 51% attack, you could simply unroll the attack by hard forking to before it happened (according to the block chain). In the meantime, all this hand wringing is silliness.

Given that WC is largely based off of Blackcoin, I don't see why it can't just fork to a clone of BC, though there's more work involved than a simple cloning job obviously. Also note that the current WC block explorer is apparently off by a factor of 100 -- the initial blocks up to 10000 were 30000 WC PoW mining each, and now we're seeing 10 WC blocks (not 300 and 0.1 WC blocks, which is what the explorer is showing). So we have a buggy coin with a buggy block explorer. LOL

Anyway, as I see it the hard fork process is a democracy, and it's very simple: you vote by running the wallet you support. Given the source code is already available, anyone could create a new WC wallet, but that doesn't do them any good unless people (and more importantly, pools and exchanges) use the wallet. Since WC is currently broken, nothing good is happening right now regardless. All the exchanges listing WC should freeze all transactions, all WC pools (including ChunkyPool) should do likewise, and we should basically just leave the coin as dead for the couple of days it takes to get a fixed wallet in place -- or maybe a week at most, assuming you have any halfway competent programmer.

It will be painful in the short term, but fundamentally this is a coding problem and it can be best solved with coding, not by "protecting the block chain". Modifying the source code to restart after a specified block and roll things back seems better than wasting hashing power on a useless and unnecessary move to "protect" a coin that is going to be hard forked one way or another. If in the interim someone gains a 51% share and executes an attack, then when a wallet is released that forks the block chain before that attack happened, the community just votes for that wallet (by running it) and we all move on. Just please make sure to test the new wallet properly before starting up trading and mining again, or we'll be back in this same spot.

The real problem is that with several other BC clones, and with WC having proven that it did not have a proper developer, it will take a lot for it to recover. Why in two years would anyone want to use Whitecoin as opposed to Blackcoin, or whatever other coin you want to name that didn't have major problems with it's initial release and wasn't created by a scamming developer? The only reason I'm holding WC is because... well, I'm holding lots of bags (small ones, mind you), and if a few of them take off they can cover for the dozens that suck.
That post comes from four and a half days ago, and in the meantime the WC devs have managed to not release a public wallet. Do you know what happened next? Well, first off, a few exchanges closed down deposits/withdrawals of WC temporarily, but Cryptsy kept their WC exchange running and then several other exchanges decided to join them. With such low hanging fruit, the result was inevitable: someone orchestrated a DDoS attack on Whitecoinpool/ChunkyPools, the network hash rate on WC plummeted even further, and they were then able to execute a 51% attack and apparently performed a double spend. So the WC exchanges (except Cryptsy still?) are apparently closed again.

What happens next is the real question. A fixed wallet will come out, hopefully in the next 24 hours, and at that point the 51% attack can be rolled back. Hopefully Cryptsy and the other exchanges didn't accept any double-spent WC, but considering Bittrex at least saw a price of 1 satoshi for a moment, I'm guessing we'll see a lot of pandemonium before this is all done.

Some will be glad that things rolled back, others will whine, "I bought a bunch of WC at 1 satoshi and they got taken from me!", but really the exchanges shouldn't have even been running. Here's a thought for you exchanges: if the price of a heavily traded coin drops by more than 50% within a matter of minutes -- or even an hour -- you should put a temporary halt on all trading! That flies in the face of profiteering, but it's better that than "pulling a CryptoRush" and going insolvent, wouldn't you say?

The bottom line right now is that Whitecoin was a clone of an existing idea, and the people executing on that idea were apparently not as skilled as they should have been. Instead of repeating what BC did, WC has failed on so many levels that it's difficult to see how it can recover. They could release a perfect wallet at this point, and many people are still going to be gun shy. And rightly so! If they had just listened to my advice early Sunday morning, we could have at least avoiding the past five days of grief, anguish, scams, double spends, etc.

At this point, WC is past block 15000, which means that over one third of all blocks on the block chain are "bad" -- in that they should have been PoS but instead are PoW valued at 10 WC. There are still 300 million WC out there, and a nominal 2% annual interest means we should have had PoS blocks doing around 0.00000570776% per block... which would only have been 17.123 WC PoS per block assuming every single coin of the 300 million WC was properly staking. The difference of course is that you could have 20 wallets running PoS coins and still have only 10-25% CPU load on a quad-core Core i7 system, drawing maybe 15W total for Proof of Stake "work"; instead, we've had hundreds of people throwing 100 times that much power at the problem, and getting 40% lower returns for their trouble.

Can WC recover? Yes. Should it recover? That's debatable. WC looks like a quick money grab by the original developer(s), and it certainly succeeded in that regard. Now the community is left to try and pick up the pieces. The real question is: what will be the next Whitecoin? We have dozens of new candidates every month, and I can guarantee that we have not seen the last catastrophic failure in cryptocurrency, thanks to poor coding, greedy developers, greedy miners, and -- dare I say it? -- Proof of Stake. The only real winners -- other than the developers -- are the people that mined on places like Hashco.ws, Middlecoin, etc. where the WC was already traded, often at relatively high rates, for BTC.