Ethereum
Proof of Stake:
Casper FFG Overview
1.
Quick Review:
Blockchain Basics
The blockchain is fundamental to technology like Ethereum or Bitcoin
What is a “Blockchain”?
In Ethereum we use a blockchain to update ETH balances and smart contracts.
Alice sends 5 ETH to Bob
Send 5 ETH
What is a “Blockchain”?
In Ethereum we use a blockchain to store ETH balances and smart contracts.
Alice sends 5 ETH to Bob
Bob sends Dan 10 GNT
Send 5 ETH
Send 10 GNT
What is a “Blockchain”?
Alice sends 5 ETH to Bob
Bob sends Dan 10 GNT
Dan votes on proposal
Send 5 ETH
Send 10 GNT
Submit Vote
What is a “Blockchain”?
Alice sends 5 ETH to Bob
Bob sends Dan 10 GNT
Dan votes on proposal
Proposal pays Alice 50 ETH
Send 5 ETH
Send 10 GNT
Submit Vote
Send 50 ETH
What is a “Blockchain”?
Alice sends 5 ETH to Bob
Bob sends Dan 10 GNT
Dan votes on proposal
Proposal pays Alice 50 ETH
Send 5 ETH
Send 10 GNT
Submit Vote
Send 50 ETH
The “current state” of the blockchain is the result of executing all blocks and their transactions
1.
Starting with
Proof of Work
Proof of work currently secures the Ethereum blockchain
How does PoW Work?
Time 1
Ethereum miner
Genesis
Miner mining on top of genesis block
Miner receives
transactions from
normal users
How does PoW Work?
Time 1
Miner receives block reward
But mining the block costs lots of energy
How does PoW Work?
Time 1
Miner receives
transactions from
normal users
How does PoW Work?
Time 1
How does PoW Work?
Time 1
Current state of Ethereum
How does PoW Work?
Time 1
New miner larger arrives
How does PoW Work?
Time 1
A fork has occurred!
How does PoW Work?
Time 1
How does PoW Work?
Time 1
How does PoW Work?
Time 1
Block not included in Ethereum history.
Note: The miner doesn’t receive their block reward
How does PoW Work?
Time 1
Small miner gives up on their fork, and instead mines the longest known chain
How does PoW Work?
Time 1
Small miner finds the next block, and this time receives block reward
How does PoW Work?
Time 1
Mining on shorter forks does not provide block rewards.
Notice the incentive to mine on the longest chain.
How does PoW Work?
Time 1
Another miner joins
How does PoW Work?
Time 1
How does PoW Work?
Time 1
How does PoW Work?
Time 1
How does PoW Work?
Time 1
Yay 🎉
Proof of work...
works!
Not so fast!
Proof of work
isn’t perfect…
2.
Problems with Proof of Work
Problem 1: Bad for the Environment
Ethereum PoW mining already burns more energy than small nation states, like Cyprus
Problem 2:
Vulnerable to ASICs &
Miner Centralization
Time 1
ASICs and miner centralization make chain reversions relatively low cost
Problem 2:
Vulnerable to ASICs &
Miner Centralization
Time 1
ASICs and miner centralization can cause chain reversions at low cost
Problem 2:
Vulnerable to ASICs &
Miner Centralization
Time 1
ASICs and miner centralization can cause chain reversions at low cost
Problem 2:
Vulnerable to ASICs &
Miner Centralization
Time 1
ASICs and miner centralization can cause chain reversions at low cost
Problem 2:
Vulnerable to ASICs &
Miner Centralization
Time 1
ASICs and miner centralization can cause chain reversions at low cost
Problem 2:
Vulnerable to ASICs &
Miner Centralization
Time 1
ASICs and miner centralization can cause chain reversions at low cost
Problem 2:
Vulnerable to ASICs &
Miner Centralization
Time 1
ASICs and miner centralization can cause chain reversions at low cost
Problem 2:
Vulnerable to ASICs &
Miner Centralization
Time 1
ASICs and miner centralization can cause chain reversions at low cost
Problem 2:
Vulnerable to ASICs &
Miner Centralization
Time 1
ASICs and miner centralization can cause chain reversions at low cost
Problem 2:
Vulnerable to ASICs &
Miner Centralization
Time 1
Blockchain reversion!
Finality guarantees that history will never be changed.
Problem 2:
Vulnerable to ASICs &
Miner Centralization
Why do we want finality?
Case 1: Withdrawing from Exchanges
User receives withdrawl payment.
And exchange updates their ETH balance to zero
Blockchain is reverted.
The user’s payment is not included in the new chain, but inside the exchange their balance is still zero
This is real!
UASF exploited this vulnerability!
3.
Adding in
Proof of Stake:
Hybrid Casper
Layering PoS on top of PoW for with
Casper the Friendly Finality Gadget
What is a “Finality Gadget”
Casper the Friendly Finality Gadget is the phase 1 deployment of proof of stake on Ethereum.
It adds:
In later iterations, PoW will be replaced completely.
Becoming a Validator
Any ETH holder can become a validator by simply depositing ETH into the Casper smart contract
Casper
Smart Contract
Deposit ETH
Becoming a Validator
Any ETH holder can become a validator by simply depositing ETH into the Casper smart contract
Casper
Smart Contract
Deposit ETH
The Casper incentive logic lives in a smart contract!
Why Deposits?
Why Deposits?
Why Deposits?
Slashed deposit!
Casper Votes & Finality
Casper Votes & Finality
The chain is chunked in 50 block segments called epochs
Casper Votes & Finality
The chain is chunked in 50 block segments called epochs
Every 50th block is considered a checkpoint.
Casper Votes & Finality
Finality is achieved when two consecutive checkpoints receive ⅔ votes
The chain is chunked in 50 block segments called epochs
Every 50th block is considered a checkpoint.
Casper Votes & Finality
Casper Votes & Finality
Casper Votes & Finality
Casper Votes & Finality
½
Casper Votes & Finality
¾
Casper Votes & Finality
Justified checkpoint!
¾
Casper Votes & Finality
¾
Casper Votes & Finality
¾
Casper Votes & Finality
1 epoch
¾
Casper Votes & Finality
¾
Casper Votes & Finality
VOTE: [ validator_index,
target_hash,
target_epoch,
source_epoch ]
¾
Casper Votes & Finality
VOTE: [ validator_index,
target_hash,
target_epoch,
source_epoch ]
target
source
¾
Casper Votes & Finality
VOTE: [ validator_index,
target_hash,
target_epoch,
source_epoch ]
target
source
¾
Casper Votes & Finality
VOTE: [ 1,
target_hash,
target_epoch,
source_epoch ]
target
source
¾
Casper Votes & Finality
VOTE: [ 1,
0x34ba31,
target_epoch,
source_epoch ]
target
source
Epoch 1
Epoch 2
¾
Casper Votes & Finality
VOTE: [ 1,
0x34ba31,
2,
source_epoch ]
target
source
Epoch 1
Epoch 2
VOTE RESTRICTION:�A vote’s source_epoch must be justified �(greater than ⅔ votes)
¾
Casper Votes & Finality
VOTE: [ 1,
0x34ba31,
2,
1 ]
target
source
Epoch 1
Epoch 2
VOTE RESTRICTION:�A vote’s source_epoch must be justified �(greater than ⅔ votes)
¾
Casper Votes & Finality
Epoch 1
Epoch 2
¾
Casper Votes & Finality
Epoch 1
Epoch 2
¾
¾
Casper Votes & Finality
Justified checkpoint!
Epoch 1
Epoch 2
¾
¾
Casper Votes & Finality
Supermajority link
Epoch 1
Epoch 2
¾
¾
Casper Votes & Finality
Two in a row!
Epoch 1
Epoch 2
¾
¾
Casper Votes & Finality
Finalized checkpoint!
Epoch 1
Epoch 2
¾
¾
Why two in a row?
To be finalized, you must know that everyone else knows that this block is included in the main chain.
Now you know that everyone else knows that the block is part of the main chain.
Why two in a row?
Each vote counts as a “preparation” of the target epoch, and a “commitment” on the previous epoch
Casper Votes & Finality
Epoch 1
Epoch 2
I believe this is the target for epoch 2!
¾
¾
Casper Votes & Finality
Epoch 1
Epoch 2
I have seen ⅔ votes on this block for epoch 1!
¾
¾
4.
Slashing Conditions
Burning validator deposits if malicious behavior detected
Slashing Condition #1:
NO DOUBLE VOTE
Epoch 1
¾
Slashing Condition #1:
NO DOUBLE VOTE
Epoch 1
¾
Slashing Condition #1:
NO DOUBLE VOTE
Epoch 1
Epoch 2
¾
Slashing Condition #1:
NO DOUBLE VOTE
Epoch 1
Epoch 2
¾
Slashing Condition #1:
NO DOUBLE VOTE
Epoch 1
Epoch 2
¾
Slashing Condition #1:
NO DOUBLE VOTE
Epoch 1
Epoch 2
¾
Slashing Condition #1:
NO DOUBLE VOTE
Epoch 1
Epoch 2
¾
Slashing Condition #1:
NO DOUBLE VOTE
Epoch 1
Epoch 2
¾
Slashing Condition #1:
NO DOUBLE VOTE
¾
Slashing Condition #1:
NO DOUBLE VOTE
¾
Evidence
Slashing Condition #1:
NO DOUBLE VOTE
¾
Reward
Slashing Condition #1:
NO DOUBLE VOTE
¾
Slash
Slash
Slashing Condition #1:
NO DOUBLE VOTE
¾
Evidence
Slashing Condition #1:
NO DOUBLE VOTE
¾
Reward
Slashing Condition #1:
NO DOUBLE VOTE
¾
Slash
Slash
Slashing Condition #2:
NO SURROUND VOTE
h(s1) = 3
h(t1) = 4
h(s2) = 2
h(t2) = 5
Slashing Condition #2:
NO SURROUND VOTE
h(s1) = 3
h(t1) = 4
h(s2) = 2
h(t2) = 5
Slashing Condition #2:
NO SURROUND VOTE
h(s1) = 3
h(t1) = 4
h(s2) = 2
h(t2) = 5
Slashing Condition #2:
NO SURROUND VOTE
h(s1) = 3
h(t1) = 4
h(s2) = 2
h(t2) = 5
Slashing Condition #2:
NO SURROUND VOTE
h(s1) = 3
h(t1) = 4
h(s2) = 2
h(t2) = 5
Casper Checkpoints:
Resist PoW attack
Time 1
Casper Checkpoints:
Resist PoW attack
Time 1
½
Casper Checkpoints:
Resist PoW attack
Time 1
¾
Casper Checkpoints:
Resist PoW attack
Time 1
¾
Casper Checkpoints:
Resist PoW attack
Time 1
¾
¼
¼
Casper Checkpoints:
Resist PoW attack
Time 1
¾
¼
½
Casper Checkpoints:
Resist PoW attack
Time 1
¾
¾
¼
Casper Checkpoints:
Resist PoW attack
Time 1
¼
¼
¾
¾
¼
Casper Checkpoints:
Resist PoW attack
Time 1
¼
¾
¾
¾
¼
Casper Checkpoints:
Resist PoW attack
Time 1
¼
¾
¾
¾
¼
Casper Checkpoints:
Resist PoW attack
Time 1
Warning: PoW Attack!
¼
¾
¾
¾
¼
Casper Checkpoints:
Resist PoW attack
¼
¾
¾
¾
¼
Casper Checkpoints:
Resist PoW attack
¼
¾
¾
¾
¼
Casper Checkpoints:
Resist PoW attack
¼
¾
¾
¾
¼
Casper Checkpoints:
Resist PoW attack
¼
¾
¾
¾
¼
Casper Checkpoints:
Resist PoW attack
¼
¾
¾
¾
¼
Casper Checkpoints:
Resist PoW attack
¼
¾
¾
¾
¼
Casper Checkpoints:
Resist PoW attack
¼
¾
¾
¾
¼
Casper Checkpoints:
Resist PoW attack
¼
¾
¾
¾
¼
Casper Checkpoints:
Resist PoW attack
¼
¾
¾
¾
¼
Casper Checkpoints:
Resist PoW attack
¼
¾
¾
¾
¼
Casper Checkpoints:
Resist PoW attack
PoW Attack FAILED!
¼
¾
¾
¾
¼
Casper Checkpoints:
Resist PoW attack
PoW Attack FAILED!
⅘
⅗
⅖
⅕
⅗
Casper Checkpoints:
Resist PoW attack
PoW Attack FAILED!
Go Casper!
⅘
⅗
⅖
⅕
⅗
5.
Economic Incentives
Validator Rewards
and Penalties
⁴⁄₄
Validator Rewards
and Penalties
⁴⁄₄
Validator Rewards
and Penalties
⁴⁄₄
Validator Rewards
and Penalties
⁴⁄₄
Validator Rewards
and Penalties
Blockchain Utility:
⁴⁄₄
Validator Rewards
and Penalties
Blockchain Utility:
Increasing the finality time of a blockchain by a constant factor causes a constant loss of utility
Last finalized epoch = 1
Current epoch = 2
Utility = 0
⁴⁄₄
Validator Rewards
and Penalties
Blockchain Utility:
Increasing the finality time of a blockchain by a constant factor causes a constant loss of utility
Last finalized epoch = 1
Current epoch = 2
Utility = 0
⁴⁄₄
Validator Rewards
and Penalties
Blockchain Utility:
⁴⁄₄
Validator Rewards
and Penalties
Blockchain Utility:
⁴⁄₄
Validator Rewards
and Penalties
Blockchain Utility:
½
¼
⁴⁄₄
Validator Rewards
and Penalties
Blockchain Utility:
½
½
⁴⁄₄
Validator Rewards
and Penalties
Blockchain Utility:
½
½
⁴⁄₄
Validator Rewards
and Penalties
Notice validators who voted on this chain are penalized less
Last finalized epoch = 1
Current epoch = 3
Utility = -1
Blockchain Utility:
½
½
⁴⁄₄
Validator Rewards
and Penalties
Notice validators who voted on this chain are penalized less
Blockchain Utility:
Last finalized epoch = 1
Current epoch = 3
Utility = -1
½
½
⁴⁄₄
Validator Rewards
and Penalties
Blockchain Utility:
½
½
⁴⁄₄
¼
Validator Rewards
and Penalties
Blockchain Utility:
½
½
½
½
⁴⁄₄
Validator Rewards
and Penalties
Blockchain Utility:
½
½
½
½
⁴⁄₄
Validator Rewards
and Penalties
Blockchain Utility:
Last finalized epoch = 1
Current epoch = 4
Utility = -1.58
½
½
½
½
⁴⁄₄
Validator Rewards
and Penalties
Blockchain Utility:
Last finalized epoch = 1
Current epoch = 4
Utility = -1.58
½
½
½
½
⁴⁄₄
Validator Rewards
and Penalties
Blockchain Utility:
½
½
½
½
⁴⁄₄
¼
¼
Validator Rewards
and Penalties
Blockchain Utility:
½
½
½
½
⁴⁄₄
¾
¼
Validator Rewards
and Penalties
Blockchain Utility:
½
½
½
½
⁴⁄₄
¾
¼
Validator Rewards
and Penalties
Blockchain Utility:
Last finalized epoch = 4
Current epoch = 5
Utility = 0
½
½
½
½
⁴⁄₄
¾
¼
6.
Discouragement Attacks
Discouraging new validators from joining the validation pool
Validator Rewards
and Penalties
Prospective
Validators
Expected Return
⁴⁄₄
Validator Rewards
and Penalties
Prospective
Validators
Expected Return
⁴⁄₄
Validator Rewards
and Penalties
Prospective
Validators
Expected Return
⁴⁄₄
Validator Rewards
and Penalties
Prospective
Validators
Expected Return
⁴⁄₄
Validator Rewards
and Penalties
Prospective
Validators
Expected Return
⁴⁄₄
Validator Rewards
and Penalties
Prospective
Validators
Expected Return
½
¼
⁴⁄₄
Validator Rewards
and Penalties
Prospective
Validators
Expected Return
½
½
⁴⁄₄
Validator Rewards
and Penalties
Prospective
Validators
Expected Return
½
½
⁴⁄₄
Validator Rewards
and Penalties
Prospective
Validators
Expected Return
½
½
⁴⁄₄
Validator Rewards
and Penalties
Notice validators who voted on this chain are penalized less
Last finalized epoch = 1
Current epoch = 3
Utility = -1
Prospective
Validators
Expected Return
½
½
⁴⁄₄
Validator Rewards
and Penalties
Prospective
Validators
Expected Return
½
½
⁴⁄₄
Validator Rewards
and Penalties
Prospective
Validators
Expected Return
½
½
¼
¼
⁴⁄₄
Validator Rewards
and Penalties
Prospective
Validators
Expected Return
½
½
½
½
⁴⁄₄
Validator Rewards
and Penalties
Prospective
Validators
Expected Return
½
½
½
½
⁴⁄₄
Validator Rewards
and Penalties
Prospective
Validators
Expected Return
½
½
½
½
⁴⁄₄
Validator Rewards
and Penalties
Prospective
Validators
Expected Return
½
½
½
½
⁴⁄₄
Validator Rewards
and Penalties
Prospective
Validators
Expected Return
½
½
½
½
⁴⁄₄
Validator Rewards
and Penalties
Prospective
Validators
Expected Return
½
½
½
½
⁴⁄₄
7.
The Road Ahead
Why Casper is Critical, and Next Steps
Casper Benefits
Moving from proof of work to proof of stake will allow the Ethereum protocol to:
All of these traits are critical for an open and secure globally scalable blockchain.
Next Steps
Bonus: Share cryptoeconomic techniques developed during years of Casper research
Success!
That’s Casper!
Thank you!
Related Resources: