> For the complete documentation index, see [llms.txt](https://hub.bsvblockchain.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hub.bsvblockchain.org/higher-learning/bsv-academy/bsv-theory/calculations/the-binomial-random-walk.md).

# The Binomial Random Walk

> The race between the honest chain and an attacker chain can be characterized as a Binomial Random Walk. The success event is the honest chain being extended by one block, increasing its lead by +1, and the failure event is the attacker's chain being extended by one block, reducing the gap by -1.
>
> \- Satoshi Nakamoto, Bitcoin Whitepaper

To analyse the outcome of such an attack, we can characterise the status of the two chain tips as a pair of competing processes, where each vie for leadership. Our gap is characterised as the number of blocks lead that the honest chain tip has and is increased by 1 every time an honest block is found, while being decreased by 1 every time a dishonest block is found.

The block discovery process is a pseudorandom function thanks to proof of work, so both honest and dishonest nodes are bound to the probabilities inherent in the proof of work process, requiring either party to perform a full network proof of work in order to extend or reduce the gap.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hub.bsvblockchain.org/higher-learning/bsv-academy/bsv-theory/calculations/the-binomial-random-walk.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
