Dogecoin part I

This post originally appeared on reddit.com/r/dogecoin, and was added to my official tech blog for posterity. or something.


WARNING: WALL OF TEXT, HIGH SCIENCE CONTENT

Friends, shibes, it is my pleasure to speak with you for what I hope is the first and not the last time. I’m /u/arrdem [1] , I’m a Doge daytrader, economist and miner on the side, and a programmer during the day. Today I’d like to have a chat about some of the rumors with regards to ASICs and the X11 hash that have been floating around /r/dogecoin[2] for the last few weeks and I hope bring some light to the discussions.

On Scrypt

What is special about our hash function? Why does Bitcoin use SHA256 and why does Doge use Scrypt? The hash function used by each cryptocurrency must have no known inverse function or algorithmic weakness which allowing miners to cheat and compute nonces easily, and it needs to be easy to verify or recompute given an input. The first requirement is obvious in that if the hash function is weak, then someone can achieve a 51% attack potentially with less than 51% of the network’s hashing power. The second is less obvious and is in fact entirely a performance issue.

SHA256 is a known and trusted algorithm which has yet to exhibit any known weaknesses, and it is very very fast to recompute. This is why Bitcoin is SHA based.

Litecoin, the intellectual father of Dogecoin, chose the Scrypt hash function because it was a memory bound algorithm. That is, the slowest part of computing the Scrypt hash of some value is waiting for values to be fetched from memory: an operation which it is amazingly expensive to make fast. The goal of choosing an artificially expensive hash function was to escape the Application Specific Integrated Circuits (ASICs or hardware miners) which had come to dominate Bitcoin mining. Because the SHA256 algorithm does not have large memory requirements, it was easy for Bitcoin speculators to develop cost effective hardware for the single purpose of searching for SHA256 nonce values.

On ASICs

Before we get to whether ASICs are good or bad for a coin, we must first assess why they made sense for Bitcoin so that we can reason about their impact on Doge.

Because the computational power to find a nonce for any good cryptocurrency is expected to be large, that means there is a literal cost attached to processing each transaction on the network. While transactions may be nominally free or at least low fee, miners are really speculators expecting that someday the value of the coins they earn computing nonce values for blocks will exceed the operating costs and purchase costs of the hardware they mine with. This expectation that one day mining costs will be repaid is in fact the key reason that Bitcoin featured block rewards. The block reward was seen as a bootstrapping mechanic with which to buy hardware investment in the Bitcoin network through currency inflation.

Now, ASICs and other mining hardware only pay for themselves if one expects to get enough return from block rewards and future coin price increases to cover the purchase and operating costs of the hardware. However, this is where the block schedule comes in. If we expect that thanks to the law of large numbers that one’s return is on average the block reward times ones fraction of the network hashrate, it becomes clear that as the block reward falls it becomes very difficult for any purchased mining hardware to pay itself off let alone turn a profit.

On the block schedule

Looking at the Bitcoin block schedule, ASICs kinda make sense. The Bitcoin block schedule extends until 2140, at which time the “omega block” will be mined and the per block reward of Bitcoin mining will become zero. However until that time the per block reward will decrease 50% every four years. Today in 2014, the per block reward of Bitcoin is 25BTC and it won’t change until 2017. That means that Bitcoin targeted ASICs can potentially run for three whole years or more and still have a reasonable chance of breaking even with no assuptions made about changes in the value of 1BTC.

Doge’s block schedule looks completely different. Where Bitcoin has a long tail on its per block reward extending out to 2140, Dogecoin will reach it’s minimum block reward at block 600,000 in January of 2015, less than 14 months after Dogecoin came into being. With the 3rd halvening about 11 days out and the 4th on the horizon, by the time big boy ASICs for Scrypt start shipping in Q3/Q4, being September and later, the per block reward of Doge will have fallen to 31.25KDOGE and below. Third generation ASICs slated for December and January will likely never see more than 15.625KDOGE/block.

On the price of Doge

So what does this mean for the price of Doge? If the price of Doge doesn’t increase at all, it’s clear that the expensive new ASICs will never break even. This suggests that late comers with high powered mining hardware will be looking to recoup their investments and asking higher and higher prices for their Doge which should drive up the price overall.

To put some numbers on this, at current prices and hashrate, accounting for halvenings, neither Gridseed ASIC even breaks even within 200 days if purchased within the next 48hrs. fn:1. Wait 30 days (after the comming halvening) and you don’t come anywhere near break even. If I change my model to include some hashrate growth factor, the outlook is even worse. fn:2.

This isn’t bad news. This is awesome news for the price of DOGE. Lets say that Gridseed ships oh 500 units of their big boy ASIC, which may be conservative. fn:3 That’s right, if hardware equivalent to 1K large Gridseeds came on in the next 30 days and ran at least for 200, doge would have to go all the way up to 702DOGE/USD just for them to break even!

To the moon

So where does this leave us. I think that the numbers I’ve presented here show that ASICs for Dogecoin are patently absurd, unless you expect to see a gargantuan spike in the price of DOGE which would make us all rich men anyway. While I’m willing to speculate on block reward (which is easy to model) and on hashrate which I assume is more or less linear, I have no mechanism with which I can confidently predict the price of DOGE out more than a week. Naive linear projections from our initial open of 80 satoshi to today’s 126 satoshi over the course of four months suggests that in 200 days we could well see the ~300 satoshi prices which would make Gridseed and other ASIC miners profitable. However once you account for the high volatility of Doge, of Bitcoin and general market manipulation who knows if it’d ever go that high stably.

So. To sum up. On the basis of these sketchy ROI numbers, I think that buying ASICs is probably ill advised. That said, I expect that people will buy ASICs and that in doing so they will drive up the price of DOGE at the same time as the supply of DOGE starts to dry up due to block reward decreases.

I will be interested to see what happens to DOGE mining in January, as we will be the first coin to reach their steady mining state. I hope that the 10,000 DOGE reward per block will be sufficient to support the ASIC and GPU mining required to keep our hashrate out of 51% threat, but only time will tell. There is a real threat that the ROI of mining will be too low to justify the purchase of new ASIC let alone GPU hardware, which would lead to a falling hashrate and a credible threat of 51% vulnerability. However we could also see prices to go to the moon in which case that is no worry as high efficiency ASIC farms would take over mining securing the coin’s stability more or less. I will note that no coin has yet solved the 51% threat issues posed by centralized mining, and I’m personally convinced that it’s an intractable problem because as rewards per block decrease as for bitcoin, the costs of mining operations must likewise fall leading to greater centralization of compute power. By fixing our block reward we may. may. be able to dodge (ha ha) this issue however the essential drive to cut mining prices for ROI maximization will remain and will continue to drive mining centralization.

With all this in mind, it’s silly to talk about the adoption of X11 or another hashing algorithm, because if and when ASIC miners for DOGE become big business it’ll already be too late and we will have already mined the vast majority of DOGE thus securing the distribution of DOGE away from the ASIC miners we seem to fear so much as a community. Making the switch to X11 simply delays the ASIC hardware which we want anyway due to the price increases it’s likely to drive, forget about making us artificially dependent on GPU mining to secure our hashrate and creating an uncalled for blockchain fork.

TL;DR

MSC

The software I’ve built and used to make these models is entirely open source and written in Clojure, see the footnotes for source and libraries.

Other programs involved

https://www.refheap.com/78314

https://github.com/arrdem/meajure

Edit History

  1. Wording typo fixed
  2. Fix fn:2 to reflect increased network hashrate
  3. Don’t bother asking me what I think the price of DOGE will be. Not the foggiest.
  4. Fix final block reward, 10k not 100k
  5. Fix omega block date for BTC, 2140 not 2024

^d