Pages:
Author

Topic: The math behind confirmations? - page 2. (Read 361 times)

hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
June 01, 2022, 03:28:36 PM
#3
Running some results, we can see the probability drop off exponentially with z.
q=0.1
z=0 P=1.0000000
z=1 P=0.2045873
z=2 P=0.0509779
z=3 P=0.0131722
z=4 P=0.0034552
z=5 P=0.0009137
z=6 P=0.0002428
z=7 P=0.0000647
z=8 P=0.0000173
z=9 P=0.0000046
z=10 P=0.0000012
q=0.3
z=0 P=1.0000000
z=5 P=0.1773523
z=10 P=0.0416605
z=15 P=0.0101008
z=20 P=0.0024804
z=25 P=0.0006132
z=30 P=0.0001522
z=35 P=0.0000379
z=40 P=0.0000095
z=45 P=0.0000024
z=50 P=0.0000006
Solving for P less than 0.1%...
P < 0.001
q=0.10 z=5
q=0.15 z=8
q=0.20 z=11
q=0.25 z=15
q=0.30 z=24
q=0.35 z=41
q=0.40 z=89
q=0.45 z=340

The Bitcoin whitepaper has this information which I assume is related to confirmations but this does not make any sense to me. What is Satoshi trying to say here?

He is showing an example: q = probability the attacker finds the next block.
You get a table for q=0.1, so basically an attacker with 10% of the hashrate, and the probability of catching up with the real chain of depth z.

He sampled the same table for q=0.3 (30% of the hashrate) as well.

The last part shows if you want this probability to be under 0.1%, with an attacker that has 10% of the hashrate, you need to wait for 5 confirmations, or if an attacker has 30% of the hashrate you need 24 confirmations and so on.

Can you guys help me understand the math behind 6 confirmations? I have read that at 6 confirmations there is less than a 0.1% chance of a successful attack but I cannot remember where I read that. I have always wondered why the standard of waiting for confirmations to prevent a double spend attack was always 6 confirmations. I am aware that some places do allow at least 1 confirmation but if you accept 1 confirmation what percentage difference compared to 6 confirmations would I be taking a big risk by accepting 1 confirmations compared to 6?.
I'd say that it's fairly close to the figure 5 that is needed if we assume there is a miner or pool with 10% of the hashrate, so that's probably the assumption made when deciding for number 6, as well as it being easy to remember since 6 blocks in Bitcoin take exactly one hour on average.
legendary
Activity: 2352
Merit: 6089
bitcoindata.science
June 01, 2022, 02:51:14 PM
#2
Can you guys help me understand the math behind 6 confirmations? I have read that at 6 confirmations there is less than a 0.1% chance of a successful attack but I cannot remember where I read that. I have always wondered why the standard of waiting for confirmations to prevent a double spend attack was always 6 confirmations. I am aware that some places do allow at least 1 confirmation but if you accept 1 confirmation what percentage difference compared to 6 confirmations would I be taking a big risk by accepting 1 confirmations compared to 6?.

2 confirmations is more than enough for the bitcoin network, unless you are talking about millions of dollars.

When you make a transaction, that transaction is recorded in the blockchain.  Each subsequent block that is mined adds one more confirmation  to that transaction.

A successful attacker will need to mine all blocks again since your transaction. It is considered  permanent and practically impossible for an attacker to mine 6 blocks faster than the whole network. This is why 6 confirmations is enough.

If you are talking about altcoins, like bch or brg which have significant lower hashrate, the 6 confirmation rule is not enough.
member
Activity: 99
Merit: 21
June 01, 2022, 02:43:15 PM
#1
Can you guys help me understand the math behind 6 confirmations? I have read that at 6 confirmations there is less than a 0.1% chance of a successful attack but I cannot remember where I read that. I have always wondered why the standard of waiting for confirmations to prevent a double spend attack was always 6 confirmations. I am aware that some places do allow at least 1 confirmation but if you accept 1 confirmation what percentage difference compared to 6 confirmations would I be taking a big risk by accepting 1 confirmations compared to 6?.

I've searched around the internet and most just say that it reduces the chances but the exact numbers haven't been declared. For someone who might be developing a Bitcoin payment system or accepting Bitcoin on their website or for a service this should probably be more clear than it is. We should not blindly trust because it is the standard. I do not doubt that the standard has solid reasons I am more intrigued on why we have come up with that magic number. Does 6 confirmations reduce an attack by >99%?

I ask because the wiki is no longer up to date but this information was answered before on there. Take this quote as an example:

Transactions with 0/unconfirmed can be reversed with not too much cost via Finney attack and race attack, but in some cases may still be acceptable especially for low-value goods and services, or ones which can be clawed back.

For transactions with confirmations, the website (https://people.xiph.org/~greg/attack_success.html) can be used to calculate the probability of a successful doublespend given a hashrate proportion and number of confirmations. Note that in the reality of bitcoin mining today, more than 6 confirmations are required. (60 confirmations to have <1% odds of succeeding against an entity with 40% hash power). See Section 11 of the (https://bitcoin.org/bitcoin.pdf bitcoin whitepaper) for the AttackerSuccessProbability formula.
The only problem with this quote is that it talks about more confirmations preventing an attack which I understand but it talks about up to 60 confirmations to fully mitigate the attack so why are we using a 6 confirmation standard when there is still a chance of an attack succeeding is it because it is so low chance that it realistically will never happen?

The reference https://people.xiph.org/~greg/attack_success.html returns a error and does not have the information any more.

Running some results, we can see the probability drop off exponentially with z.
q=0.1
z=0 P=1.0000000
z=1 P=0.2045873
z=2 P=0.0509779
z=3 P=0.0131722
z=4 P=0.0034552
z=5 P=0.0009137
z=6 P=0.0002428
z=7 P=0.0000647
z=8 P=0.0000173
z=9 P=0.0000046
z=10 P=0.0000012
q=0.3
z=0 P=1.0000000
z=5 P=0.1773523
z=10 P=0.0416605
z=15 P=0.0101008
z=20 P=0.0024804
z=25 P=0.0006132
z=30 P=0.0001522
z=35 P=0.0000379
z=40 P=0.0000095
z=45 P=0.0000024
z=50 P=0.0000006
Solving for P less than 0.1%...
P < 0.001
q=0.10 z=5
q=0.15 z=8
q=0.20 z=11
q=0.25 z=15
q=0.30 z=24
q=0.35 z=41
q=0.40 z=89
q=0.45 z=340

The Bitcoin whitepaper has this information which I assume is related to confirmations but this does not make any sense to me. What is Satoshi trying to say here?
Pages:
Jump to: