-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calculate locktime confidence across chains #35
Comments
I am seeing 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.
The text was updated successfully, but these errors were encountered: