1 of 174

Ethereum

Proof of Stake:

Casper FFG Overview

2 of 174

1.

Quick Review:

Blockchain Basics

The blockchain is fundamental to technology like Ethereum or Bitcoin

3 of 174

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

4 of 174

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

5 of 174

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

6 of 174

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

7 of 174

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

8 of 174

The “current state” of the blockchain is the result of executing all blocks and their transactions

9 of 174

1.

Starting with

Proof of Work

Proof of work currently secures the Ethereum blockchain

10 of 174

How does PoW Work?

Time 1

Ethereum miner

Genesis

Miner mining on top of genesis block

Miner receives

transactions from

normal users

11 of 174

How does PoW Work?

Time 1

Miner receives block reward

But mining the block costs lots of energy

12 of 174

How does PoW Work?

Time 1

Miner receives

transactions from

normal users

13 of 174

How does PoW Work?

Time 1

14 of 174

How does PoW Work?

Time 1

Current state of Ethereum

15 of 174

How does PoW Work?

Time 1

New miner larger arrives

16 of 174

How does PoW Work?

Time 1

A fork has occurred!

17 of 174

How does PoW Work?

Time 1

18 of 174

How does PoW Work?

Time 1

19 of 174

How does PoW Work?

Time 1

Block not included in Ethereum history.

Note: The miner doesn’t receive their block reward

20 of 174

How does PoW Work?

Time 1

Small miner gives up on their fork, and instead mines the longest known chain

21 of 174

How does PoW Work?

Time 1

Small miner finds the next block, and this time receives block reward

22 of 174

How does PoW Work?

Time 1

Mining on shorter forks does not provide block rewards.

Notice the incentive to mine on the longest chain.

23 of 174

How does PoW Work?

Time 1

Another miner joins

24 of 174

How does PoW Work?

Time 1

25 of 174

How does PoW Work?

Time 1

26 of 174

How does PoW Work?

Time 1

27 of 174

How does PoW Work?

Time 1

Yay 🎉

Proof of work...

works!

28 of 174

Not so fast!

Proof of work

isn’t perfect…

29 of 174

2.

Problems with Proof of Work

  • Wasted energy
  • Vulnerable to ASICs and centralization
  • Lacks “finality”

30 of 174

Problem 1: Bad for the Environment

Ethereum PoW mining already burns more energy than small nation states, like Cyprus

31 of 174

Problem 2:

Vulnerable to ASICs &

Miner Centralization

Time 1

ASICs and miner centralization make chain reversions relatively low cost

32 of 174

Problem 2:

Vulnerable to ASICs &

Miner Centralization

Time 1

ASICs and miner centralization can cause chain reversions at low cost

33 of 174

Problem 2:

Vulnerable to ASICs &

Miner Centralization

Time 1

ASICs and miner centralization can cause chain reversions at low cost

34 of 174

Problem 2:

Vulnerable to ASICs &

Miner Centralization

Time 1

ASICs and miner centralization can cause chain reversions at low cost

35 of 174

Problem 2:

Vulnerable to ASICs &

Miner Centralization

Time 1

ASICs and miner centralization can cause chain reversions at low cost

36 of 174

Problem 2:

Vulnerable to ASICs &

Miner Centralization

Time 1

ASICs and miner centralization can cause chain reversions at low cost

37 of 174

Problem 2:

Vulnerable to ASICs &

Miner Centralization

Time 1

ASICs and miner centralization can cause chain reversions at low cost

38 of 174

Problem 2:

Vulnerable to ASICs &

Miner Centralization

Time 1

ASICs and miner centralization can cause chain reversions at low cost

39 of 174

Problem 2:

Vulnerable to ASICs &

Miner Centralization

Time 1

ASICs and miner centralization can cause chain reversions at low cost

40 of 174

Problem 2:

Vulnerable to ASICs &

Miner Centralization

Time 1

Blockchain reversion!

41 of 174

Finality guarantees that history will never be changed.

Problem 2:

Vulnerable to ASICs &

Miner Centralization

  • No in protocol penalty for reversion
  • Difficulty recovering from 51% attacks
  • Explicitly lacks finality

42 of 174

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

43 of 174

This is real!

UASF exploited this vulnerability!

44 of 174

3.

Adding in

Proof of Stake:

Hybrid Casper

Layering PoS on top of PoW for with

Casper the Friendly Finality Gadget

45 of 174

What is a “Finality Gadget”

Casper the Friendly Finality Gadget is the phase 1 deployment of proof of stake on Ethereum.

It adds:

  • PoS, layered on top of PoW
  • Finality every 50 blocks [one epoch]
  • 51% attack resistance
  • Reduction in energy waste from PoW

In later iterations, PoW will be replaced completely.

46 of 174

Becoming a Validator

Any ETH holder can become a validator by simply depositing ETH into the Casper smart contract

Casper

Smart Contract

Deposit ETH

47 of 174

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!

48 of 174

Why Deposits?

  • Gives us larger incentives to work with
  • Impose larger economic penalties to bad actors

49 of 174

Why Deposits?

  • Gives us larger incentives to work with
  • Impose larger economic penalties to bad actors

50 of 174

Why Deposits?

  • Gives us larger incentives to work with
  • Impose larger economic penalties to bad actors

Slashed deposit!

51 of 174

Casper Votes & Finality

52 of 174

Casper Votes & Finality

The chain is chunked in 50 block segments called epochs

53 of 174

Casper Votes & Finality

The chain is chunked in 50 block segments called epochs

Every 50th block is considered a checkpoint.

54 of 174

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.

55 of 174

Casper Votes & Finality

56 of 174

Casper Votes & Finality

57 of 174

Casper Votes & Finality

58 of 174

Casper Votes & Finality

½

59 of 174

Casper Votes & Finality

¾

60 of 174

Casper Votes & Finality

Justified checkpoint!

¾

61 of 174

Casper Votes & Finality

¾

62 of 174

Casper Votes & Finality

¾

63 of 174

Casper Votes & Finality

1 epoch

¾

64 of 174

Casper Votes & Finality

¾

65 of 174

Casper Votes & Finality

VOTE: [ validator_index,

target_hash,

target_epoch,

source_epoch ]

¾

66 of 174

Casper Votes & Finality

VOTE: [ validator_index,

target_hash,

target_epoch,

source_epoch ]

target

source

¾

67 of 174

Casper Votes & Finality

VOTE: [ validator_index,

target_hash,

target_epoch,

source_epoch ]

target

source

¾

68 of 174

Casper Votes & Finality

VOTE: [ 1,

target_hash,

target_epoch,

source_epoch ]

target

source

¾

69 of 174

Casper Votes & Finality

VOTE: [ 1,

0x34ba31,

target_epoch,

source_epoch ]

target

source

Epoch 1

Epoch 2

¾

70 of 174

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)

¾

71 of 174

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)

¾

72 of 174

Casper Votes & Finality

Epoch 1

Epoch 2

¾

73 of 174

Casper Votes & Finality

Epoch 1

Epoch 2

¾

¾

74 of 174

Casper Votes & Finality

Justified checkpoint!

Epoch 1

Epoch 2

¾

¾

75 of 174

Casper Votes & Finality

Supermajority link

Epoch 1

Epoch 2

¾

¾

76 of 174

Casper Votes & Finality

Two in a row!

Epoch 1

Epoch 2

¾

¾

77 of 174

Casper Votes & Finality

Finalized checkpoint!

Epoch 1

Epoch 2

¾

¾

78 of 174

Why two in a row?

To be finalized, you must know that everyone else knows that this block is included in the main chain.

  • Announce you believe block is in main chain
  • Receive same message from ⅔ of validators
  • Announce that you heard ⅔ validators announcements
  • Receive same message from ⅔ of validators

Now you know that everyone else knows that the block is part of the main chain.

79 of 174

Why two in a row?

  • Announce you believe block is in main chain
  • Receive same message from ⅔ of validators
  • Announce that you heard ⅔ validators announcements
  • Receive same message from ⅔ of validators

Each vote counts as a “preparation” of the target epoch, and a “commitment” on the previous epoch

80 of 174

Casper Votes & Finality

Epoch 1

Epoch 2

I believe this is the target for epoch 2!

¾

¾

81 of 174

Casper Votes & Finality

Epoch 1

Epoch 2

I have seen ⅔ votes on this block for epoch 1!

¾

¾

82 of 174

4.

Slashing Conditions

Burning validator deposits if malicious behavior detected

83 of 174

Slashing Condition #1:

NO DOUBLE VOTE

Epoch 1

¾

84 of 174

Slashing Condition #1:

NO DOUBLE VOTE

Epoch 1

¾

85 of 174

Slashing Condition #1:

NO DOUBLE VOTE

Epoch 1

Epoch 2

¾

86 of 174

Slashing Condition #1:

NO DOUBLE VOTE

Epoch 1

Epoch 2

¾

87 of 174

Slashing Condition #1:

NO DOUBLE VOTE

Epoch 1

Epoch 2

¾

88 of 174

Slashing Condition #1:

NO DOUBLE VOTE

Epoch 1

Epoch 2

¾

89 of 174

Slashing Condition #1:

NO DOUBLE VOTE

Epoch 1

Epoch 2

¾

90 of 174

Slashing Condition #1:

NO DOUBLE VOTE

Epoch 1

Epoch 2

¾

91 of 174

Slashing Condition #1:

NO DOUBLE VOTE

¾

92 of 174

Slashing Condition #1:

NO DOUBLE VOTE

¾

Evidence

93 of 174

Slashing Condition #1:

NO DOUBLE VOTE

¾

Reward

94 of 174

Slashing Condition #1:

NO DOUBLE VOTE

¾

Slash

Slash

95 of 174

Slashing Condition #1:

NO DOUBLE VOTE

¾

Evidence

96 of 174

Slashing Condition #1:

NO DOUBLE VOTE

¾

Reward

97 of 174

Slashing Condition #1:

NO DOUBLE VOTE

¾

Slash

Slash

98 of 174

Slashing Condition #2:

NO SURROUND VOTE

h(s1) = 3

h(t1) = 4

h(s2) = 2

h(t2) = 5

99 of 174

Slashing Condition #2:

NO SURROUND VOTE

h(s1) = 3

h(t1) = 4

h(s2) = 2

h(t2) = 5

100 of 174

Slashing Condition #2:

NO SURROUND VOTE

h(s1) = 3

h(t1) = 4

h(s2) = 2

h(t2) = 5

101 of 174

Slashing Condition #2:

NO SURROUND VOTE

h(s1) = 3

h(t1) = 4

h(s2) = 2

h(t2) = 5

102 of 174

Slashing Condition #2:

NO SURROUND VOTE

h(s1) = 3

h(t1) = 4

h(s2) = 2

h(t2) = 5

103 of 174

Casper Checkpoints:

Resist PoW attack

Time 1

104 of 174

Casper Checkpoints:

Resist PoW attack

Time 1

½

105 of 174

Casper Checkpoints:

Resist PoW attack

Time 1

¾

106 of 174

Casper Checkpoints:

Resist PoW attack

Time 1

¾

107 of 174

Casper Checkpoints:

Resist PoW attack

Time 1

¾

¼

¼

108 of 174

Casper Checkpoints:

Resist PoW attack

Time 1

¾

¼

½

109 of 174

Casper Checkpoints:

Resist PoW attack

Time 1

¾

¾

¼

110 of 174

Casper Checkpoints:

Resist PoW attack

Time 1

¼

¼

¾

¾

¼

111 of 174

Casper Checkpoints:

Resist PoW attack

Time 1

¼

¾

¾

¾

¼

112 of 174

Casper Checkpoints:

Resist PoW attack

Time 1

¼

¾

¾

¾

¼

113 of 174

Casper Checkpoints:

Resist PoW attack

Time 1

Warning: PoW Attack!

¼

¾

¾

¾

¼

114 of 174

Casper Checkpoints:

Resist PoW attack

¼

¾

¾

¾

¼

115 of 174

Casper Checkpoints:

Resist PoW attack

¼

¾

¾

¾

¼

116 of 174

Casper Checkpoints:

Resist PoW attack

¼

¾

¾

¾

¼

117 of 174

Casper Checkpoints:

Resist PoW attack

¼

¾

¾

¾

¼

118 of 174

Casper Checkpoints:

Resist PoW attack

¼

¾

¾

¾

¼

119 of 174

Casper Checkpoints:

Resist PoW attack

¼

¾

¾

¾

¼

120 of 174

Casper Checkpoints:

Resist PoW attack

¼

¾

¾

¾

¼

121 of 174

Casper Checkpoints:

Resist PoW attack

¼

¾

¾

¾

¼

122 of 174

Casper Checkpoints:

Resist PoW attack

¼

¾

¾

¾

¼

123 of 174

Casper Checkpoints:

Resist PoW attack

¼

¾

¾

¾

¼

124 of 174

Casper Checkpoints:

Resist PoW attack

PoW Attack FAILED!

¼

¾

¾

¾

¼

125 of 174

Casper Checkpoints:

Resist PoW attack

PoW Attack FAILED!

126 of 174

Casper Checkpoints:

Resist PoW attack

PoW Attack FAILED!

Go Casper!

127 of 174

5.

Economic Incentives

  • Why validators volunteer
  • How poor performance & attackers are discouraged

128 of 174

Validator Rewards

and Penalties

⁴⁄₄

129 of 174

Validator Rewards

and Penalties

⁴⁄₄

130 of 174

Validator Rewards

and Penalties

⁴⁄₄

131 of 174

Validator Rewards

and Penalties

⁴⁄₄

132 of 174

Validator Rewards

and Penalties

Blockchain Utility:

⁴⁄₄

133 of 174

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

⁴⁄₄

134 of 174

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

⁴⁄₄

135 of 174

Validator Rewards

and Penalties

Blockchain Utility:

⁴⁄₄

136 of 174

Validator Rewards

and Penalties

Blockchain Utility:

⁴⁄₄

137 of 174

Validator Rewards

and Penalties

Blockchain Utility:

½

¼

⁴⁄₄

138 of 174

Validator Rewards

and Penalties

Blockchain Utility:

½

½

⁴⁄₄

139 of 174

