Casper FFG serves as the formal finality mechanism for Ethereum, acting as a gadget layered over the LMD-GHOST fork choice rule. By introducing a structured checkpointing system, it provides a method for the network to reach consensus that is cryptographically and economically final.
Safety and liveness are different promises
Safety in a consensus protocol guarantees that the network will never reach two conflicting final states. Liveness ensures that the network will always be able to move forward and continue producing new blocks, even under adversarial conditions.
Casper FFG prioritizes safety by requiring a supermajority of two-thirds of the staked ETH to reach finality. If the network cannot reach this threshold, it prioritizes liveness by continuing to add blocks, though these blocks remain unfinalized until participation increases.
Checkpoints, epochs and justification
Time in the Ethereum consensus layer is divided into 12-second slots, and 32 slots constitute one epoch, lasting 6.4 minutes. At the end of every epoch, the protocol identifies the current block as a 'checkpoint.'
Validators cast attestations for a 'source' checkpoint and a 'target' checkpoint. A target checkpoint is 'justified' when it receives attestations representing two-thirds of the total active stake. This process essentially provides a tiered confirmation of the blockchain's history.
| Process | Requirements | Result | | :--- | :--- | :--- | | Justification | 2/3 Stake Support | Checkpoint is marked valid | | Finalization | 2 Successive Justified Epochs | History becomes irreversible |
How a checkpoint becomes final
Finalization is a multi-step process that builds upon justification. Once a checkpoint at epoch N is justified, the network must justify the checkpoint at epoch N+1.
When epoch N+1 becomes justified, the checkpoint at epoch N is promoted to 'finalized.' This two-stage confirmation loop ensures that finality is delayed by roughly two epochs, or approximately 12.8 minutes, before being considered immutable by the protocol.
Slashing conditions
Slashing is the enforcement mechanism that prevents validators from deviating from the consensus protocol. Two distinct slashing conditions exist to protect the network from Byzantine behavior:
- Double vote: A validator signs two distinct target checkpoints for the same epoch.
- Surround vote: A validator signs an attestation where the source-target range completely surrounds a previous attestation they signed.
If a validator is caught violating these rules, the protocol automatically burns a portion of their stake and removes them from the validator set. This creates a powerful economic deterrent against attempting to subvert the canonical chain.
Inactivity leak and weak subjectivity
If validator participation falls below the two-thirds threshold, the network enters an 'inactivity leak' state. In this mode, the protocol slowly drains the balance of inactive validators until the remaining active stake is sufficient to regain a two-thirds supermajority, allowing the network to resume finality.
Nodes syncing the network from the genesis block rely on weak subjectivity checkpoints. This is necessary because, without a trusted checkpoint, a malicious actor could theoretically present a different finalized history using old, private keys. By syncing from a recent, publicly agreed-upon checkpoint, the node avoids this vector entirely.
This architecture ensures that the blockchain remains resilient against long-range attacks. It keeps the system functional while maintaining the core promise of decentralization, even when the validator pool is subject to attrition.