Bitcoin Forum
November 10, 2024, 01:45:35 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: A question about a potential difficulty attack  (Read 697 times)
Grey (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
November 08, 2013, 11:43:38 PM
 #1

Posted this on reddit, verbatim, but someone suggested I post it over here to possibly get a better response.

Tl;dr Could someone with enough processing power manipulate the difficulty or predicted hashrate in such a way as to force other miners to drop out by strategically going through cycles of mining and not mining, thereby gaining an advantage and eventually 50% of the network?

So, let's say we've got an adversary who's got a sizeable amount of computing power. And lets say he decides to fire up all his hardware for the amount of time it takes to make the difficulty change (let's call this a brick, because I don't know any other name for it; let me know if there's an official name in the comments and I'll change it), and makes the difficulty jump up. In the next brick, he turns off all his hardware and the difficulty jumps back down. And repeats.

As far as I can tell, with the proper set up, here's what would happen:

In the first brick, the time it takes for 2016 blocks to be mined is shorter than the previous brick by some amount. During these this time, our adversary has a slightly better-than-average chance to mine blocks because the network has not yet adapted. Let's say it takes 1.99 weeks for this first brick to process, and the difficulty increases at the end of the first brick.

In the second brick, our adversary stops mining, and it forces the second brick to last 2.01 weeks (making the difficulty go back down) because the network "expects" that computing power to be present. Some of the barely profitable miners drop out mid-brick because of the difficulty change, making the difficulty drop at the rate proportional to both our adversary's and the "fringeminers" computing power.

In the third brick, our adversary and a portion of the fringeminers (who saw the drop in difficulty and decided to give it another go) power back up, but this time our adversary has the advantage of some other miner's dropping out. Let's say enough of the other miners dropped out to make the third brick only last 1.98 days.

And then the fourth brick lasts 2.02 days.

And on and on until the adversary has gone through enough iterations to gain 50% of the computing power by making it unprofitable for others to mine and seizing on the easier difficulty?

I'm well aware that this would still take a ridiculous amount of money, but is there any reason why this couldn't be more feasible than flat out buying hardware to get to 50%?

And this also leads to the question if the 50% attack takes as a figure the actual hashrate or just the hashrate assumed by the network in calculating difficulty. I.e, if the difficulty is calculated to a hashrate of 10, and the actual hashrate when our adversary and some fringe miners pump back up is 20, with our adversary contributing 6, the fringe miners contributing 4, and the rest of the network contributing 10 does this constitute the adversary having 50% control over the network? I can't see why it wouldn't, but I don't know enough to make a definitive call. I feel like the answer to this is also the answer to if you can stop a 50% attack in progress or if you'd have to wait until the difficulty changes again, which of course could have major implications.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
November 08, 2013, 11:55:49 PM
 #2

You assume when miners drop out they won't simply monitor the difficulty.  The reality is they will be watching both the exchange rate and difficulty and checking the calculators and as soon as it is profitable they will jump back in.  The other thing to consider is most miners are hard headed.  GPU mining went negative ROI for many higher cost miners and the fall in difficulty lagged price by months.  Miners just clung on hoping for higher prices or that other miners would drop out first.  Miners are very quick to start and very reluctant to stop.  When mining becomes consistently negative margin for high power cost miners they are very likely to sell their rigs to lower cost miners.  Remember if margins are squeezed for the average miner those high efficiency miners (low power costs, cheap maybe used rigs, low J/GH) have much larger margins you aren't going to be able to drive difficulty up enough to force them out with any small fraction of the hashrate.

Still even if miners did act rationally all the time and had the same power costs and were vulnerable to being shaken out in mass it wouldn't work.  Difficulty is directly related to hashrate.  Your numbers are hard to follow because you switch between weeks and days?  All that matters is difficulty.   When difficulty drops miners will add hashing power, when difficulty is to high miners will add hashing power.   Say the attacker has 10% of the network.  To 51% the network that would mean getting 80%+ of the hashpower to go offline.  That means difficulty falling 80%.  What do you think would happen to ASIC sales (lets pretend all companies are in stock but nobody is buying because profits are too low) if difficult fell 80% and suddenly the daily profit exploded 500%?  Do you think a tiny number of miners might maybe think about mining or do you think we would see an explosion of new miners driving difficulty right back to small margin territory (up 400%)?

The simple answer is no that would do absolutely nothing except rack up massive losses for the miner trying that.
Gator-hex
Hero Member
*****
Offline Offline

Activity: 490
Merit: 500


View Profile
November 08, 2013, 11:59:09 PM
 #3

You will find most miners keep their equipment running, even at a loss, banking on the price increase in Bitcoin at a future date.

It was always a good time to mine yesterday.

freakying99
Sr. Member
****
Offline Offline

Activity: 429
Merit: 250


Pythagoras and Plato are my brothers.


View Profile
November 09, 2013, 12:19:04 AM
 #4

Many miners now dont care about profitability. Even when they know they wont extract the BTC back, they are still determined to buy the hardware

Seems like hobby
Grey (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
November 09, 2013, 12:24:28 AM
 #5

Fair warning, part of the reason I'm posting this in the newbie forum is because I've only cursory knowledge as to what I'm talking about. I suppose the question should be phrased more in a "why isn't this an issue?" rather than "Is this a problem?" sort of way.

The reason I hopped between weeks and days is because the difficult changes around every two weeks, just like a block is mined around every two minutes; the difficulty is set for the next two weeks based on the actual hash rate of the network, which in turn determines if 2016 blocks are more likely mined in less or more time than two weeks. I.E.; if 2016 blocks are mined in <2 weeks, then the difficulty increases, if 2016 blocks are mined in >2 weeks, the difficulty drops. At least this is my understanding.

That said, most of what you said makes sense to me. In reality, most miners don't drop out and would operate at a loss, but these sorts of attacks aren't really concerned with what the current mining economy is. I don't think it's an unreasonable prediction that if bitcoin *really* takes off, mining will become far less ideological and speculative, and much more logical and calculated as a necessity to maintain such an (eventually) expensive investment.

Plus, this part is where I think either we disagree or I'm mistaken.
Say the attacker has 10% of the network.  To 51% the network that would mean getting 80%+ of the hashpower to go offline.  That means difficulty falling 80%.  What do you think would happen to ASIC sales (lets pretend all companies are in stock but nobody is buying because profits are too low) if difficult fell 80% and suddenly the daily profit exploded 500%?  Do you think a tiny number of miners might maybe think about mining or do you think we would see an explosion of new miners driving difficulty right back to small margin territory (up 400%)?

The attack is taken advantage of the fact that (unless I'm mistaken) it takes two weeks for the difficulty to change, meaning it takes two weeks for these miners to be able to respond to that change.

And more along the lines of is the attacker has 40% of the network; they'd need to cause 20.1% of the network to go offline in order to 5% attack. In my understanding of how things work (which could be completely wrong), it sounds a lot more plausible to get 20.1% of the network to drop out due to a 40% increase in difficulty. If this attack could force a number of miners that 1.) comprise 20.1% of the processing power, 2.) cannot operate with a 40% increase in difficulty and have to drop out for two weeks until the difficulty goes back down, then it would be problematic and more feasible than a direct >50% attack, right?
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
November 09, 2013, 12:29:57 AM
 #6

And more along the lines of is the attacker has 40% of the network; they'd need to cause 20.1% of the network to go offline in order to 5% attack. In my understanding of how things work (which could be completely wrong), it sounds a lot more plausible to get 20.1% of the network to drop out due to a 40% increase in difficulty. If this attack could force a number of miners that 1.) comprise 20.1% of the processing power, 2.) cannot operate with a 40% increase in difficulty and have to drop out for two weeks until the difficulty goes back down, then it would be problematic and more feasible than a direct >50% attack, right?

In one difficulty adjustment?  No. 


Still even if you had a chance of doing that you also need to consider what it would cost to build, deploy and run 40% of the global hashpower.  I mean the only one who could afford that type of operation (to operate at a complete loss) would be a nation state.  If you are a nation why play around with a "40% lets hope we can force some miners out" weak sauce attack for $10B when you just build out 80% of network capacity and crush it for $20B.  What is $10B more?  Its only taxpayer money.

Note attack cost are just hypothetical future network cost for illustration.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!