Author

Topic: Bitcoin 51% attack and its effect (Read 283 times)

hero member
Activity: 994
Merit: 701
May 22, 2022, 03:00:03 PM
#16
Thank you all for the corrections. With all your replies so far, have seen where my lapses where and I will take them into consideration when making a new thread in the future.
Thank you all for your contributions, am going to lock this thread now.
hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
May 22, 2022, 06:54:54 AM
#15
Quote
Actually, if you have 50%, you have 50% chance, but if you have 51%, the probability of mining the next block goes straight to 100%.

Nope, it doesn't, the probability for the next block is the same, you can't have 100% probability on the next block even if you own 99.9999% of the hashrate.

With 51% of it you're sure that you'll sometime reverse it. But, you only have a 51% chance to solve the next block.

This will probably make newbies or those who doesn't know believe that those who have 50% mining power have a 100% probability of mining the next block if not because of the explanation above.
If you have more than half percentage of the hashrate, you have 100% probability of attacking successfully. It's not definite that you'll reverse the next block, but it's a matter of time until you attack successfully.
I'm sorry, you guys are right! I was thinking long-term every 'next block' will be mined by you since you revert anything else. But of course, the probability for the very next block would be 51%.
So technically, there is a guarantee that every block is yours eventually after the moment you reached hashrate majority. Just not at every point in time.

Quote
If you do it smartly, it will also be hard to identify you do actually control such a large portion of hashrate, thus any attempts of detecting or banning your blocks will be futile.
Taking away 51% of the hashrate and having it mine in secret a second chain is close to impossible right now, not with 20% of the hashrate in hands of public traded companies (with more to come) that will not only be the first going bankrupt but will also face lawsuits after lawsuits from this.
I don't know how hard it is. Like, if someone had authority over multiple mining pools that together have over 50% and they would be the only ones finding new blocks, it might not be very easy to spot. Especially since it appears as multiple different pools and there won't be like exclusively consecutive blocks by the same miner or mining pool.
legendary
Activity: 2268
Merit: 18711
May 22, 2022, 05:16:50 AM
#14
Irrelevant, but why is this the attacker success probability and not the latter? If you overcome x blocks and catch up to the main chain, assuming difficulty remains the same, you don't reorg the chain. You need to mine another block to succeed.
You are correct, but catching up to the main chain as opposed to overtaking it is the definition that Satoshi used in section 11 of the whitepaper, so that is what has stuck.

For q=0.4 and z=2, it's 73.6%. Not 74.5%.
Correct, which matches the table at the bottom of the page on learnmeabitcoin that OP listed as his source here: https://learnmeabitcoin.com/technical/51-attack. As I said, OP has (for reasons unknown) slightly changed all the numbers to incorrect ones.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
May 22, 2022, 05:04:00 AM
#13
You are calculating the percentage chance for a malicious miner to overcome an x block deficit and catch up to the main chain.
Irrelevant, but why is this the attacker success probability and not the latter? If you overcome x blocks and catch up to the main chain, assuming difficulty remains the same, you don't reorg the chain. You need to mine another block to succeed.

If you add 1 to your z value for all your calculations, they'll match the table on learnmeabitcoin.
For q=0.4 and z=2, it's 73.6%. Not 74.5%.
legendary
Activity: 2268
Merit: 18711
May 22, 2022, 04:55:26 AM
#12
Also, the math for 40%, 30%, 20% and 10% seem wrong. How did you do the calculations? For q=0.4 and z=1, I get 82.8%, not 74.5%. You can either run the C code[1] or use this[2] site that's implemented in javascript.
You are calculating the percentage chance for a malicious miner to overcome an x block deficit and catch up to the main chain. The table OP has lifted from learnmeabitcoin calculates the percentage chance for a malicious miner to overcome an x block deficit and overtake the main chain by 1 block. If you add 1 to your z value for all your calculations, they'll match the table on learnmeabitcoin.

I'm not sure what OP has done, but all his numbers differ from the actual calculations on the table he is copying. I think it's safe to say he doesn't understand what he is posting.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
May 22, 2022, 04:01:19 AM
#11
Quote
The attacker can't:

