[Bitcoin-development] Death by halving (pro-active proposals)

2014-10-29 Thread Sergio Lerner
Instead of discussing what will happen when the subsidy is halved (which
nobody really knows) maybe we can think about of what we can do to
mitigate any damage in case something unwanted happens. Let's be proactive.

For instance, any form of merged-mining (like higher frequency
side-chains) will end-up increasing miners profit, even by a small
margin. Then that margin can compensate miners not to turn off their
equipment. Then we can encourage merge-mining on SHA-256, instead of
discouraging SHA-256 alt-coins.

Also we can encourage mining during the trouble period by creating a
donation pool: suppose we manage to convince miners to donate 1% of
their revenue in order to pay back to the miners for the first month
after the reward halving. If every block pays 1% for 10 months, then
every block during the first month of halving will earn 20% more.  Of
course, convincing miners of this may be difficult, but not impossible.
It could be done automatically with nLockTime freeze of transactions
with high fees, so no TTP is necessary.

So here are two proposals, any other idea?

Best regards,
 Sergio.



--
___
Bitcoin-development mailing list
Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development


Re: [Bitcoin-development] Death by halving (pro-active proposals)

2014-10-29 Thread Jeff Garzik
Seconded - IMO a key future use of the chain will be securing other
chains.  I'm interested in pursuing the merged-mining angle.

Getting chain hashes to a miner, and getting that miner payment from
the chain, is key to this.  Consider a future where there are 10,000
chains secured by one block...


On Wed, Oct 29, 2014 at 10:34 AM, Sergio Lerner
sergioler...@certimix.com wrote:
 Instead of discussing what will happen when the subsidy is halved (which
 nobody really knows) maybe we can think about of what we can do to
 mitigate any damage in case something unwanted happens. Let's be proactive.

 For instance, any form of merged-mining (like higher frequency
 side-chains) will end-up increasing miners profit, even by a small
 margin. Then that margin can compensate miners not to turn off their
 equipment. Then we can encourage merge-mining on SHA-256, instead of
 discouraging SHA-256 alt-coins.

 Also we can encourage mining during the trouble period by creating a
 donation pool: suppose we manage to convince miners to donate 1% of
 their revenue in order to pay back to the miners for the first month
 after the reward halving. If every block pays 1% for 10 months, then
 every block during the first month of halving will earn 20% more.  Of
 course, convincing miners of this may be difficult, but not impossible.
 It could be done automatically with nLockTime freeze of transactions
 with high fees, so no TTP is necessary.

 So here are two proposals, any other idea?

 Best regards,
  Sergio.



 --
 ___
 Bitcoin-development mailing list
 Bitcoin-development@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/bitcoin-development



-- 
Jeff Garzik
Bitcoin core developer and open source evangelist
BitPay, Inc.  https://bitpay.com/

--
___
Bitcoin-development mailing list
Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development


Re: [Bitcoin-development] death by halving

2014-10-28 Thread Ferdinando M. Ametrano
On Oct 25, 2014 9:19 PM, Gavin Andresen gavinandre...@gmail.com wrote:
 We had a halving, and it was a non-event.
 Is there some reason to believe next time will be different?

In november 2008 bitcoin was a much younger ecosystem, with less liquidity
and trading, smaller market cap, and the halving happened during a quite
stable positive price trend.

In the next months competition might easily drive down mining margins, and
the reward halving might generate unexpected disruption in mining
operations.

Moreover, halving is not strictly necessary to respect the spirit of
Nakamoto's monetary rule and its 21M limit. At the beginning of the 3rd
reward era (block 42, in 2017) a new reward function could become
effective R(b)=k*2^(-h*b/21) where b is the block number and R(b) is
the reward. The parameters h and k can be calibrated so that R(41)=25
and sum_b{R}=21M


​If the increased issuance speed in the third era is considered
problematic, then each era could have its own R_e(b)=k_e*2^(-h_e*b/21)
fitted to the amount of coins to be issued in that era according to the
current supply rule, e.g. fitting k_e and h_e to R(41)=25 and
sum_{b}_e=2,625,000.

Would such a BIP have any chance to be considered? Am I missing something?

Nando
--
___
Bitcoin-development mailing list
Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development


[Bitcoin-development] death by halving

2014-10-25 Thread Alex Mizrahi
# 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 MIM0, r is higher than 1/2, thus
less than half of total hashpower will drop 

Re: [Bitcoin-development] death by halving

2014-10-25 Thread Jeff Garzik
On Sat, Oct 25, 2014 at 2:06 PM, Alex Mizrahi alex.mizr...@gmail.com wrote:
 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.

Flag day herd behavior like this is unlikely for well informed and
well prepared market participants.

-- 
Jeff Garzik
Bitcoin core developer and open source evangelist
BitPay, Inc.  https://bitpay.com/

--
___
Bitcoin-development mailing list
Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development


Re: [Bitcoin-development] death by halving

