Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XiA2R-0001PG-EM for bitcoin-development@lists.sourceforge.net; Sat, 25 Oct 2014 22:42:23 +0000 Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of gmail.com designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; envelope-from=melvincarvalho@gmail.com; helo=mail-lb0-f170.google.com; Received: from mail-lb0-f170.google.com ([209.85.217.170]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1XiA2P-0005Yj-69 for bitcoin-development@lists.sourceforge.net; Sat, 25 Oct 2014 22:42:23 +0000 Received: by mail-lb0-f170.google.com with SMTP id u10so4111705lbd.29 for ; Sat, 25 Oct 2014 15:42:14 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.152.37.104 with SMTP id x8mr4654308laj.74.1414276934492; Sat, 25 Oct 2014 15:42:14 -0700 (PDT) Received: by 10.112.1.234 with HTTP; Sat, 25 Oct 2014 15:42:14 -0700 (PDT) In-Reply-To: <544C1FBA.8030901@jrn.me.uk> References: <544C1FBA.8030901@jrn.me.uk> Date: Sun, 26 Oct 2014 00:42:14 +0200 Message-ID: From: Melvin Carvalho To: Ross Nicoll Content-Type: multipart/alternative; boundary=089e0160b5f44b69610506470256 X-Spam-Score: -0.6 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (melvincarvalho[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.0 HTML_MESSAGE BODY: HTML included in message -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1XiA2P-0005Yj-69 Cc: Bitcoin Dev Subject: Re: [Bitcoin-development] death by halving X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Oct 2014 22:42:23 -0000 --089e0160b5f44b69610506470256 Content-Type: text/plain; charset=UTF-8 On 26 October 2014 00:10, Ross Nicoll wrote: > I'd suggest looking at how Dogecoin's mining schedule has worked out, for > how halvings tend to actually affect the market. Part of Dogecoin's design > was that it would halve very quickly (around every 75 days, in fact), so > it's essentially illustrating worst case scenario. > Yes that is an interesting data point, but it's really hard to find comparables to doge, and most of its hashing is now merge mined with litecoin. Comparing doge to btc may be a case of apples and oranges. > > > Firstly, miners do not all move/shut down as a batch. Some will stay out > of loyalty/apathy/optimism, so there's a jolt to hashrate when the rewards > drop, and then a drift towards a steady-state. In most cases, the hardware > costs vastly exceed the running costs, so while they may never see ROI due > to the reward change, there's no benefit in stopping mining either. > > On the other side, mining hardware update cycles are extremely aggressive, > and newer hardware runs much faster. Further, those with newer hardware are > likely to have the best hashrate to power ratio, and be less likely to turn > off or rent out their hardware. > > So, in theory there may be an uncomfortable period where the hashrate > drops, but I would expect that drop to be much less than 50%, that most > hardware that's turned off is not cost-effective to rent out, and that > newer hardware being launched would push the hashrate back up again within > a sensible timeframe. > > Ross > > > > On 25/10/2014 19:06, Alex Mizrahi wrote: > > # Death by halving > > ## Summary > > If miner's income margin are less than 50% (which is a healthy situation > when mining hardware is readily available), we might experience > catastrophic loss of hashpower (and, more importantly, catastrophic loss of > security) after reward halving. > > ## A simple model > > Let's define miner's income margin as `MIM = (R-C_e)/R`, where R is the > total revenue miner receives over a period of time, and C_e is the cost of > electricity spent on mining over the same period of time. (Note that for > the sake of simplicity we do not take into account equipment costs, > amortization and other costs mining might incur.) > > Also we will assume that transaction fees collected by miner are > negligible as compared to the subsidy. > > Theorem 1. If for a certain miner MIM is less than 0.5 before subsidy > halving and bitcoin and electricity prices stay the same, then mining is no > longer profitable after the halving. > > Indeed, suppose the revenue after the halving is R' = R/2. > MIM = (R-C_e)/R < 0.5 > R/2 < C_e. > > R' = R/2 < C_e. > > If revenue after halving R' doesn't cover electricity cost, a rational > miner should stop mining, as it's cheaper to acquire bitcoins from the > market. > > ~~~ > > Under these assumptions, if the majority of miners have MIM less than > 0.5, Bitcoin is going to experience a significant loss of hashing power. > But are these assumptions reasonable? We need a study a more complex model > which takes into account changes in bitcoin price and difficulty changes > over time. > But, first, let's analyze significance of 'loss of hashpower'. > > ## Catastrophic loss of hashpower > > Bitcoin security model relies on assumption that a malicious actor > cannot acquire more than 50% of network's current hashpower. > E.g. there is a table in Rosenfeld's _Analysis of Hashrate-Based Double > Spending_ paper which shows that as long as the malicious actor controls > only a small fraction of total hashpower, attacks have well-define costs. > But if the attacker-controlled hashrate is higher than 50%, attacks become > virtually costless, as the attacker receives double-spending revenue on top > of his mining revenue, and his risk is close to zero. > > Note that the simple model described in the aforementioned paper doesn't > take into account attack's effect on the bitcoin price and the price of the > Bitcoin mining equipment. I hope that one day we'll see more elaborate > attack models, but in the meantime, we'll have to resort to hand-waving. > > Consider a situation where almost all available hashpower is available > for a lease to the highest bidder on the open market. In this case someone > who owns sufficient capital could easily pull off an attack. > > But why is hashpower not available on the market? Quite likely equipment > owners are aware of the fact that such an attack would make Bitcoin > useless, and thus worthless, which would also make their equipment > worthless. Thus they prefer to do mining for a known mining pools with good > track record. > (Although hashpower marketplaces exist: https://nicehash.com/ they aren't > particularly popular.) > > Now let's consider a situation where mining bitcoins is no longer > profitable and the majority of hashpower became dormant, i.e. miners turned > off their equipment or went to mine something else. In this case equipment > is already nearly worthless, so people might as well lease it to the > highest bidder, thus enabling aforementioned attacks. > > Alternatively, the attacker might buy obsolete mining equipment from > people who are no longer interested in mining. > > ## Taking into account the Bitcoin price > > This is largely trivial, and thus is left as an exercise for the reader. > Let's just note that the Bitcoin subsidy halving is an event which is known > to market participants in advance, and thus it shouldn't result in > significant changes of the Bitcoin price, > > ## Changes in difficulty > > Different mining devices have different efficiency. After the reward > halving mining on some of these devices becomes unprofitable, thus they > will drop out, which will result in a drop of mining difficulty. > > We can greatly simplify calculations if we sum costs and rewards across > all miners, thus calculating average MIM before the halving: `MIM = 1 - > C_e/R`. > > Let's consider an equilibrium break-even situation where unprofitable > mining devices were turned off, thus resulting in the change in electricity > expenditures: `C_e' = r * C_e`. and average MIM after the halving `MIM' = > 0`. In this case: > > r * C_e = R/2 > C_e / R = 1/2r > (1 - MIM) = 1/2r > r = 1/(2*(1-MIM)) > > Let's evaluate this formulate for different before-halving MIM: > > 1. If `MIM = 0.5`, then `r = 1/(2*0.5) = 1`, that is, all miners can > remain mining. > 2. If `MIM = 0.25`, then `r = 1/(2*0.75) = 0.66`, the least efficient > miners consuming 33% of total electricity costs will drop out. > 3. If `MIM = 0.1`, then `r = 1/(2*0.9) = 0.55`, total electricity costs > drop by 45%. > > We can note that for the before-halving MIM>0, r is higher than 1/2, > thus less than half of total hashpower will drop out. > > The worst-case situation is when before-halving MIM is close to zero and > mining devices, as well as cost of electricity in different places, are > nearly identical, in that case approximately a half of all hashpower will > drop out. > > ## MIM estimation > > OK, what MIM do we expect in the long run? Is it going to be less than > 50% anyway? > > We can expect that people will keep buying mining devices as long as it > is profitable. > > Break-even condition: `R - C_e - P = 0`, where P is the price of a > mining device, R is the revenue it generates over its lifetime, and C_e is > the total cost of required electricity over its lifetime. In this case, `R > = C_e + P`, and thus: > > MIM = 1 - C_e / (C_e + P) > > `f = C_e / P` is a ratio of the cost of electricity to the cost of > hardware, `C_e = f * P`, and thus > > MIM = 1 - f * P / (f * P + P) = 1 - f / (f + 1) = 1 / (1 + f) > > MIM is less than 0.5 when f > 1. > > Computing f is somewhat challenging even for a concrete device, as it's > useful lifetime is unknown. > > Let's do some guesstimation: > > Spondoolies Tech's SP35 Yukon unit consumes 3.5 KW and costs $4000. If > it's useful lifetime is more than 2 years and a cost of KWh is $0.1, the > total expenditures on electricity will be at least $6135, thus for this > device we have `f > 6135/4000 > 1.5`. > > If other devices which will be sold on the market will have similar > specs, we will have MIM lower than 0.5. (Well, no shit.) > > ## Conclusions > > Reward halving is a deficiency in Bitcoin's design, but there is some > hope it won't be critical: in the equilibrium break-even situation > hashpower drop is less than 50%. > Hashrate might drop by more than 50% immediately after the halving (and > before difficulty is updated), thus a combination of the halving and slow > difficulty update pose a real threat. > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Bitcoin-development mailing listBitcoin-development@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/bitcoin-development > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Bitcoin-development mailing list > Bitcoin-development@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bitcoin-development > > --089e0160b5f44b69610506470256 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On 26 October 2014 00:10, Ross Nicoll <jrn@jrn.me.uk> wrote:=
=20 =20 =20
I'd suggest looking at how Dogecoin's mining schedule has worke= d out, for how halvings tend to actually affect the market. Part of Dogecoin's design was that it would halve very quickly (around ever= y 75 days, in fact), so it's essentially illustrating worst case scenario.

Yes that is an inte= resting data point, but it's really hard to find comparables to doge, a= nd most of its hashing is now merge mined with litecoin.=C2=A0 Comparing do= ge to btc may be a case of apples and oranges.
=C2=A0

Firstly, miners do not all move/shut down as a batch. Some will stay out of loyalty/apathy/optimism, so there's a jolt to hashrate when the rewards drop, and then a drift towards a steady-state. In most cases, the hardware costs vastly exceed the running costs, so while they may never see ROI due to the reward change, there's no benefit in stopping mining either.

On the other side, mining hardware update cycles are extremely aggressive, and newer hardware runs much faster. Further, those with newer hardware are likely to have the best hashrate to power ratio, and be less likely to turn off or rent out their hardware.

So, in theory there may be an uncomfortable period where the hashrate drops, but I would expect that drop to be much less than 50%, that most hardware that's turned off is not cost-effective to rent out, and that newer hardware being launched would push the hashrate back up again within a sensible timeframe.

Ross



On 25/10/2014 19:06, Alex Mizrahi wrote:
# Death by halving

## Summary

If miner's income margin are less than 50% (which is a healthy situation when mining hardware is readily available), we might experience catastrophic loss of hashpower (and, more importantly, catastrophic loss of security) after reward halving.

## A simple model

Let's define miner's income margin as `MIM =3D (R-C_e)= /R`, where R is the total revenue miner receives over a period of time, and C_e is the cost of electricity spent on mining over the same period of time. (Note that for the sake of simplicity we do not take into account equipment costs, amortization and other costs mining might incur.)

Also we will assume that transaction fees collected by miner are negligible as compared to the subsidy.

Theorem 1. If for a certain miner MIM is less than 0.5 before subsidy halving and bitcoin and electricity prices stay the same, then mining is no longer profitable after the halving.

Indeed, suppose the revenue after the halving is R' =3D R/= 2.
=C2=A0 =C2=A0MIM =3D (R-C_e)/R < 0.5
=C2=A0 =C2=A0R/2 < C_e.

=C2=A0 =C2=A0R' =3D R/2 < C_e.

If revenue after halving R' doesn't cover electricity = cost, a rational miner should stop mining, as it's cheaper to acquire bitcoins from the market.

~~~

Under these assumptions, if the majority of miners have MIM less than 0.5, Bitcoin is going to experience a significant loss of hashing power.=C2=A0
But are these assumptions reasonable? We need a study a more complex model which takes into account changes in bitcoin price and difficulty changes over time.
But, first, let's analyze significance of 'loss of hashpower'.

## Catastrophic loss of hashpower

Bitcoin security model relies on assumption that a malicious actor cannot acquire more than 50% of network's current hashpower.
E.g. there is a table in Rosenfeld's _Analysis of Hashrate-Base= d Double Spending_ paper which shows that as long as the malicious actor controls only a small fraction of total hashpower, attacks have well-define costs. But if the attacker-controlled hashrate is higher than 50%, attacks become virtually costless, as the attacker receives double-spending revenue on top of his mining revenue, and his risk is close to zero.

Note that the simple model described in the aforementioned paper doesn't take into account attack's effect on the bitcoin price and the price of the Bitcoin mining equipment. I hope that one day we'll see more elaborate attack models, but in the meantime, we'll have to resort to hand-waving.

Consider a situation where almost all available hashpower is available for a lease to the highest bidder on the open market. In this case someone who owns sufficient capital could easily pull off an attack.

But why is hashpower not available on the market? Quite likely equipment owners are aware of the fact that such an attack would make Bitcoin useless, and thus worthless, which would also make their equipment worthless. Thus they prefer to do mining for a known mining pools with good track record.
(Although hashpower marketplaces exist:=C2=A0https://nicehash.com/ they aren= 9;t particularly popular.)

Now let's consider a situation where mining bitcoins is no longer profitable and the majority of hashpower became dormant, i.e. miners turned off their equipment or went to mine something else. In this case equipment is already nearly worthless, so people might as well lease it to the highest bidder, thus enabling aforementioned attacks.

Alternatively, the attacker might buy obsolete mining equipment from people who are no longer interested in mining.

## Taking into account the Bitcoin price

This is largely trivial, and thus is left as an exercise for the reader. Let's just note that the Bitcoin subsidy halving is an event which is known to market participants in advance, and thus it shouldn't result in significant change= s of the Bitcoin price,

## Changes in difficulty

Different mining devices have different efficiency. After the reward halving mining on some of these devices becomes unprofitable, thus they will drop out, which will result in a drop of mining difficulty.

We can greatly simplify calculations if we sum costs and rewards across all miners, thus calculating average MIM before the halving: `MIM =3D 1 - C_e/R`.

Let's consider an equilibrium break-even situation where unprofitable mining devices were turned off, thus resulting in the change in electricity expenditures: `C_e' =3D r * C_e`. a= nd average MIM after the halving `MIM' =3D 0`. In this case:

=C2=A0 =C2=A0 r * C_e =3D R/2
=C2=A0 =C2=A0 C_e / R =3D 1/2r
=C2=A0 =C2=A0 (1 - MIM) =3D 1/2r
=C2=A0 =C2=A0 r =3D 1/(2*(1-MIM))

Let's evaluate this formulate for different before-halving MIM:

1. If `MIM =3D 0.5`, then `r =3D 1/(2*0.5) =3D 1`, that is, al= l miners can remain mining.
2. If `MIM =3D 0.25`, then `r =3D 1/(2*0.75) =3D 0.66`, the le= ast efficient miners consuming 33% of total electricity costs will drop out.
3. If `MIM =3D 0.1`, then `r =3D 1/(2*0.9) =3D 0.55`, total electricity costs drop by 45%.

We can note that for the before-halving MIM>0, r is higher than 1/2, thus less than half of total hashpower will drop out.

The worst-case situation is when before-halving MIM is close to zero and mining devices, as well as cost of electricity in different places, are nearly identical, in that case approximately a half of all hashpower will drop out.

## MIM estimation

OK, what MIM do we expect in the long run? Is it going to be less than 50% anyway?

We can expect that people will keep buying mining devices as long as it is profitable.

Break-even condition: `R - C_e - P =3D 0`, where P is the price of a mining device, R is the revenue it generates over its lifetime, and C_e is the total cost of required electricity over its lifetime. In this case, `R =3D C_e + P`, and thus:

=C2=A0 =C2=A0 MIM =3D 1 - C_e / (C_e + P)

`f =3D C_e / P` is a ratio of the cost of electricity to the cost of hardware, `C_e =3D f * P`, and thus

=C2=A0 =C2=A0 MIM =3D 1 - f * P / (f * P + P) =3D 1 - f / (f += 1) =3D 1 / (1 + f)

MIM is less than 0.5 when f > 1.

Computing f is somewhat challenging even for a concrete device, as it's useful lifetime is unknown.

Let's do some guesstimation:

Spondoolies Tech's SP35 Yukon unit consumes 3.5 KW and costs $4000. If it's useful lifetime is more than 2 years and a cost of KWh is $0.1, the total expenditures on electricity will be at least $6135, thus for this device we have `f > 6135/4000 > 1.5`.

If other devices which will be sold on the market will have similar specs, we will have MIM lower than 0.5. (Well, no shit.)

## Conclusions

Reward halving is a deficiency in Bitcoin's design, but there is some hope it won't be critical: in the equilibrium break-even situation hashpower drop is less than 50%.
Hashrate might drop by more than 50% immediately after the halving (and before difficulty is updated), thus a combination of the halving and slow difficulty update pose a real threat.


-----------------------------------=
-------------------------------------------


_______________________________________________
Bitcoin-development mailing list
Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-de=
velopment


-----------------------------------------------------------------------= -------

_______________________________________________
Bitcoin-development mailing list
Bitcoin-develo= pment@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-de= velopment


--089e0160b5f44b69610506470256--