<p>The formula is directly from the <a href="https://bitcoin.org/bitcoin.pdf" rel="nofollow">original paper by Satoshi Nakamoto.</a> Check pages 6-8. The paper has C code to easily compute the values, and <a href="https://people.xiph.org/~greg/attack_success.html" rel="nofollow">that page you linked to</a> is just that C code converted to javascript.</p>

CC BY-SA 3.0
2014-07-05T18:35:17.420Z
2014-07-05T18:35:17.420Z
Buge
<p>With the recent (early 2014) GHash.io concerns about that particular mining pool getting too big, many people have talk about what a powerful miner could do if it wanted to "harm" bitcoin or double-spend, etc.</p>

<p>At one point someone pointed on that if you have 40% of the mining power, you have a 50% chance of reverting 6 blocks.</p>

<p>I'd have expected it to be (0.4 exp 7) (6 blocks + the next one) or something like that and not 50%.</p>

<p>What is the formula to use to compute the "harm" that a malicious miner could do and how many blocks he could revert?</p>

<p><strong>EDIT</strong></p>

<p>Here's a page containing the formula:</p>

<p><a href="https://people.xiph.org/~greg/attack_success.html">https://people.xiph.org/~greg/attack_success.html</a></p>

<p>Don't put too many blocks otherwise the code will have a numeric overflow.</p>

<p>But normally it's using the formula in the bitcoin paper and that page has been written by the person who came up with the concept of deterministic wallets (if I'm not mistaken). So I tend to think he knows what he's talking about.</p>

CC BY-SA 3.0
2014-01-13T07:22:21.663Z
Whoever said 50% chance at 40% hash power is wrong, each block makes it exponentially harder. The chance to mine 6 blocks consecutively with 40% is - .4^6, or ~0.004% chance.
John T
CC BY-SA 3.0
2014-01-13T07:46:59.643Z
@jtorba: Your math doesn't make sense. By that logic, a 51% miner has a .51^6 = 0.0176 chance.
Greg Hewgill
CC BY-SA 3.0
2014-01-13T12:20:54.730Z
@GregHewgill: I think technically it's "50% + 1 miner", not "51%"  : )    But, yup, that's basically my question: I had the same intuition as jtorba and people told me it was all wrong: I'd like to understand how it works.
bitcoinNeverSleeps
<blockchain><mining-pools><block><blockchain-fork>
What's the formula giving the % of succesfully maliciously messing the blockchain?
bitcoinNeverSleeps
# What's the formula giving the % of succesfully maliciously messing the blockchain?

(Asked by: username_0 on 2014-01-13)

With the recent (early 2014) GHash.io concerns about that particular mining pool getting too big, many people have talk about what a powerful miner could do if it wanted to "harm" bitcoin or double-spend, etc.

At one point someone pointed on that if you have 40% of the mining power, you have a 50% chance of reverting 6 blocks.

I'd have expected it to be (0.4 exp 7) (6 blocks + the next one) or something like that and not 50%.

What is the formula to use to compute the "harm" that a malicious miner could do and how many blocks he could revert?

**EDIT**

Here's a page containing the formula:

<https://people.xiph.org/~username_2/attack_success.html>

Don't put too many blocks otherwise the code will have a numeric overflow.

But normally it's using the formula in the bitcoin paper and that page has been written by the person who came up with the concept of deterministic wallets (if I'm not mistaken). So I tend to think he knows what he's talking about.

**Tags:** blockchain, mining-pools, block, blockchain-fork

> **Comments:**
> **username_1**: Whoever said 50% chance at 40% hash power is wrong, each block makes it exponentially harder. The chance to mine 6 blocks consecutively with 40% is - .4^6, or ~0.004% chance.  
> **username_2**: @jtorba: Your math doesn't make sense. By that logic, a 51% miner has a .51^6 = 0.0176 chance.  
> **username_0**: @username_2: I think technically it's "50% + 1 miner", not "51%"  : )    But, yup, that's basically my question: I had the same intuition as jtorba and people told me it was all wrong: I'd like to understand how it works.  

---

## 1 answers

### Answer by username_3 on 2014-07-05. Score: 2

The formula is directly from the [original paper by Satoshi Nakamoto.](https://bitcoin.org/bitcoin.pdf) Check pages 6-8. The paper has C code to easily compute the values, and [that page you linked to](https://people.xiph.org/~username_2/attack_success.html) is just that C code converted to javascript.


---

