Home / Crypto / Academy / How crypto actually works

Consensus: how thousands of strangers agree without a boss

Consensus is the hardest problem a blockchain solves and the one most guides skip. It is also what you are really buying when you buy a coin.

MODULE 36 OF 64 LEVEL 1: HOW CRYPTO ACTUALLY WORKS 15 MIN

The problem, stated plainly

Thousands of computers, none in charge, many anonymous, some actively hostile, must all agree on one identical list of transactions. They cannot vote by identity, because anyone can create a million fake identities for free. That is called a Sybil attack, and defeating it is the whole game.

The insight behind every blockchain is this: make participating cost something real. Then creating a million identities costs a million times as much, and the attack stops being free.

Proof of work: cost paid in electricity

Bitcoin makes the cost physical. Miners compete to find a number that, when combined with the block's contents and run through a hashing function, produces an output below a target. There is no clever method. You guess, trillions of times per second, until you get lucky.

The winner publishes the block and receives newly issued Bitcoin plus the fees inside it. Everyone else immediately abandons their attempt and starts on the next block.

Proof of work in practice
Difficulty adjustment
Every 2,016 blocks
The network measures how fast blocks arrived and adjusts the target so blocks keep averaging ten minutes. More miners means harder puzzles, not faster blocks. This self correction has held for over fifteen years.
The halving
Every 210,000 blocks
The block reward halves roughly every four years, so issuance falls geometrically toward a hard cap of 21 million coins. Eventually miners are paid only by transaction fees.
Why the electricity is the point
Not waste, security
The energy spent is the wall. To rewrite history you must redo all that work faster than the entire honest network is producing new work. The cost is the security, which is why "wasteful" and "secure" are the same property here.

Proof of stake: cost paid in capital at risk

Instead of burning electricity, validators lock up a large amount of the network's own coin as a deposit. On Ethereum that is 32 ETH per validator. The protocol then selects validators to propose and attest to blocks, roughly in proportion to how much they have staked.

The enforcement is slashing. Sign two conflicting blocks, or go offline for long periods, and the protocol destroys part of your deposit automatically. Attacking the chain therefore means deliberately destroying your own capital.

The two models compared honestly
Security source
PoW: energy. PoS: capital
Both make attacks expensive. PoW cost is external and ongoing. PoS cost is internal and at risk, which some argue is circular since the stake is denominated in the thing being secured.
Energy use
PoW: enormous. PoS: negligible
Ethereum's move to proof of stake in 2022 cut its energy consumption by over 99 percent overnight. That is the single strongest argument for PoS.
Barrier to participate
PoW: hardware. PoS: capital
Mining needs specialised machines and cheap power, which concentrates in a few regions. Staking needs coins, which concentrates with whoever already holds most. Both centralise, differently.
Attack recovery
PoW: hard. PoS: slashing
After a PoW attack the attacker keeps their hardware and can try again. After a PoS attack their stake is destroyed, which is a genuinely stronger deterrent.
Track record
PoW: 15+ years. PoS: shorter at scale
Bitcoin has never been successfully attacked at the consensus layer. Large scale PoS is newer, and newness is a real risk factor whatever the theory says.

The 51 percent attack, and what it can and cannot do

If one party controls a majority of mining power or stake, they can reorder or exclude transactions and spend the same coins twice by rewriting recent history. This is the canonical attack.

What they cannot do is equally important: they cannot steal coins from addresses they do not have keys for, cannot create coins from nothing, and cannot change the rules. Every node validates independently and simply rejects invalid blocks, however much power produced them.

This has genuinely happened to smaller chains. Ethereum Classic and Bitcoin Gold were both attacked successfully because their networks were small enough to rent enough power on the open market. Security scales with the value securing it, which is why a small chain with an impressive whitepaper may be trivially attackable.

Why this matters when you are choosing what to own

When you buy a coin you are buying a claim recorded on a ledger, and that claim is worth exactly as much as the ledger is hard to rewrite. A chain with negligible hash rate or a tiny staked value is not meaningfully secured, whatever its marketing says.

Practical questions worth asking about any chain: how much is actually securing it, how many independent validators are there, could a handful of them collude, and has it ever been reorganised?

READ NEXT

BEFORE YOU MOVE ON

Common questions

What is the difference between proof of work and proof of stake?

Proof of work makes attacks expensive by requiring enormous computation and therefore electricity. Proof of stake requires validators to lock capital that the protocol destroys if they misbehave. Both raise the cost of attacking; one pays it externally, the other internally.

Is proof of stake less secure?

It is differently secured and less battle tested at scale. Slashing is arguably a stronger deterrent because an attacker loses their capital, while a proof of work attacker keeps their hardware.

What is a 51 percent attack?

Controlling a majority of mining power or stake, which allows reordering or reversing recent transactions and double spending. It cannot steal from addresses you lack keys for, mint coins, or change the rules.

Risk warning: crypto is highly volatile and largely unregulated. You can lose everything you put in. Nothing here is financial, investment or tax advice.

← PREVIOUS
What actually happens when you press send
NEXT →
Smart contracts: programs that hold money