Bitcoin Forum

Bitcoin => Project Development => Topic started by: dzungmobile on March 22, 2023, 07:34:09 AM



Title: Alternative for Lopp's Bitcoin confirmation risk calculator
Post by: dzungmobile on March 22, 2023, 07:34:09 AM
How many Bitcoin confirmations is enough? (https://bitcointalk.org/index.php?topic=5443953.0) with open source code from Jameson Lopp that is built with formula from Bitcoin Whitepaper.

Then a finding from a forum member @o_e_l_e_o
His numbers are actually a little off.

For 33.55% of the hashrate, the probability an attacker is successful after 1 confirmation is 70.12%, after 3 confirmations is 43.54%, and after 6 confirmations is 23.09%.

On closer examination of the code here (https://github.com/jlopp/bitcoin-confirmation-risk-calculator/blob/dcd6e73d62235ac04eec22fadbd4f2a1f81d1557/index.html), it seems the error is that his calculation is not taking in to account fractions of a percent. You can test this yourself by putting in the hashrate box, for example, 30 and 30.999, and seeing they produce the same result.

Anyone can build your tool but without that bug?

Community will have a more accurate tool to use.


Title: Re: Alternative for Lopp's Bitcoin confirmation risk calculator
Post by: o_e_l_e_o on March 22, 2023, 08:14:31 AM
This tool is accurate: https://web.archive.org/web/20181231045818/https://people.xiph.org/~greg/attack_success.html

Or just open an issue on Lopp's GitHub. I'm sure he would fix the error once being made aware of it.


Title: Re: Alternative for Lopp's Bitcoin confirmation risk calculator
Post by: NotATether on March 22, 2023, 09:06:09 AM
This tool is accurate: https://web.archive.org/web/20181231045818/https://people.xiph.org/~greg/attack_success.html

Or just open an issue on Lopp's GitHub. I'm sure he would fix the error once being made aware of it.

Or just wait for me to create a tool for it on my website, I can rapidly prototype anything written in JavaScript these days. It doesn't look so hard to make.