Honest chain Attacker chain Fork point
⚠ CHAIN REORG
⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.

Longest-Chain Fork Choice: Nakamoto Consensus Race

Blockchains like Bitcoin resolve competing branches with a simple rule: nodes always accept the chain with the most accumulated proof-of-work. This simulator visualizes that fork-choice rule as a live race between an honest chain and an attacker chain, each growing block-by-block as an independent Poisson mining process weighted by hash-power share. Set the attacker's hash power and the number of confirmations a merchant waits for, then watch the two branches race in 3D — every time the attacker's branch reaches parity with the honest branch, a chain reorganization flips the network over to the new longest chain. A running tally compares the empirical reorg rate against Satoshi Nakamoto's exact closed-form double-spend probability, so you can see the security margin of "wait for N confirmations" emerge from first principles.