-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add page on pos rewards and penalties #7541
Conversation
❌ ethereum-org-website-dev deploy preview failedYour build failed. View the build logs. |
src/content/developers/docs/consensus-mechanisms/pos/rewards-and-penalties/index.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmcook1186 This is really great, nice job here! This will be a very nice resource to have on the page.
I left comments for round one, but clearly I'm going to need to peak at those sources myself at the bottom to get a refresher and circle back.
src/content/developers/docs/consensus-mechanisms/pos/rewards-and-penalties/index.md
Outdated
Show resolved
Hide resolved
src/content/developers/docs/consensus-mechanisms/pos/rewards-and-penalties/index.md
Outdated
Show resolved
Hide resolved
src/content/developers/docs/consensus-mechanisms/pos/rewards-and-penalties/index.md
Outdated
Show resolved
Hide resolved
src/content/developers/docs/consensus-mechanisms/pos/rewards-and-penalties/index.md
Outdated
Show resolved
Hide resolved
src/content/developers/docs/consensus-mechanisms/pos/rewards-and-penalties/index.md
Outdated
Show resolved
Hide resolved
|
||
Assuming a 100% `participation_rate`: | ||
|
||
- You vote correctly and gets included in the next slot: you get 31/8 \* `base_reward` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmcook1186 Can you help me more with where the 31/8
comes from?
Wouldn't it be 100% participation * 1/1 slot inclusion * 3 correct votes * 7/8 attester reward share * base_reward
, which would be 21/8 * base_reward
Same with the others in this section.. maybe I need more clarification on the table above and how exactly that's being determined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is 8/8 * 3 * base_reward
for source, target and head votes, plus 7/8 * base_reward
= 31/8.
I'm not 100% sure this is right, but it is consistent with the kb.beaconchain info.
- By attesting to a block that "surrounds" another one (effectively changing history) | ||
- By "double voting" by attesting to two candidates for the same block | ||
|
||
If these actions are detected, the validator is slashed. This means that 1/64th of their staked ether (up to a maximum of 0.5 ether) is immediately burned, then a 36 day removal period begins. During this removal period the validators stake gradually bleeds away. At the mid-point (Day 18) an additional penalty is applied whose magnitude scales with the total staked ether of all slashed validators in the 36 days prior to slashing event. This means that when more validators are slashed, the magnitude of the slash increases. The maximum slash is the full effective balance of all slashed validators (i.e. if there are lots of validators being slashed they could lose their entire stake). On the other hand, a single, isolated slashing event only burns a small portion of the validator's stake. This midpoint penalty that scales with the number of slashed validators is called the "correlation penalty". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And similar to above (perhaps this is the better place for it), a note about why this occurs would be good. Reiterating, some version of how the staked ETH needs to remain accessible to the protocol, while banned that validator from casting any further votes. The correlation penalty is because this is perceived as a coordinated attack.
src/content/developers/docs/consensus-mechanisms/pos/rewards-and-penalties/index.md
Outdated
Show resolved
Hide resolved
src/content/developers/docs/consensus-mechanisms/pos/rewards-and-penalties/index.md
Show resolved
Hide resolved
src/content/developers/docs/consensus-mechanisms/pos/rewards-and-penalties/index.md
Show resolved
Hide resolved
Co-authored-by: Paul Wackerow <[email protected]>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…nd-penalties/index.md
src/content/developers/docs/consensus-mechanisms/pos/rewards-and-penalties/index.md
Outdated
Show resolved
Hide resolved
### Attestation scenarios | ||
|
||
Assuming attestations are timely (included in the very next block, inclusion distance of 1) the following table describes the attestation rewards for four scenarios: | ||
|
||
| `source` | `target` | `head` | `base_reward` | penalty | `inclusion_delay` | Result | | ||
| ----------------- | ----------------- | ----------------- | ---------------------------------------- | ------------------ | -------------------- | ----------------------------------------------------------------- | | ||
| incorrect/missing | incorrect/missing | incorrect/missing | 0 | 3 \* `base_reward` | 0 | -3 \* `base_reward` | | ||
| correct | incorrect/missing | incorrect/missing | `base_reward` \* `participation_rate` | 2 \* `base_reward` | `base_reward` \* 7/8 | `base_reward` _ `participation_rate` - 9/8 _ `base_reward` | | ||
| correct | correct | incorrect/missing | 2 _ `base_reward` _ `participation_rate` | `base_reward` | `base_reward` \* 7/8 | (2 _ `base_reward` _ `participation_rate`) - 1/8 \* `base_reward` | | ||
| correct | correct | correct | 3 _ `base_reward` _ `participation_rate` | 0 | `base_reward` \* 7/8 | (3 _ `base_reward` _ `participation_rate`) + `base_reward` \* 7/8 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Adds header ID to header
- Using
vote_reward
andinclusion_reward
to make it more clear these are separate rewards, and being explicit about how the result is thevote_reward
+inclusion_reward
-penalty
- Moves
inclusion_reward
column to the left to consolidate rewards together - Simplifies the "results" mathematically, and arranges them all with the
base_reward
multiplier at the end
(same as screenshot above)
### Attestation scenarios | |
Assuming attestations are timely (included in the very next block, inclusion distance of 1) the following table describes the attestation rewards for four scenarios: | |
| `source` | `target` | `head` | `base_reward` | penalty | `inclusion_delay` | Result | | |
| ----------------- | ----------------- | ----------------- | ---------------------------------------- | ------------------ | -------------------- | ----------------------------------------------------------------- | | |
| incorrect/missing | incorrect/missing | incorrect/missing | 0 | 3 \* `base_reward` | 0 | -3 \* `base_reward` | | |
| correct | incorrect/missing | incorrect/missing | `base_reward` \* `participation_rate` | 2 \* `base_reward` | `base_reward` \* 7/8 | `base_reward` _ `participation_rate` - 9/8 _ `base_reward` | | |
| correct | correct | incorrect/missing | 2 _ `base_reward` _ `participation_rate` | `base_reward` | `base_reward` \* 7/8 | (2 _ `base_reward` _ `participation_rate`) - 1/8 \* `base_reward` | | |
| correct | correct | correct | 3 _ `base_reward` _ `participation_rate` | 0 | `base_reward` \* 7/8 | (3 _ `base_reward` _ `participation_rate`) + `base_reward` \* 7/8 | | |
### Attestation scenarios {#attestation-scenarios} | |
Assuming attestations are timely (included in the very next block, inclusion distance of 1) the following table describes the attestation rewards for four scenarios: | |
| `source` | `target` | `head` | `vote_reward` | `inclusion_reward` | `penalty` | Result (`vote_reward` + `inclusion_reward` - `penalty`) | | |
| ----------------- | ----------------- | ----------------- | ------------------------------------------ | -------------------- | ------------------ | ------------------------------------------------------- | | |
| incorrect/missing | incorrect/missing | incorrect/missing | 0 | 0 | 3 \* `base_reward` | - 3 \* `base_reward` | | |
| correct | incorrect/missing | incorrect/missing | 1 \* `base_reward` \* `participation_rate` | 7/8 \* `base_reward` | 2 \* `base_reward` | (`participation_rate` - 9/8) \* `base_reward` | | |
| correct | correct | incorrect/missing | 2 \* `base_reward` \* `participation_rate` | 7/8 \* `base_reward` | 1 \* `base_reward` | (2 \* `participation_rate` - 1/8) \* `base_reward` | | |
| correct | correct | correct | 3 \* `base_reward` \* `participation_rate` | 7/8 \* `base_reward` | 0 | (3 \* `participation_rate` + 7/8) \* `base_reward` | |
Assuming a 100% `participation_rate`: | ||
|
||
- You vote correctly and gets included in the next slot: you get 31/8 \* `base_reward` | ||
- You miss head because you got a late block and it gets included in the next slot: you get 15/8 \* `base_reward` | ||
- You miss head and target cause you got late a block, you get -1/8 \* `base_reward` | ||
- You attest and vote correctly, but the next block is missed, you get 55/16 \* `base_reward` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mainly just a little style addition to make it easier to compare the coefficients
Assuming a 100% `participation_rate`: | |
- You vote correctly and gets included in the next slot: you get 31/8 \* `base_reward` | |
- You miss head because you got a late block and it gets included in the next slot: you get 15/8 \* `base_reward` | |
- You miss head and target cause you got late a block, you get -1/8 \* `base_reward` | |
- You attest and vote correctly, but the next block is missed, you get 55/16 \* `base_reward` | |
Assuming a `participation_rate` of 100% (1), some common scenarios are: | |
- You vote correctly and it gets included in the next slot: you get **31/8** \* `base_reward` | |
- You miss head because you got a late block and it gets included in the next slot: you get **15/8** \* `base_reward` | |
- You miss head and target cause you got late a block, you get **-1/8** \* `base_reward` | |
- You attest and vote correctly, but the next block is missed, you get **55/16** \* `base_reward` |
…nd-penalties/index.md
src/content/developers/docs/consensus-mechanisms/pos/rewards-and-penalties/index.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmcook1186 🎉 🥳
Description
Adds a page on rewards and penalties in proof-of-stake ethereum as part of kb.beaconchain migration.
Pinging @wackerow for review and suggest possibly getting someone from consensus dev group to look too.
Related Issue
#2277