Back to Projects

51% Attack Simulator

51% Attack Simulator

Vibe
v0BlockchainEducationSimulation

This project is an interactive simulator that demonstrates the concept of a 51% attack on blockchain networks. It illustrates how Proof of Work (PoW) consensus mechanisms secure blockchains and highlights vulnerabilities when malicious actors control the majority of the hash power. Users can mine blocks and simulate an attack where the attacker rebuilds the chain from a fork point, creating a longer alternative history that the network accepts as valid. The interface includes controls to mine blocks, simulate the attack, and reset the simulation. It displays the legitimate chain and the malicious chain during the attack simulation, with a network console showing real-time updates. The simulation runs at an adjustable speed (default 800 ms, with a 1.25x multiplier), allowing users to observe the dynamics of chain reorganization and the impact of majority hash power control.