Reverse other people's transactions without their cooperation (unless their coin history has been affected by a double-spend)
Send coins that never belonged to him
Change the number of coins generated per block
Aren't these three false?

An attacker can reverse other people's transactions without their consent, even if their coin has not been affected by a double-spend. For example, removing all the transactions from the last block essentially reverses all of the transactions in the last block. Furthermore, an attacker can send coins that never belonged to him. If they replace blocks, they've essentially taken coins (block subsidy) that belonged to others.

As for changing the number of coins, that's half true. They can't mine more than 6.25 BTC as that'd be considered an invalid coinbase transaction. However, there's nothing stopping them from rewarding themselves lower than that. There's no point into doing that, though.
legendary
Activity: 2702
Merit: 4002
May 22, 2022, 03:30:27 AM
#10
The topic title indicates "Bitcoin 51% attack and its effect " but you didn't talk about the effects, I can quote the effects from here ---> https://en.bitcoin.it/wiki/Weaknesses#Attacker_has_a_lot_of_computing_power:


Quote
An attacker that controls more than 50% of the network's computing power can, for the time that he is in control, exclude and modify the ordering of transactions. This allows him to:

Reverse transactions that he sends while he's in control. This has the potential to double-spend transactions that previously had already been seen in the block chain, affecting all coins that share a history with the reversed transaction
Reverse confirmations for any transaction that had previously been seen in the block chain while he’s in control.
Prevent some or all transactions from gaining any confirmations
Prevent some or all other miners from mining any valid blocks

The attacker can't:

