Вы находитесь на странице: 1из 23

So you want to be a Casper

validator….
Step 1: choose your validation code

● When depositing to Casper, you specify a computer


program that will be used to verify your signatures
● EVM code
● Input passed as 32 bytes message hash + signature
● 200k gas limit
● MUST be a pure function
Validation code already implemented:

● Elliptic curve verification (ECRECOVER)


● Quantum-resistant hash ladder sigs

Could implement:

● Multisig M-of-N ECRECOVER


● Threshold signature (eg. BLS)
● Keys that can authorize other keys
Step 2: choose your withdrawal
address

● Where you want the money to go when you’re done


validating
● Can be a cold wallet
In practice:

● You’ll just click a button that says “deposit”, and your


client generates the default validation code, sets the
withdrawal address to be the same as the address
you sent from (unless you specify otherwise) and
publishes the transaction automatically
Step 3: deposit

● Send the deposit transaction, min 1500 ETH


○ If you have less, join a stake pool
● You get inducted as a validator in ~2 dynasties
(normally, ~45 minutes)
Step 4: stay online

● Every epoch, your node will sign and send a “vote”


message, this is all that is needed to participate in
the consensus
● Make sure your node stays turned on and connected
The Casper finality gadget is
a separate process that runs
in parallel with proof of work
and finalizes blocks, giving
them additional security.
Rewards and penalties (assuming 10M ETH deposited)

Stay online and vote 0% to +5% per year

Go offline -5% to -10% per year (normally)

Can lose more in extreme


circumstances

Make conflicting votes Get logged out, lose ~1% to


100%
Validator returns are
proportional to the
inverse square root of
total deposits. That is, if
total deposits go up 2%,
validator interest rates go
down 1%, and the total
issuance goes up 1%.
Collective rewards
and penalties

Your reward
depends not just on
whether or not you
vote, but also on
whether or not other
validators vote.
Quadratic Leak
Portion of offline validators’ deposits remaining
If more than ⅓ of validators
stop voting correctly, so blocks
stop finalizing, non-voting
validators’ deposits start to
“leak” much more quickly until
blocks start finalizing again.
Voting validators get zero
Days rewards (but no penalties)
during this phase.
What if you get slashed?
In general, you get slashed for
submitting two votes that contradict
each other. There are two slashing
conditions that define the precise
conditions under which this happens:
1. NO_DBL_VOTE (cannot make two different votes
in the same epoch)
2. NO_SURROUND (cannot make a later vote which
references an earlier source than an earlier vote)
If you’re a good guy, this could happen to you because:

● Your computer disk gets corrupted, causing you to


forget that you already signed a message at some
height
● Your node gets hacked
● Your VPS provider gets hacked (if staking on a VPS)
Partial slashing… to the rescue!
If you get slashed:

● You get forcibly logged out immediately


● You suffer “collective penalties” as though you are a
non-voting validator for the next 4 months (min ~2%)
● You suffer a penalty of 3p * your deposit, where p is
the portion of other validators that also get slashed
within 4 months of you
● Thus, unless you get really unlucky, just your own node
violating a slashing condition won’t hurt you too much
A not A slashed
slashed
B not (0, 0) (-12, 0)
slashed
B slashed (0, -12) (-22, -22)

The partial slashing mechanism incentivizes validators to set


up their security to have failure modes that are maximally
discorrelated from everyone else’s failure modes.
This means:

● Don’t participate in the same staking pool as everyone


else
● Don’t use the same VPS as everyone else
● Don’t use the same operating system as everyone else
● Don’t use the sample implementation as everyone
else (!!)
Step 5: logout

● Either your online key or your withdrawal address


can trigger the withdraw function
● This logs you out in 700 dynasties (normally ~1 week)
● Once logged off, you will be able to recover your
funds in 4 months.
If you do not have 1500 ETH, you
can participate in Casper through
a stake pool. The main differences
between staking pools will be:

● Reliability
● Size (larger is more dangerous!)
● Deposit / withdraw conditions
● Centralized vs decentralized (eg. using threshold
signature between participants)
You will also soon™ be able
to stake in the experimental
sharding system. Deposit
minimums likely to be only 32
ETH there.
Thank you and wish you a happy
validating experience!

Вам также может понравиться