How do thousands of strangers agree without a leader?
Bitcoin has thousands of computers (called "nodes") around the world. When Alice wants to send Bitcoin to Bob, all these computers need to agree that the transaction is valid. But what if some computers are dishonest?
The Byzantine Generals Problem: How do you achieve consensus in a distributed network when some participants may be malicious? Bitcoin solves this with majority rule - but not just simple voting, since attackers could create fake identities (Sybil attack).
Bitcoin achieves Byzantine Fault Tolerant consensus through Nakamoto Consensus: proof-of-work voting where computational cost prevents Sybil attacks. The longest valid chain represents majority hashpower, creating an objective measure of network agreement without relying on identity verification or trusted coordinators.
Alice wants to send 1 BTC to Bob. Watch how the network nodes vote on whether this transaction is valid: Simulate consensus with honest and dishonest nodes. Majority rule prevails unless attackers control >50% of the network: Byzantine Agreement simulation: honest nodes follow protocol, Byzantine nodes attempt to disrupt consensus:
Bitcoin uses majority rule - but not just simple voting. If voting was free, attackers could create millions of fake identities to outvote honest participants. That's why Bitcoin uses Proof of Work.
Proof of Work: To vote, you must solve a difficult computational puzzle. This makes votes expensive, so honest participants (who invest in hardware and electricity) naturally have more voting power than attackers.
Bitcoin prevents Sybil attacks by making votes (blocks) expensive through proof-of-work. Each "vote" requires finding a valid block hash, which costs electricity and hardware. The longest chain represents the most accumulated work, creating an objective measure of network consensus.
51% Attack: An attacker would need to control more than half of the network's total hashrate to consistently create the longest chain. At current difficulty, this requires ~$20B in hardware plus $1M/hour in electricity - economically irrational since it destroys the value being stolen.
Bitcoin achieves BFT through economic incentives rather than traditional consensus algorithms (PBFT, Raft, etc.). The Nakamoto Consensus security model:
Trade-off: Lower throughput and higher latency than traditional BFT, but uniquely enables permissionless, trustless consensus in an open network with unknown participants.