Reverse other people's transactions without their cooperation (unless their coin history has been affected by a double-spend)
Prevent transactions from being sent at all (they'll show as 0/unconfirmed)
Change the number of coins generated per block
Create coins out of thin air
Send coins that never belonged to him

I think that the percentages mentioned above are not accurate, you can find more here  https://bitcointalksearch.org/topic/m.30083 .


Personally, I don't see that someone who would attempt such a costly attack would attempt to do so at a rate of less than 60% and would rely on luck while burning millions of dollars every second.


legendary
Activity: 1512
Merit: 7340
Farewell, Leo
May 22, 2022, 01:54:26 AM
#9
The 51% attack involves altering previously mined transactions in the blockchain.
Note that this isn't what you're showing in the table. The probability to attack successfully isn't the same as with the probability of solving the next block. The former doesn't take into account the next, specific block. With 51% of it you're sure that you'll sometime reverse it. But, you only have a 51% chance to solve the next block.

Also, the math for 40%, 30%, 20% and 10% seem wrong. How did you do the calculations? For q=0.4 and z=1, I get 82.8%, not 74.5%. You can either run the C code[1] or use this[2] site that's implemented in javascript. 

This will probably make newbies or those who doesn't know believe that those who have 50% mining power have a 100% probability of mining the next block if not because of the explanation above.
If you have more than half percentage of the hashrate, you have 100% probability of attacking successfully. It's not definite that you'll reverse the next block, but it's a matter of time until you attack successfully.




[1] https://bitcoin.org/bitcoin.pdf, 7th page.
[2] https://web.archive.org/web/20181231045818/https://people.xiph.org/~greg/attack_success.html
legendary
Activity: 2912
Merit: 6403
Blackjack.fun
May 22, 2022, 12:58:58 AM
#8
There is a chance that all other miners combined will extend the chain by a few blocks that are not yours, but since you have more than half of the hashpower, you're guaranteed to produce a longer chain sooner or later where those blocks are reverted / orphaned.

And the OP should have also added the tiny writing under that table:
Quote
The numbers in the table above assume you are attempting to replace blocks by building an alternate chain that is one block longer than the current longest chain.
It's not about mining the next blocks faste than others is about mining a longer chain others don't know about.

Quote
If you do it smartly, it will also be hard to identify you do actually control such a large portion of hashrate, thus any attempts of detecting or banning your blocks will be futile.

Taking away 51% of the hashrate and having it mine in secret a second chain is close to impossible right now, not with 20% of the hashrate in hands of public traded companies (with more to come) that will not only be the first going bankrupt but will also face lawsuits after lawsuits from this.
legendary
Activity: 3472
Merit: 10611
May 21, 2022, 11:54:54 PM
#7
and getting stronger as mining hashrate is increasing
More important than the increasing hashrate is its spread, in my opinion. We don't want any one entity having too much hash power and luckily this has never been true in bitcoin. The biggest mining farms only have a minuscule percentage of the total hashrate. The chart you posted is part of that representation since it only shows pools and unfortunately we can't have similar charts showing farms.
legendary
Activity: 1512
Merit: 4795
Leading Crypto Sports Betting & Casino Platform
May 21, 2022, 10:01:18 PM
#6
A miner with 50% mining power has a 100% probability of mining the next block
This is incorrect. 50% of the mining power gives you 50% probability of finding the next block.
Sorry I have to delete what I posted about this before. This is not about a miner to mine the next block alone. Two miners can mine a block, first, the two blocks are valid, but one will become invalid after chain reorg. The miner that finally mine the (valid) block is the one that mined the block that other blocks are building on after chain reorg to have the longest chain.

Actually, if you have 50%, you have 50% chance, but if you have 51%, the probability of mining the next block goes straight to 100%.
A block can be mined by two miners, let us assume by a miner A with 40% hashrates and miner B with low % of hashrates. In such a way if 2 blocks are mined at the same time, there would be a chain reorg in a way new blocks mined will build on the longest chain which will be valid while the other become no more valid.

With a single miner having 40% of the hashrates, the miner would mine more blocks and have more chance to compete with other miners with low hashrates during chain reorg, so having more chance to be the miner that will finally mine the block, while chances that blocks mined by other miner become invalid is higher.

But the longer the chain by uncentralized miners, the lesser the chance.

You can check the table in the OP, having a hashrate of 40%, there is 73.6% chance that the miner can replace (finally be the valid block mined) blocks with 1 confirmation, 66.4% chance to replace block having 2 confirmations already...33.2% chance to replace block with 10 confirmations.

Having 50% hashrates should be able to lead to an attack in a way the chance to reverse 10 blocks should be possible, but the more the centralized hashrate, the easier the chances of the attack.
hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
May 21, 2022, 08:36:12 PM
#5
A miner with 50% mining power has a 100% probability of mining the next block
This is incorrect. 50% of the mining power gives you 50% probability of finding the next block.
This will probably make newbies or those who doesn't know believe that those who have 50% mining power have a 100% probability of mining the next block if not because of the explanation above. I would say that if you have 100% mining power then I could say that it is possible to have 100% probability of mining most of the block. I just checked mempool.space and foundry USA pool have more mining power which have more chance of mining ntje next block.
Actually, if you have 50%, you have 50% chance, but if you have 51%, the probability of mining the next block goes straight to 100%.
That's because with 51% of the hashpower, you have the majority and can just reject any blocks not mined by you. There is a chance that all other miners combined will extend the chain by a few blocks that are not yours, but since you have more than half of the hashpower, you're guaranteed to produce a longer chain sooner or later where those blocks are reverted / orphaned.
Therefore, 50% is exactly the tipping point where you go from 50/50 odds to guaranteed authority over the blockchain... Smiley

If you do it smartly, it will also be hard to identify you do actually control such a large portion of hashrate, thus any attempts of detecting or banning your blocks will be futile.
hero member
Activity: 2268
Merit: 669
Bitcoin Casino Est. 2013
May 21, 2022, 04:54:20 PM
#4
A miner with 50% mining power has a 100% probability of mining the next block
This is incorrect. 50% of the mining power gives you 50% probability of finding the next block.
This will probably make newbies or those who doesn't know believe that those who have 50% mining power have a 100% probability of mining the next block if not because of the explanation above. I would say that if you have 100% mining power then I could say that it is possible to have 100% probability of mining most of the block. I just checked mempool.space and foundry USA pool have more mining power which have more chance of mining ntje next block.
legendary
Activity: 1512
Merit: 4795
Leading Crypto Sports Betting & Casino Platform
May 21, 2022, 04:44:05 PM
#3
In history, bitcoin has never suffered 51% attack, bitcoin blockchain remains strong and getting stronger as mining hashrate is increasing, reaching all-time-high and in a way a single mining pool presently is not having over 30% of the mining hashrate.


https://www.blockchain.com/charts/pools




The above second chart is a chart percentage of blocks mined in 4 days by mining pools. F2Pool is the mining pool that is presently having the highest hashrates with 80 blocks mined among the total 523 blocks mined during the time. If the ratio of that is taking and calculated in percentage, F2Pool is having just 15.296% of the total mined blocks during the time, and a means to show that it F2Pool will not have up to 30% of the total hashrates. I hope I can see the recent data of the total hashrate each mining pools are producing.
hero member
Activity: 1659
Merit: 687
LoyceV on the road. Or couch.
May 21, 2022, 04:21:38 PM
#2
A miner with 50% mining power has a 100% probability of mining the next block
This is incorrect. 50% of the mining power gives you 50% probability of finding the next block.
hero member
Activity: 994
Merit: 701
May 21, 2022, 03:21:07 PM
#1
The 51% attack involves altering previously mined transactions in the blockchain.
This is only achievable if one's mining power is greater than that of other miners. Mining the next block is determined by one's mining power in comparison to other miners, for example:

Table demonstrating the likelihood of a miner replacing the previous blocks in order of mining power.

S/N|50% mining power| 40% mining power | 30% mining power | 20% mining power | 10% mining power |
_________________|_________________|_________________|_________________|_________________|_________________|
1| 100% | 74.5% | 44.5% | 20.5% | 5.2% |
_________________|_________________|_________________|_________________|_________________|_________________|
2| 100% | 65.6% | 40.1% | 18.5% | 1.4% |
_________________|_________________|_________________|_________________|_________________|_________________|
3| 100% | 60.9% | 35.6% | 16.4% | 0.3% |
_________________|_________________|_________________|_________________|_________________|_________________|
4| 100% | 55.5% | 31.2% | 14.4% | 0.1% |
_________________|_________________|_________________|_________________|_________________|_________________|
5| 100% | 50.1% | 26.7% | 12.3% | 0.03% |
_________________|_________________|_________________|_________________|_________________|_________________|
6| 100% | 48.3% | 22.25% | 5.6% | 0.07% |
_________________|_________________|_________________|_________________|_________________|_________________|
7| 100% | 44.7% | 17.8% | 1.7% | 0.002% |
_________________|_________________|_________________|_________________|_________________|_________________|
8| 100% | 39.9% | 13.4% | 0.8% | 0.0004% |
_________________|_________________|_________________|_________________|_________________|_________________|
9| 100% | 34.6% | 8.9% | 0.1% | 0.00001% |
_________________|_________________|_________________|_________________|_________________|_________________|
10| 100% | 32.3% | 4.5% | 0.05% | 0.000002% |
_________________|_________________|_________________|_________________|_________________|_________________|

Each column reflects the mining power and the possibility of mining the next block, while S/N denotes the number of blocks to be mined. A miner with 50% mining power has a 100% probability of mining the next block, whereas a miner with 40% mining power has 74.5 %, and so on for the other miners and their mining power for the future blocks.

In bitcoin's history, no miner has ever achieved a 51% attack on the mining power, but some miners have gotten close to achieving 50% or more. Due to the high expense of obtaining such hashing power, major cryptocurrencies such as bitcoin are unlikely to be affected by a 51% attempt. The 51% attack only affects smaller cryptocurrencies like Bitcoinsv and other bitcoin forks with substantially less mining network capacity.




Source: https://learnmeabitcoin.com/technical/51-attack

The picture above illustrates the amount of mining power each miner possesses. As of June 2014, only one miner (GHash.io) came close to 50% with the mining power estimated to be 38.24%. With his mining power he has the high probability of mining the next block into the blockchain.
Jump to: