Skip to content
LumenaryAcademy
Foundations 80 min

Proof of stake and BFT finality

Replacing work with deposits that can be destroyed — validators and slashing, the attacks unique to stake, classical BFT consensus, and how Ethereum combines a fork-choice rule with two-thirds-majority finality.

Code tested · 4AI-draftedAwaiting review by a computer scientist

Your guides: Chloe · The Computer Scientist, Margaret · The Experimenter, Gideon · The Verifier

MotivationH

From burning electricity to risking deposits

Proof of work made votes expensive by tying them to computation. On 15 September 2022, in an upgrade called the Merge, Ethereum stopped doing that: blocks have been produced since then by validators who have locked up ether as a deposit, and its electricity use fell by more than 99.9%. Many other chains — Cardano, Cosmos, Polkadot, Solana, Tezos, Algorand — were designed around stake from the start.

Proof of stake replaces an external cost, electricity, with an internal one: capital that the protocol itself can destroy if its owner misbehaves. That changes the security argument completely. It also opens the door to something proof of work cannot offer: borrowing forty years of research on Byzantine fault-tolerant (BFT) consensus to make blocks final — not merely improbable to reverse, but impossible to reverse unless a third of all stake is willingly destroyed.

This lesson builds that argument: the mechanics of staking, the attacks that are new with stake, the BFT protocols it borrows, and Ethereum's combination of a fork-choice rule with a finality gadget, which you will simulate. It ends with the concerns about concentration and the research still under way in 2026.

DefinitionsH

Validators, attestations and slashing

Stake answers the Sybil problem from the first lesson directly: votes are weighted by the amount deposited, so splitting a deposit across a thousand identities gains nothing.

Definition— Validator, attestation, slashing

A validator is a signing key registered with a deposit (its stake). Time is divided into slots; in each slot one validator, chosen at random weighted by stake, proposes a block, and others attest: they sign a vote saying which block they consider the head of the chain and, for finality, which checkpoints they link. Validators that do their duties earn rewards; ones that are offline pay small penalties. A validator that signs two contradictory messages — two different blocks for the same slot, or two votes that break the rules below — is slashed: part or all of its stake is destroyed and it is forcibly removed.

On Ethereum (as of 2026): a slot is 12 seconds; 32 slots form an epoch of 6.4 minutes; every active validator attests once per epoch, in committees spread across its slots; a validator needs at least 32 ETH, and since the Pectra upgrade of May 2025 one validator may hold up to 2,048 ETH (EIP-7251). Votes are BLS signatures, aggregated so that hundreds of thousands of them can be checked cheaply (Signatures and keys). Withdrawing stake takes time: exits pass through a queue, and a slashed validator's funds are held for about 36 days, so that misbehaviour discovered later can still be punished.

Slashing is designed around correlation. An isolated slashing, which is almost always an operator's mistake — the same key accidentally running on two machines — costs a small amount. But an extra penalty grows with the total stake slashed in the surrounding weeks: since 2022 it is three times the slashed fraction, so if a third of all stake is slashed together, it loses everything. Honest accidents are cheap; coordinated attacks are ruinous.

IntuitionH

Nothing at stake, long-range attacks and weak subjectivity

Stake removes the physical cost of producing blocks, and three problems follow.

Nothing at stake. In proof of work, mining on two branches of a fork splits your hash power, so you pick one. In a naive proof-of-stake protocol, signing blocks on every branch costs nothing and guarantees you a reward on whichever wins. If everyone does that, forks never resolve, and an attacker's branch gets free support. Slashing is the answer: signing on two conflicting branches is exactly the kind of contradiction that can be proved and punished.

Long-range attacks. Slashing works only while the stake is still deposited. Once validators have withdrawn, their old keys control nothing at stake — but those keys could still sign an alternative history starting from long ago, when they held a majority. An attacker could buy such old keys cheaply and build a fake chain from years back that looks valid to a newcomer. In proof of work, a fake history would need all its work redone; in proof of stake, signatures are cheap.

Weak subjectivity. The defence is to accept that a node joining the network, or one that has been offline for a long time, cannot pick the right chain from genesis by rules alone. It needs a recent checkpoint — a block hash it trusts, obtained from a friend, a block explorer, a client release or several independent sources — no older than the weak subjectivity period, the time it takes for enough validators to withdraw that old keys could form a supermajority (on Ethereum, weeks to months depending on the validator count). Within that window, nodes that stay online make every decision objectively. Proof-of-work advocates count this as a genuine weakening of trust assumptions; proof-of-stake advocates answer that users already trust the source of their software, and that proof of work has its own social layer, as the 2010 and 2013 Bitcoin incidents showed.

ExplanationH

BFT consensus, recalled

Replication and consensus taught Raft and Paxos, which tolerate crashes. Byzantine fault-tolerant protocols tolerate ff arbitrary faults among n≥3f+1n \ge 3f + 1 participants — with stake, among weights where the faulty share is below a third. They all rest on one counting argument.

Theorem— Quorum intersection

If every decision requires votes from validators holding at least two-thirds of the stake, then any two decisions share validators holding more than one-third of the stake. Consequently, if less than one-third of the stake is Byzantine, any two quorums share at least one honest validator.

Proof

Let the total stake be 1, and let two quorums Q1Q_1 and Q2Q_2 each hold at least 2/32/3. Then stake(Q1∩Q2)≥stake(Q1)+stake(Q2)−stake(Q1∪Q2)≥2/3+2/3−1=1/3\mathrm{stake}(Q_1 \cap Q_2) \ge \mathrm{stake}(Q_1) + \mathrm{stake}(Q_2) - \mathrm{stake}(Q_1 \cup Q_2) \ge 2/3 + 2/3 - 1 = 1/3. With exact two-thirds quorums the overlap can be exactly one-third, so protocols require strictly more than two-thirds, or Byzantine stake strictly less than one-third; then the overlap exceeds the Byzantine stake and contains an honest validator. An honest validator never votes for two conflicting decisions, so two conflicting decisions cannot both gather quorums.

∎

Three protocols to know:

  • PBFT (Castro and Liskov, 1999) made BFT practical: a leader proposes, replicas exchange prepare and then commit messages, and a value is decided once a replica sees 2f+12f+1 commits. A view change replaces a faulty leader. All-to-all messages cost O(n2)O(n^2) per decision, which limits it to tens of replicas.
  • Tendermint, now maintained as CometBFT, adapted this to blockchains in 2016–2018: rounds of propose, prevote and precommit, with validators locking on a block once they see two-thirds of prevotes for it. A block is final as soon as it is committed, and the Cosmos ecosystem's chains run it. It chooses safety over liveness: if more than a third of the stake is offline, the chain halts rather than risk conflicting decisions.
  • HotStuff (Yin, Malkhi, Reiter, Gueta and Abraham, 2018–2019) makes leader replacement cheap and message complexity linear, by having the leader collect votes into compact certificates and by pipelining phases across consecutive blocks. Its descendants run Aptos and other chains.

In all three, safety holds in an asynchronous network and liveness needs periods of good behaviour, the same split as Raft and Paxos.

DefinitionsH

Gasper: LMD-GHOST plus Casper FFG

Classical BFT needs every validator to vote on every block, and Ethereum has hundreds of thousands of validators. Its consensus, Gasper, therefore separates two jobs.

Fork choice: LMD-GHOST. To decide which block is the head right now, a node starts from the latest justified checkpoint and walks down the block tree. At each fork it moves into the child whose subtree carries the most stake, counting only each validator's latest message (LMD); GHOST stands for greedy heaviest-observed subtree. Like Nakamoto's rule, this keeps the chain growing even when finality stalls, and reorganisations near the tip are possible.

Finality: Casper FFG. The first block of each epoch is a checkpoint. Every attestation also contains a vote from a source checkpoint to a later target checkpoint.

Definition— Justification and finalization

A supermajority link A→BA \to B is a set of votes from source AA to target BB by validators holding at least two-thirds of the stake. The genesis checkpoint is justified. A checkpoint BB is justified if there is a supermajority link A→BA \to B from a justified checkpoint AA that is an ancestor of BB. A justified checkpoint AA is finalized if there is a supermajority link A→BA \to B in which BB is its child checkpoint in the very next epoch.

Definition— Slashing conditions

A validator must never sign two distinct votes (s1→t1)(s_1 \to t_1) and (s2→t2)(s_2 \to t_2) such that either

  1. epoch(t1)=epoch(t2)\mathrm{epoch}(t_1) = \mathrm{epoch}(t_2) — a double vote; or
  2. epoch(s1)<epoch(s2)<epoch(t2)<epoch(t1)\mathrm{epoch}(s_1) < \mathrm{epoch}(s_2) < \mathrm{epoch}(t_2) < \mathrm{epoch}(t_1) — a surround vote.

Theorem— Accountable safety (Buterin and Griffith, 2017)

If two conflicting checkpoints (neither an ancestor of the other) are both finalized, then validators holding at least one-third of the stake have violated a slashing condition.

Proof

(Sketch.) Finalizing a checkpoint takes two supermajority links. If the conflicting finalized checkpoints are in the same epoch, the two links that justified them are votes for targets of the same epoch, and by quorum intersection validators with at least one-third of the stake signed both: a double vote. If they are in different epochs, follow the chain of supermajority links that justified the later one back towards genesis; at some point one link must jump over the earlier checkpoint's finalizing link, A→A′A \to A' with consecutive epochs, either landing in the same epoch as one of its ends (a double vote) or surrounding it (a surround vote). Again quorum intersection gives at least one-third of the stake.

∎

This is economic finality: a finalized checkpoint can be reverted only if at least a third of all stake is provably destroyed. Under normal conditions a checkpoint is justified one epoch after it appears and finalized one epoch later, so an Ethereum block is final after about two epochs, roughly 13 minutes.

≥ 2/3≥ 2/3≥ 2/3epoch 0epoch 1epoch 2epoch 3epoch 4finalizedfinalizedfinalizedjustifiedpending
Casper FFG in normal operation. Each epoch's first block is a checkpoint. A supermajority link (votes from validators holding at least two-thirds of the stake) from a justified checkpoint justifies its target, and when the target is the very next checkpoint, the source becomes finalized. Here checkpoints of epochs 0 to 2 are finalized, epoch 3 is justified, and epoch 4 is still collecting votes.
ComputationC

Simulating finality and a slashable double vote

The program below implements the definitions above for a dozen validators with equal stakes. Everyone first agrees on two epochs, then the network splits into two halves that see different blocks in epochs 3 and 4. In the first scenario a third of the validators are Byzantine and vote on both sides; in the second, a quarter are.

python
from fractions import Fraction

class CasperFFG:
    """A toy of Casper FFG: stake-weighted votes between checkpoints, justification, finality, slashing."""
    def __init__(self, stakes):
        self.stakes, self.total = stakes, sum(stakes.values())
        self.parent, self.epoch = {"G": None}, {"G": 0}      # checkpoint tree; G is genesis
        self.justified, self.finalized = {"G"}, {"G"}
        self.votes = {v: [] for v in stakes}                 # every vote each validator has signed
        self.link_voters = {}                                # (source, target) -> set of validators
        self.slashable = set()

    def checkpoint(self, name, parent):
        self.parent[name], self.epoch[name] = parent, self.epoch[parent] + 1

    def is_ancestor(self, a, b):
        while b is not None and b != a:
            b = self.parent[b]
        return b == a

    def vote(self, v, source, target):
        s, t = self.epoch[source], self.epoch[target]
        for (src2, tgt2) in self.votes[v]:
            s2, t2 = self.epoch[src2], self.epoch[tgt2]
            if (t == t2 and target != tgt2) or s < s2 < t2 < t or s2 < s < t < t2:
                self.slashable.add(v)                        # double vote or surround vote
        self.votes[v].append((source, target))
        if source not in self.justified or not self.is_ancestor(source, target):
            return                                           # only links from a justified ancestor count
        voters = self.link_voters.setdefault((source, target), set())
        voters.add(v)
        if 3 * sum(self.stakes[x] for x in voters) >= 2 * self.total:
            self.justified.add(target)                       # a supermajority link justifies the target
            if t == s + 1:
                self.finalized.add(source)                   # ... and finalizes a source one epoch back

    def report(self, label):
        final = sorted(self.finalized, key=lambda c: (self.epoch[c], c))
        conflicts = [(a, b) for a in final for b in final if a < b
                     and not self.is_ancestor(a, b) and not self.is_ancestor(b, a)]
        slashed = Fraction(sum(self.stakes[v] for v in self.slashable), self.total)
        print(f"{label}\n  finalized: {final}\n  conflicting finalized pairs: {conflicts}")
        print(f"  slashable: {sorted(self.slashable)} = {float(slashed):.0%} of stake")

def run(label, honest_b, honest_c, byzantine):
    stakes = {v: 32 for v in honest_b + honest_c + byzantine}
    ffg = CasperFFG(stakes)
    for name, parent in [("A1", "G"), ("A2", "A1"), ("B3", "A2"), ("B4", "B3"), ("C3", "A2"), ("C4", "C3")]:
        ffg.checkpoint(name, parent)
    for src, tgt in [("G", "A1"), ("A1", "A2")]:             # epochs 1-2: everyone sees one chain
        for v in stakes:
            ffg.vote(v, src, tgt)
    for b_link, c_link in [(("A2", "B3"), ("A2", "C3")), (("B3", "B4"), ("C3", "C4"))]:
        for v in honest_b + byzantine:                       # epochs 3-4: the network splits, and
            ffg.vote(v, *b_link)                             # Byzantine validators vote on both sides
        for v in honest_c + byzantine:
            ffg.vote(v, *c_link)
    ffg.report(label)

names = ["Abebe", "Bich", "Carlos", "Divya", "Elif", "Farid", "Grace", "Hiroshi", "Ines", "Jomo",
         "Kalani", "Lucia"]
run("Scenario 1: 4 of 12 validators (33%) equivocate", names[0:4], names[4:8], names[8:12])
run("Scenario 2: 3 of 12 validators (25%) equivocate", names[0:5], names[5:9], names[9:12])
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

In the first scenario, each side gathers exactly two-thirds of the stake (its four honest validators plus the four Byzantine ones), so the conflicting checkpoints B3 and C3 are both finalized: safety has failed. But exactly as the theorem promises, the four validators who caused it have signed double votes, and their third of the stake is provably slashable — the evidence is the pair of signed votes itself. In the second scenario the Byzantine quarter cannot lift both sides to two-thirds: the side with five honest validators finalizes B3, the other side finalizes nothing, and the equivocators are still caught.

What if more than a third of validators simply go offline, for instance because a widely used client crashes? Then no checkpoint can be justified, and finality stops, although LMD-GHOST keeps blocks coming. Ethereum restores finality with the inactivity leak: while finality is stalled, validators that fail to vote lose stake at a rate that grows every epoch, until those still online again hold two-thirds. Here is a simplified version using the constants in Ethereum's specification:

python
# A simplified inactivity leak, with the constants of Ethereum's consensus specification
# (Bellatrix onwards). Real balances move in steps of 1 ETH of "effective balance"; we ignore that.
INACTIVITY_SCORE_BIAS = 4
INACTIVITY_PENALTY_QUOTIENT = 2**24
EPOCH_MINUTES = 6.4