Validator Rewards

and Penalties

Blockchain Utility:

½

½

⁴⁄₄

140 of 174

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:

½

½

⁴⁄₄

141 of 174

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

½

½

⁴⁄₄

142 of 174

Validator Rewards

and Penalties

Blockchain Utility:

½

½

⁴⁄₄

¼

143 of 174

Validator Rewards

and Penalties

Blockchain Utility:

½

½

½

½

⁴⁄₄

144 of 174

Validator Rewards

and Penalties

Blockchain Utility:

½

½

½

½

⁴⁄₄

145 of 174

Validator Rewards

and Penalties

Blockchain Utility:

Last finalized epoch = 1

Current epoch = 4

Utility = -1.58

½

½

½

½

⁴⁄₄

146 of 174

Validator Rewards

and Penalties

Blockchain Utility:

Last finalized epoch = 1

Current epoch = 4

Utility = -1.58

½

½

½

½

⁴⁄₄

147 of 174

Validator Rewards

and Penalties

Blockchain Utility:

½

½

½

½

⁴⁄₄

¼

¼

148 of 174

Validator Rewards

and Penalties

Blockchain Utility:

½

½

½

½

⁴⁄₄

¾

¼

149 of 174

Validator Rewards

and Penalties

Blockchain Utility:

½

½

½

½

⁴⁄₄

¾

¼

150 of 174

Validator Rewards

and Penalties

Blockchain Utility:

Last finalized epoch = 4

Current epoch = 5

Utility = 0

½

½

½

½

⁴⁄₄

¾

¼

151 of 174

6.

Discouragement Attacks

Discouraging new validators from joining the validation pool

152 of 174

Validator Rewards

and Penalties

Prospective

Validators

Expected Return

⁴⁄₄

153 of 174

Validator Rewards

and Penalties

Prospective

Validators

Expected Return

⁴⁄₄

154 of 174

Validator Rewards

and Penalties

Prospective

Validators

Expected Return

⁴⁄₄

155 of 174

Validator Rewards

and Penalties

Prospective

Validators

Expected Return

⁴⁄₄

156 of 174

Validator Rewards

and Penalties

Prospective

Validators

Expected Return

⁴⁄₄

157 of 174

Validator Rewards

and Penalties

Prospective

Validators

Expected Return

½

¼

⁴⁄₄

158 of 174

Validator Rewards

and Penalties

Prospective

Validators

Expected Return

½

½

⁴⁄₄

159 of 174

Validator Rewards

and Penalties

Prospective

Validators

Expected Return

½

½

⁴⁄₄

160 of 174

Validator Rewards

and Penalties

Prospective

Validators

Expected Return

½

½

⁴⁄₄

161 of 174

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

½

½

⁴⁄₄

162 of 174

Validator Rewards

and Penalties

Prospective

Validators

Expected Return

½

½

⁴⁄₄

163 of 174

Validator Rewards

and Penalties

Prospective

Validators

Expected Return

½

½

¼

¼

⁴⁄₄

164 of 174

Validator Rewards

and Penalties

Prospective

Validators

Expected Return

½

½

½

½

⁴⁄₄

165 of 174

Validator Rewards

and Penalties

Prospective

Validators

Expected Return

½

½

½

½

⁴⁄₄

166 of 174

Validator Rewards

and Penalties

Prospective

Validators

Expected Return

½

½

½

½

⁴⁄₄

167 of 174

Validator Rewards

and Penalties

  • Expected return reduced
  • Total deposited ETH reduced
  • Attacker requires less ETH to violate safety

Prospective

Validators

Expected Return

½

½

½

½

⁴⁄₄

168 of 174

Validator Rewards

and Penalties

  • Expected return reduced
  • Total deposited ETH reduced
  • Attacker requires less ETH to violate safety

Prospective

Validators

Expected Return

½

½

½

½

⁴⁄₄

169 of 174

Validator Rewards

and Penalties

  • Expected return reduced
  • Total deposited ETH reduced
  • Attacker requires less ETH to violate safety

Prospective

Validators

Expected Return

½

½

½

½

⁴⁄₄

170 of 174

7.

The Road Ahead

Why Casper is Critical, and Next Steps

171 of 174

Casper Benefits

Moving from proof of work to proof of stake will allow the Ethereum protocol to:

  • Waste far less energy
  • Pay less for better security
  • Resist centralization
  • Provide guarantees around finality

All of these traits are critical for an open and secure globally scalable blockchain.

172 of 174

Next Steps

  • Papers with a full specification and justification for Casper are in the works.
  • The first full implementation of Casper is basically done!
  • A preliminary Casper testnet is on its way.
  • Replacing PoW completely is up next.

Bonus: Share cryptoeconomic techniques developed during years of Casper research

173 of 174

Success!

That’s Casper!

174 of 174

Thank you!

Related Resources: