Open prestwich opened 7 years ago
I am seeing 0.00799453086688
as a result of this script on Python 2.7.13 .
To clarify, what are the units of the result?
The result is the probability that 100 bitcoin blocks elapse before 300 zcash blocks. In this case, 7.99%.
You can swap out c1b and c2b to calculate probability for different numbers of blocks on each chain.
For real-life applications, we should probably target something like 0.0000001 (99.99999% confidence that the locktimes will expire in the expected order).
@frdwrd thanks, I appreciate the answer. This code will be useful for various coins doing XCAT, thanks.
Worth noting that this is less reliable if the coins have strongly correlated hashrates (like bitcoin cash and bitcoin).
@frdwrd thanks for pointing that out. For myself, I would be interested in KMD<->HUSH and ZEC<->HUSH because we are performing XCATs between those coins with barterDEX. Perhaps a brave soul will improve this into a script that prints out all the useful data for lots of coins 😺
Eventually we need reliable estimates of how often X Bitcoin blocks will occur before Y Zcash blocks, so that we can set safe locktimes on each chain. With the help of a statistician friend, I wrote a script to calculate that.