2014-10-25 Thread Jeff Garzik
It is an overly-simplistic miner model to assume altruism is
necessary.  The hashpower market is maturing in the direction of
financial instruments, where the owner of the hashpower is not
necessarily the one receiving income.  These are becoming tradeable
instruments, and derivatives and hedging are built on top of that.
Risk is hedged at each layer.  Market players also forge agreements
with miners, and receive -negative- value if hashpower is simply shut
down.

Simplistic models cannot predict what hashpower does in the face of
business-to-business medium- and long-term contracts.


On Sat, Oct 25, 2014 at 2:22 PM, Alex Mizrahi alex.mizr...@gmail.com wrote:


 Flag day herd behavior like this is unlikely for well informed and
 well prepared market participants.


 It is simply rational to turn your mining device off until difficulty
 adjusts.
 Keeping mining for 2+ weeks when it costs you money is an altruistic
 behavior, we shouldn't rely on this.

 --

 ___
 Bitcoin-development mailing list
 Bitcoin-development@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/bitcoin-development




-- 
Jeff Garzik
Bitcoin core developer and open source evangelist
BitPay, Inc.  https://bitpay.com/

--
___
Bitcoin-development mailing list
Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development


Re: [Bitcoin-development] death by halving

2014-10-25 Thread Gavin Andresen
We had a halving, and it was a non-event.

Is there some reason to believe next time will be different?

-- 
--
Gavin Andresen
--
___
Bitcoin-development mailing list
Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development


Re: [Bitcoin-development] death by halving

2014-10-25 Thread Adam Back
Some thoughts about Alex's analysis:

- bitcoin price may increase (though doubling immediately might be
unlikely) after the halving (because the new coins are in short
supply). Apparently there is some evidence of a feedback loop between
number of freshly mined coins sold to cover electrical costs ongoing
(which depends on halving also), in that there are claims that the btc
price experiences some downwards pressure when margins are slim as
miners sell almost all of them when the electrical cost takes most of
the profit, and otherwise tend more to hold coins longer term.

- that people who cant make money mining with 1/2 reward will resort
to attacking the network rather than living with it for 2weeks until
difficulty adjustment).  actually it will be longer than two weeks if
its going to result in a difficulty fall.

- that the miners wont act in their own meta-interest to aim for the
plausible new hashrate supported by the lower reward.  mining
equipment investment horizon being 3-6mo+ so it can easily make
economic sense to subsidise it for a bit to smooth the transition.

- fees might go up to unjam the network also, so the people
benefitting from the transactions utility also help cover the
transition costs.  or maybe someone makes an assurance contract to pay
the short fall and phase it out over a few months to smooth the shift.

- there is a wide range of electrical efficiency, and some are much
worse than others so there maybe a convenient equilibrium where there
are enough left who can still profit.

- alternatively you might say why not 1/100th reward reduction per 2
week period rather than 1/2 every 4 years, a difficulty retarget could
be a convenient point to do that.

Adam

On 25 October 2014 11:06, Alex Mizrahi alex.mizr...@gmail.com 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 

Re: [Bitcoin-development] death by halving

2014-10-25 Thread Thomas Zander
On Saturday 25. October 2014 21.06.32 Alex Mizrahi wrote:
 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.


For the sake of argument, lets assume that somehow (quite unlikely) half the 
mining equipment gets shut off.
The amount of hashes/second is such that it is currently, lets just say, quite 
secure against any takeover.

Your document makes a long series of assumptions about how this can turn out 
bad with each individually is implausible, together are just fiction.

Your research didn't convince me about this being bad somehow. It also 
completely disregards the equilibriums reached by doing so.

--
___
Bitcoin-development mailing list
Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development


Re: [Bitcoin-development] death by halving

2014-10-25 Thread Thomas Zander
On Saturday 25. October 2014 13.27.30 Adam Back wrote:
 - alternatively you might say why not 1/100th reward reduction per 2
 week period rather than 1/2 every 4 years, a difficulty retarget could
 be a convenient point to do that.

mining equipment has a much shorter lifetime than 4 years, so the halving 
makes it easy to base purchases on.
Also, divide by two is the cleanest way to get to zero after a specific amount 
of divisions.

--
___
Bitcoin-development mailing list
Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development


Re: [Bitcoin-development] death by halving

2014-10-25 Thread Alex Mizrahi
 For the sake of argument, lets assume that somehow (quite unlikely)


Why is it unlikely? Do you believe that the cost of electricity cannot be
higher than expected mining revenue?
Or do you expect miners to keep mining when it costs them money?


 half the mining equipment gets shut off.
 The amount of hashes/second is such that it is currently, lets just say,
 quite
 secure against any takeover.


The equipment won't be simply turned off, it will be up for grabs.

Please check this web sites:

https://nicehash.com/
https://www.multipool.us/

One can use them in the same way he uses normal mining pools, and they
switch between different chains.
Say, multipool.us can switch between BTC and PPC (Peercoin).
Mining BTC will be less profitable after a halving, so a miner who is
willing to maximize his profits might use multipool to auto-switch to
something more profitable.
Which might be attack-on-Bitcoin.
E.g. if 60% of bitcoin's total hashrate is available via multipools, one
can try to pull of a double-spending attack.


 Your document makes a long series of assumptions about how this can turn
 out
 bad with each individually is implausible, together are just fiction.


It sounds like you failed to grasp even basics.
--
___
Bitcoin-development mailing list
Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development


Re: [Bitcoin-development] death by halving

2014-10-25 Thread Melvin Carvalho
On 25 October 2014 21:53, Alex Mizrahi alex.mizr...@gmail.com wrote:


 We had a halving, and it was a non-event.
 Is there some reason to believe next time will be different?


 Yes.

 When the market is rapidly growing, margins can be relatively high because
 of limited amounts of capital being invested, or introduction of more
 efficient technologies.

 However, we should expect market to become more mature with time, and a
 mature market will result in lower margins.
 The halving can do much more damage when margins are relatively small.

 Besides that, there is a difference in ecosystem maturity:

 1. Back in 2012, miners weren't so focused on profits, as Bitcoin was
 highly experimental: some were mining for the hell of it (it was a novelty
 thing back then), others wanted to secure the network, others did it
 because it was hard to obtain bitcoins by other means. But now miners are
 mostly profit-motivated: they buy expensive dedicated mining equipment and
 want to maximize profits. As you might know, at one point ghash.io
 reached 50% hashrate, and miners didn't care about it enough to switch to a
 different pool.

 2. Back in 2012, we didn't have multipools. Multipools automatically
 switches between mining different alt-chains to maximize miners' profits.
 Miners who use multipools do not care how their hashrate is used as long as
 they profit off it.
 Particularly, check https://nicehash.com/ -- you can easily buy hashrate
 to attack a smaller alt-coin, for example.

 If the halving will result in a significant hashrate drop (and we did
 observe hashrate drop in 2012, although it wasn't that big), it might be
 possible to buy enough hashpower to attack Bitcoin.


This is a good point, imho.  Miner sophistication has increased drastically
in 2 years.  Sites like ( http://www.coinwarz.com/ ) can heavily influence
mining, 1-2 orders of magnitude on significant levels of hashing.

I think this is more prevalent with scrypt than sha256, litecoin is set to
half reward in 9 months, and it will be interesting to observe what happens
there.





 --

 ___
 Bitcoin-development mailing list
 Bitcoin-development@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/bitcoin-development


--
___
Bitcoin-development mailing list
Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development


Re: [Bitcoin-development] death by halving

2014-10-25 Thread Alexander Leishman
Interesting analysis! I think there are a few important effects that aren't
being considered.

1. When the block reward is halved, inflation is halved as well. Is this
halving already priced in by the market or will it result in an upward
pressure on the price?

2. It was acknowledged that the referenced analysis did not take into
account the result of a double-spend attack on the bitcoin price. However,
the effect of a detectable double-spend attack on the Bitcoin network is
not isolated to Bitcoin markets. The price of altcoins often trend with the
price of Bitcoin, so attacking Bitcoin may reduce the profitability of
'multipool' mining. Any alt-coin market vulnerable to the malicious
hash-power would probably go into panic mode.

-Alex Leishman




On Sat Oct 25 2014 at 1:51:10 PM Alex Mizrahi alex.mizr...@gmail.com
wrote:



 For the sake of argument, lets assume that somehow (quite unlikely)


 Why is it unlikely? Do you believe that the cost of electricity cannot be
 higher than expected mining revenue?
 Or do you expect miners to keep mining when it costs them money?


 half the mining equipment gets shut off.
 The amount of hashes/second is such that it is currently, lets just say,
 quite
 secure against any takeover.


 The equipment won't be simply turned off, it will be up for grabs.

 Please check this web sites:

 https://nicehash.com/
 https://www.multipool.us/

 One can use them in the same way he uses normal mining pools, and they
 switch between different chains.
 Say, multipool.us can switch between BTC and PPC (Peercoin).
 Mining BTC will be less profitable after a halving, so a miner who is
 willing to maximize his profits might use multipool to auto-switch to
 something more profitable.
 Which might be attack-on-Bitcoin.
 E.g. if 60% of bitcoin's total hashrate is available via multipools, one
 can try to pull of a double-spending attack.


 Your document makes a long series of assumptions about how this can turn
 out
 bad with each individually is implausible, together are just fiction.


 It sounds like you failed to grasp even basics.
 
 --
 ___
 Bitcoin-development mailing list
 Bitcoin-development@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/bitcoin-development

--
___
Bitcoin-development mailing list
Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development


Re: [Bitcoin-development] death by halving

2014-10-25 Thread Melvin Carvalho
On 26 October 2014 00:10, Ross Nicoll j...@jrn.me.uk 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