def epochs_to_regain_finality(offline_share):
    online, offline, score, epoch = 1.0 - offline_share, offline_share, 0, 0
    while 3 * online < 2 * (online + offline):     # finality needs 2/3 of the *remaining* stake
        epoch += 1
        score += INACTIVITY_SCORE_BIAS             # each missed epoch raises the inactivity score
        offline -= offline * score / (INACTIVITY_SCORE_BIAS * INACTIVITY_PENALTY_QUOTIENT)
    return epoch, offline / offline_share

print("offline share   epochs   days   offline validators keep")
for share in [0.34, 0.40, 0.50, 0.60]:
    epochs, kept = epochs_to_regain_finality(share)
    print(f"{share:12.0%} {epochs:8} {epochs * EPOCH_MINUTES / 60 / 24:6.1f} {kept:16.0%}")
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

If 40% of the stake goes offline, the online validators regain a two-thirds majority after about two weeks, by which time the offline ones have lost a quarter of their stake; at 50% it takes about three weeks. The leak is also what decides a lasting network partition: each side would leak the other's validators and eventually finalize on its own, so an extended split can end in conflicting finality without anyone being slashable. That is the price of keeping the chain live, and it is why a partition lasting weeks would need people, not just code, to resolve.

ExplanationH

Probabilistic and economic finality in practice

