Skip to content
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

render formulas in chat #54

Open
grumpyp opened this issue Jun 3, 2023 · 0 comments
Open

render formulas in chat #54

grumpyp opened this issue Jun 3, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@grumpyp
Copy link
Owner

grumpyp commented Jun 3, 2023

As a scientific user I want math formulas to be rendered. E.g.

The formula provided is for calculating the probability of an attacker catching up from a given deficit in a blockchain system, based on the Gambler's Ruin problem. The attacker's potential progress is assumed to follow a Poisson distribution, with an expected value of \ue0c1=zq p, where q is the probability an honest node finds the next block, p is the probability the attacker finds the next block, and z is the number of blocks behind the honest chain the attacker currently is.

To calculate the probability that the attacker could catch up now, the Poisson density for each amount of progress the attacker could have made is multiplied by the probability he could catch up from that point. This is then rearranged to avoid summing the infinite tail of the distribution.

The provided C code converts this formula into code and can be used to calculate the probability for various values of q and z. The probability drops exponentially with z, and the formula assumes p > q.

Overall, this formula and code are used to assess the security of a blockchain system and evaluate the likelihood of an attacker catching up with the honest chain.
@grumpyp grumpyp added enhancement New feature or request good first issue Good for newcomers labels Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant