1. Proof of Stake (PoS) Explained
1.1 What is PoS?
PoS serves as the foundation for consensus mechanisms in blockchain networks, enabling distributed agreement among participants. Validators stake ETH in smart contracts, risking slashing penalties for dishonest or inactive behavior. Their primary roles include verifying new blocks and occasionally proposing them.
1.2 Validators
To become a validator:
- Stake 32 ETH in the deposit contract.
- Run three software components: execution client, consensus client, and validator client.
After staking, validators receive new blocks from peers, vote on their validity (called "attesting"), and may be selected to propose blocks.
Ethereum time is divided into:
- Slots (12 seconds): One validator is randomly chosen as the block proposer.
- Epochs (32 slots): A committee of validators is randomly selected to vote on proposed blocks.
1.3 Transaction Execution Flow
- User signs a transaction, including a tip for the validator.
- Execution client verifies legality and broadcasts it to the network.
- Block proposer packages transactions into an "execution payload," executes them locally, and passes the payload to the consensus client.
- Consensus client wraps the payload into a "beacon block," adding rewards, penalties, and attestations.
- Other nodes re-execute the block to confirm validity before adding it to their chain.
- Finality: A transaction is irreversible after being included in two checkpointed epochs with ≥66% validator approval.
1.4 Finality
A block becomes "finalized" when:
- It receives ≥⅔ validator votes (upgraded to "justified").
- A subsequent block is also justified, finalizing the earlier one.
- Reversing finalized blocks requires burning ≥⅓ of staked ETH due to slashing penalties.
1.5 Cryptographic Economic Security
Validators earn rewards for honest participation but face penalties for:
- Inactivity: Missed attestations reduce rewards.
- Dishonesty (e.g., double voting): Slashing destroys staked ETH, with escalating penalties for coordinated attacks.
1.6 Fork Choice
The LMD-GHOST algorithm resolves forks by selecting the chain with the heaviest attestation weight.
1.7 PoS vs. PoW Security
Both are vulnerable to 51% attacks, but PoS allows community-driven countermeasures (e.g., social consensus forks).
2. Gasper: Ethereum’s Consensus Mechanism
Gasper combines Casper-FFG (finality tool) and LMD-GHOST (fork choice).
2.1 Finality Conditions
- Justified: Checkpoint with ≥⅔ validator votes.
- Finalized: Two consecutive justified checkpoints.
2.2 Incentives and Slashing
- Rewards: Earned for honest block proposals/attestations.
- Slashing: Penalizes malicious actions (e.g., double-block proposals) with ETH burns and forced exit.
2.3 Inactivity Leak
If finality stalls for >4 epochs, inactive validators lose staked ETH until ≥⅔ participation resumes.
3. Weak Subjectivity
- Weak subjectivity checkpoints help new nodes sync correctly by trusting recent agreed-upon states.
- Different from finality: Checkpoints are socially enforced, not algorithmically irreversible.
4. Validator Responsibilities
4.1 Attestations
Validators vote on:
- Source: Last justified checkpoint.
- Target: Current epoch’s first block.
- Head: Latest valid block.
4.2 Rewards
Calculated via base_reward (scaled by active validators) and inclusion_delay.
4.3 Penalties
- Missed votes: Lose equivalent rewards.
- Slashing: Up to 1 ETH burned for provable dishonesty.
5. Attacks and Defenses
5.1 Attack Types
- Reorgs: Small-scale reorganizations (e.g., withholding blocks).
- Balancing/LMD Attacks: Splitting validator votes across forks.
- Finality Delay: Withholding votes to stall consensus.
5.2 Defense Mechanisms
- Proposer-Weight Boosting: Favors timely block proposals.
- LMD-GHOST: Discards equivocating validators.
5.3 Community as Last Resort
Social coordination resolves extreme attacks (e.g., 66% stake takeover).
6. FAQs
6.1 What’s the difference between PoS and PoW?
PoS replaces energy-intensive mining with staked ETH, offering scalability and reduced centralization risks.
6.2 Can small validators compete?
Yes! Rewards scale linearly with stake, ensuring fair returns for all.
6.3 How does Ethereum prevent long-range attacks?
Weak subjectivity checkpoints and slashing disincentivize historical chain rewrites.
👉 Learn how to stake ETH securely
👉 Explore Ethereum’s consensus specs