The two families now give different guarantees.

  • Probabilistic finality (proof of work, and longest-chain proof of stake such as Cardano's Ouroboros): the probability of reversal falls exponentially with depth but never reaches zero, and it depends on the attacker's share and on network delays.
  • BFT finality (Tendermint/CometBFT, Ethereum's Casper FFG, Algorand, Tezos's Tenderbake and others): once a block is final, it stays final unless at least a third of the stake misbehaves. Where equivocation is slashable, as on Ethereum and Cosmos chains, the culprits are identified and lose their deposits: economic finality.

Finality has failed in practice, if briefly. In May 2023 Ethereum's chain twice stopped finalizing, for about 25 minutes and then about an hour, because bugs in two consensus clients made them fall behind under load; blocks kept coming, and finality resumed without intervention. The episode showed the value of client diversity: Ethereum has several independent consensus clients (Lighthouse, Prysm, Teku, Nimbus, Lodestar, Grandine) and execution clients (Geth, Nethermind, Besu, Erigon, Reth), and a bug in a client used by more than two-thirds of the stake could finalize an invalid chain. Other proof-of-stake chains have had longer outages: Solana halted several times between 2021 and 2024, and its validators had to coordinate restarts.

ExplanationH

Liquid staking, concentration and open problems

Running a validator requires capital, skill and constant uptime, so most stake is delegated. Staking services run by exchanges (such as Coinbase, Binance and Kraken) and liquid staking protocols — Lido is the largest, Rocket Pool a smaller one with a permissionless set of operators — take deposits and issue a token representing the staked ether, which holders can trade or use elsewhere. Lido has at times held close to a third of all staked ether, which alarmed researchers precisely because of the one-third threshold: a single protocol's governance, or a small set of its operators, approaching the stake needed to stop finality. Restaking protocols such as EigenLayer let the same stake back additional services, with extra slashing conditions, which creates new links through which one failure could spread to others.

Concentration also appears in block building. Since the Merge, most Ethereum blocks are built by a few specialised builders and passed to proposers through relays (the MEV-Boost system, which Contract security and MEV covers). After the United States sanctioned the Tornado Cash contracts in August 2022, some relays filtered sanctioned transactions, raising concerns about censorship at the protocol level; those sanctions were lifted in March 2025, but the structural question remains.

Research and engineering directions as of 2026, in order of maturity:

  • Censorship resistance: proposals to enshrine the proposer–builder split in the protocol (EIP-7732, ePBS), chosen in 2025 as a headline change for the upgrade after Fusaka, and to let many validators force transactions into blocks through inclusion lists (EIP-7805, FOCIL).
  • Faster finality: single-slot finality, in which each block is finalized within its own slot rather than after two epochs. The obstacle is aggregating signatures from so many validators in seconds; proposals include rotating committees ("Orbit") and three-slot designs. A broader redesign of Ethereum's consensus layer, proposed in late 2024 and since developed as "lean consensus", aims at faster finality together with post-quantum, hash-based signatures. Other chains are moving too: Solana's Alpenglow proposal (2025) replaces its voting protocol with one targeting finality in a fraction of a second.
  • Theory: how proof of stake behaves under long network partitions, what incentives validators really face once MEV is included, and how to keep stake decentralised, are all active research questions.
Common misconceptionsH

Common misconceptions

Misconception

"Proof of stake means the richest decide everything." Voting power is proportional to stake, just as in proof of work it is proportional to hardware and electricity that money buys. The real differences are elsewhere: stake can be slashed, and stake held by custodians and liquid staking protocols concentrates power in a few operators, which is a genuine concern.

Misconception

"Finalized means irreversible, full stop." Finalized means reversible only if at least a third of the stake signs slashable messages, or if a partition lasts long enough for the inactivity leak to finalize both sides, or if the community deliberately coordinates a fork. It is a strong economic guarantee, not a mathematical certainty.

Misconception

"Slashing is how validators get punished for being offline." Being offline costs small penalties (and, during an inactivity leak, larger ones). Slashing is reserved for provable equivocation, signing two contradictory messages, and most slashings so far were caused by operators running the same keys on two machines as a misguided backup.

Misconception

"BFT protocols tolerate up to half of the participants being malicious." Tolerating Byzantine faults with two-thirds quorums requires the faulty share to be below one-third. Half is the bound for crash faults with majority quorums, and for Nakamoto consensus in its simplest model.

Exercises

Exercises

1. Proof of stake and BFT finality

Warm-upHuman

On Ethereum a slot lasts 12 seconds and an epoch has 32 slots. Under normal conditions a checkpoint is finalized about two epochs after it appears. About how many seconds is that?

2. Proof of stake and BFT finality

CoreHuman

A chain has 100 validators with equal stake. A decision needs votes from at least 67 of them. What is the smallest possible number of validators that two decisions' sets of voters can have in common?

3. Proof of stake and BFT finality

CoreComputational

Write slashable(a, b) for two attestations signed by the same validator, each a tuple (source_epoch, target_epoch, target_block). Return True if signing both violates a Casper FFG slashing condition:

  • double vote: the two attestations are different but have the same target epoch;
  • surround vote: one vote's source and target epochs strictly surround the other's, s1<s2<t2<t1s_1 < s_2 < t_2 < t_1 (in either order of the arguments).

Signing the very same attestation twice is not slashable.

Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

4. Proof of stake and BFT finality

StretchComputational

Implement the LMD-GHOST fork-choice rule. parent maps every block except root to its parent; latest maps each validator to the block of its latest vote; stakes gives each validator's stake. Starting at root, repeatedly move to the child whose subtree carries the most stake from latest votes (a vote for a block supports that block and all its ancestors); stop at a block with no children. Break ties by choosing the child with the larger id (Ethereum breaks ties by the larger block hash).

Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

5. Proof of stake and BFT finality

CoreHuman

In a naive proof-of-stake protocol without slashing, why might rational validators vote for blocks on every branch of a fork?

Choose one

6. Proof of stake and BFT finality

CoreHuman

Which of these Ethereum nodes need a trusted recent checkpoint (weak subjectivity) to be sure they follow the right chain? Select all that apply.

Choose all that apply

7. Proof of stake and BFT finality

CoreHuman

A bug knocks out a consensus client used by 40% of Ethereum's stake for several days. The other 60% keep running correctly. What happens?

Choose one

Further reading and resources