1. Proof of Stake (PoS) Overview
1.1 What Is PoS?
Proof of Stake (PoS) is a consensus mechanism enabling decentralized agreement on blockchain state transitions. Validators stake ETH into a smart contract and verify new blocks—ensuring legitimacy—while occasionally proposing blocks themselves. Dishonest or inactive validators face penalties ("slashing").
1.2 Validators
To become a validator:
- Stake 32 ETH in a deposit contract.
Run three software components:
- Execution Client: Processes transactions.
- Consensus Client: Manages blockchain consensus.
- Validator Client: Signs votes (attestations).
Ethereum time is divided into:
- Slots: 12-second intervals for block proposals.
- Epochs: 32 slots (6.4 minutes).
Each slot randomly selects:
- Block Proposer: Creates and broadcasts a new block.
- Validator Committee: Votes on proposed blocks.
1.3 Transaction Execution Flow
- User Signs Transaction: Includes a tip for validators.
- Submission: Sent to an execution client for legality checks.
- Broadcast: Valid transactions enter the mempool and propagate network-wide.
Block Creation:
- The elected proposer packages transactions into an execution payload.
- The consensus client wraps this into a beacon block (includes rewards, penalties, attestations).
- Validation: Other nodes re-execute transactions to verify state changes.
- Finalization: A transaction becomes irreversible after inclusion in two checkpoints (≥66% validator approval).
1.4 Finality
A checkpoint pair achieves finality when:
- Justified: Receives 2/3 validator votes.
- Finalized: Older checkpoint in the pair is locked irrevocably (requires burning 1/3 of staked ETH to revert).
1.5 Cryptographic Security
Validators earn rewards for honest participation but face:
- Slashing: For malicious acts (e.g., double proposals).
- Inactivity Leak: Penalizes validators if finality stalls for >4 epochs.
1.6 Fork Choice
Conflicting blocks trigger the LMD-GHOST algorithm, favoring the fork with the heaviest validator attestation weight.
1.7 PoS vs. PoW Security
While 51% attacks remain possible, PoS enhances resilience:
- Attackers must acquire 51% of staked ETH (cost-prohibitive).
- Community can socially coordinate to reject malicious chains.
2. Gasper: Ethereum’s Consensus Engine
Gasper combines:
- Casper-FFG: Finality gadget.
- LMD-GHOST: Fork-choice algorithm.
2.1 Finality Mechanics
- Justification: Checkpoint with 2/3 votes.
- Finalization: Two consecutive justified checkpoints.
2.2 Rewards and Penalties
| Action | Reward/Penalty |
|---------------------------|---------------------------------------------|
| Honest Attestation | 7/8 × base_reward |
| Block Proposal | Extra 8/64 × base_reward |
| Slashing | Destroy up to 1 ETH + correlation penalties |
| Inactivity | Gradual balance depletion |
2.3 Inactivity Leak
Activates if finality stalls >4 epochs, draining inactive validators’ stakes until <1/3 remain.
3. Weak Subjectivity
3.1 Key Concepts
- Weak Subjectivity Checkpoint: A trusted state hash (e.g., from social consensus) preventing long-range attacks.
- Difference from Finality: Checkpoints are social agreements; finalized blocks are protocol-enforced.
3.2 Attack Mitigation
- Limits historical reorganization beyond checkpoints.
- Requires attackers to burn ETH proportional to checkpoint age.
4. Validator Lifecycle
4.1 Attestation Process
- Create: Votes on source/target checkpoints and head block.
- Broadcast: Signed attestations propagate via gossip.
- Aggregate: Committees combine signatures for efficiency.
- Include: Added to beacon blocks.
4.2 Rewards Calculation
attestation_reward = (7/8) × base_reward × (1/inclusion_delay) 5. Attacks and Defenses
5.1 Attack Vectors
| Attack | Min Stake Required | Impact |
|---------------------------|------------------------|--------------------------------|
| Reorg | 2% | Short-chain reorganization |
| Balancing Attack | 7% | Fork stalemate |
| Finality Delay | 33% | Chain halt |
| 51% Attack | 51% | Censorship/chain control |
5.2 Community Safeguards
Social coordination ("Layer 0") remains critical for resolving extreme scenarios (e.g., double finality).
6. FAQ
Q: How does PoS differ from PoW in wealth distribution?
A: PoS rewards are linear (fixed % ROI), unlike PoW’s economies of scale favoring large miners.
Q: Can validators be slashed for offline periods?
A: Minor penalties apply, but slashing occurs only for provable malice (e.g., double voting).
Q: What’s the role of execution clients?
A: They process transactions, while consensus clients manage validator coordination.
👉 Learn more about Ethereum staking