<oembed><type>rich</type><version>1.0</version><author_name>npub1swfeusu3ua9trup00qcnrgc2yndksyvgku4epk5tec7u4fmrez6qxpul5t</author_name><author_url>https://nostr.ae/npub1swfeusu3ua9trup00qcnrgc2yndksyvgku4epk5tec7u4fmrez6qxpul5t</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2014-10-25&#xA;📝 Original message:# Death by halving&#xA;&#xA;## Summary&#xA;&#xA;If miner&#39;s income margin are less than 50% (which is a healthy situation&#xA;when mining hardware is readily available), we might experience&#xA;catastrophic loss of hashpower (and, more importantly, catastrophic loss of&#xA;security) after reward halving.&#xA;&#xA;## A simple model&#xA;&#xA;Let&#39;s define miner&#39;s income margin as `MIM = (R-C_e)/R`, where R is the&#xA;total revenue miner receives over a period of time, and C_e is the cost of&#xA;electricity spent on mining over the same period of time. (Note that for&#xA;the sake of simplicity we do not take into account equipment costs,&#xA;amortization and other costs mining might incur.)&#xA;&#xA;Also we will assume that transaction fees collected by miner are negligible&#xA;as compared to the subsidy.&#xA;&#xA;Theorem 1. If for a certain miner MIM is less than 0.5 before subsidy&#xA;halving and bitcoin and electricity prices stay the same, then mining is no&#xA;longer profitable after the halving.&#xA;&#xA;Indeed, suppose the revenue after the halving is R&#39; = R/2.&#xA;   MIM = (R-C_e)/R &lt; 0.5&#xA;   R/2 &lt; C_e.&#xA;&#xA;   R&#39; = R/2 &lt; C_e.&#xA;&#xA;If revenue after halving R&#39; doesn&#39;t cover electricity cost, a rational&#xA;miner should stop mining, as it&#39;s cheaper to acquire bitcoins from the&#xA;market.&#xA;&#xA;~~~&#xA;&#xA;Under these assumptions, if the majority of miners have MIM less than 0.5,&#xA;Bitcoin is going to experience a significant loss of hashing power.&#xA;But are these assumptions reasonable? We need a study a more complex model&#xA;which takes into account changes in bitcoin price and difficulty changes&#xA;over time.&#xA;But, first, let&#39;s analyze significance of &#39;loss of hashpower&#39;.&#xA;&#xA;## Catastrophic loss of hashpower&#xA;&#xA;Bitcoin security model relies on assumption that a malicious actor cannot&#xA;acquire more than 50% of network&#39;s current hashpower.&#xA;E.g. there is a table in Rosenfeld&#39;s _Analysis of Hashrate-Based Double&#xA;Spending_ paper which shows that as long as the malicious actor controls&#xA;only a small fraction of total hashpower, attacks have well-define costs.&#xA;But if the attacker-controlled hashrate is higher than 50%, attacks become&#xA;virtually costless, as the attacker receives double-spending revenue on top&#xA;of his mining revenue, and his risk is close to zero.&#xA;&#xA;Note that the simple model described in the aforementioned paper doesn&#39;t&#xA;take into account attack&#39;s effect on the bitcoin price and the price of the&#xA;Bitcoin mining equipment. I hope that one day we&#39;ll see more elaborate&#xA;attack models, but in the meantime, we&#39;ll have to resort to hand-waving.&#xA;&#xA;Consider a situation where almost all available hashpower is available for&#xA;a lease to the highest bidder on the open market. In this case someone who&#xA;owns sufficient capital could easily pull off an attack.&#xA;&#xA;But why is hashpower not available on the market? Quite likely equipment&#xA;owners are aware of the fact that such an attack would make Bitcoin&#xA;useless, and thus worthless, which would also make their equipment&#xA;worthless. Thus they prefer to do mining for a known mining pools with good&#xA;track record.&#xA;(Although hashpower marketplaces exist: https://nicehash.com/ they aren&#39;t&#xA;particularly popular.)&#xA;&#xA;Now let&#39;s consider a situation where mining bitcoins is no longer&#xA;profitable and the majority of hashpower became dormant, i.e. miners turned&#xA;off their equipment or went to mine something else. In this case equipment&#xA;is already nearly worthless, so people might as well lease it to the&#xA;highest bidder, thus enabling aforementioned attacks.&#xA;&#xA;Alternatively, the attacker might buy obsolete mining equipment from people&#xA;who are no longer interested in mining.&#xA;&#xA;## Taking into account the Bitcoin price&#xA;&#xA;This is largely trivial, and thus is left as an exercise for the reader.&#xA;Let&#39;s just note that the Bitcoin subsidy halving is an event which is known&#xA;to market participants in advance, and thus it shouldn&#39;t result in&#xA;significant changes of the Bitcoin price,&#xA;&#xA;## Changes in difficulty&#xA;&#xA;Different mining devices have different efficiency. After the reward&#xA;halving mining on some of these devices becomes unprofitable, thus they&#xA;will drop out, which will result in a drop of mining difficulty.&#xA;&#xA;We can greatly simplify calculations if we sum costs and rewards across all&#xA;miners, thus calculating average MIM before the halving: `MIM = 1 - C_e/R`.&#xA;&#xA;Let&#39;s consider an equilibrium break-even situation where unprofitable&#xA;mining devices were turned off, thus resulting in the change in electricity&#xA;expenditures: `C_e&#39; = r * C_e`. and average MIM after the halving `MIM&#39; =&#xA;0`. In this case:&#xA;&#xA;    r * C_e = R/2&#xA;    C_e / R = 1/2r&#xA;    (1 - MIM) = 1/2r&#xA;    r = 1/(2*(1-MIM))&#xA;&#xA;Let&#39;s evaluate this formulate for different before-halving MIM:&#xA;&#xA;1. If `MIM = 0.5`, then `r = 1/(2*0.5) = 1`, that is, all miners can remain&#xA;mining.&#xA;2. If `MIM = 0.25`, then `r = 1/(2*0.75) = 0.66`, the least efficient&#xA;miners consuming 33% of total electricity costs will drop out.&#xA;3. If `MIM = 0.1`, then `r = 1/(2*0.9) = 0.55`, total electricity costs&#xA;drop by 45%.&#xA;&#xA;We can note that for the before-halving MIM&gt;0, r is higher than 1/2, thus&#xA;less than half of total hashpower will drop out.&#xA;&#xA;The worst-case situation is when before-halving MIM is close to zero and&#xA;mining devices, as well as cost of electricity in different places, are&#xA;nearly identical, in that case approximately a half of all hashpower will&#xA;drop out.&#xA;&#xA;## MIM estimation&#xA;&#xA;OK, what MIM do we expect in the long run? Is it going to be less than 50%&#xA;anyway?&#xA;&#xA;We can expect that people will keep buying mining devices as long as it is&#xA;profitable.&#xA;&#xA;Break-even condition: `R - C_e - P = 0`, where P is the price of a mining&#xA;device, R is the revenue it generates over its lifetime, and C_e is the&#xA;total cost of required electricity over its lifetime. In this case, `R =&#xA;C_e + P`, and thus:&#xA;&#xA;    MIM = 1 - C_e / (C_e + P)&#xA;&#xA;`f = C_e / P` is a ratio of the cost of electricity to the cost of&#xA;hardware, `C_e = f * P`, and thus&#xA;&#xA;    MIM = 1 - f * P / (f * P + P) = 1 - f / (f + 1) = 1 / (1 + f)&#xA;&#xA;MIM is less than 0.5 when f &gt; 1.&#xA;&#xA;Computing f is somewhat challenging even for a concrete device, as it&#39;s&#xA;useful lifetime is unknown.&#xA;&#xA;Let&#39;s do some guesstimation:&#xA;&#xA;Spondoolies Tech&#39;s SP35 Yukon unit consumes 3.5 KW and costs $4000. If it&#39;s&#xA;useful lifetime is more than 2 years and a cost of KWh is $0.1, the total&#xA;expenditures on electricity will be at least $6135, thus for this device we&#xA;have `f &gt; 6135/4000 &gt; 1.5`.&#xA;&#xA;If other devices which will be sold on the market will have similar specs,&#xA;we will have MIM lower than 0.5. (Well, no shit.)&#xA;&#xA;## Conclusions&#xA;&#xA;Reward halving is a deficiency in Bitcoin&#39;s design, but there is some hope&#xA;it won&#39;t be critical: in the equilibrium break-even situation hashpower&#xA;drop is less than 50%.&#xA;Hashrate might drop by more than 50% immediately after the halving (and&#xA;before difficulty is updated), thus a combination of the halving and slow&#xA;difficulty update pose a real threat.&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20141025/00dbaebf/attachment.html&gt;</html></oembed>