Skip to content

Commit

Permalink
Merge pull request #1487 from ipopescu/1440_staking_reorg
Browse files Browse the repository at this point in the history
1440 Restructured staking content
  • Loading branch information
ipopescu authored Aug 5, 2024
2 parents af8be71 + 34ba8a7 commit d888244
Show file tree
Hide file tree
Showing 13 changed files with 131 additions and 183 deletions.
18 changes: 2 additions & 16 deletions config/sidebar.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,7 @@ module.exports = {
type: "doc",
id: "concepts/economics/index",
},
items: [
"concepts/economics/consensus",
"concepts/economics/runtime",
"concepts/economics/gas-concepts",
{
type: "category",
label: "Staking",
collapsible: true,
collapsed: true,
link: {
type: "doc",
id: "concepts/economics/staking/concepts",
},
items: ["concepts/economics/staking/staking", "concepts/economics/staking/delegation"],
},
],
items: ["concepts/economics/consensus", "concepts/economics/runtime", "concepts/economics/gas-concepts", "concepts/economics/staking"],
},
{
type: "category",
Expand Down Expand Up @@ -428,6 +413,7 @@ module.exports = {
"users/index",
"users/block-explorer",
"users/funding-from-exchanges",
"users/delegating",
{
type: "category",
label: "Using CSPR.live",
Expand Down
2 changes: 1 addition & 1 deletion source/docs/casper/concepts/design/casper-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ Refer to the [Serialization Standard](../serialization-standard.md) for addition

## Tokens {#tokens-head}

Casper is a decentralized Proof-of-Stake blockchain platform that may use either the [Highway](./highway.md) or [Zug](./zug.md) consensus mechanisms. Having a unit of value is required to make this system work because users must pay for computation, and validators must have [stake](../economics/staking/staking.md) to bond. In the blockchain space, this unit of value is a _token_.
Casper is a decentralized Proof-of-Stake blockchain platform that may use either the [Highway](./highway.md) or [Zug](./zug.md) consensus mechanisms. Having a unit of value is required to make this system work because users must pay for computation, and validators must have [stake](../economics/staking.md) to bond. In the blockchain space, this unit of value is a _token_.

This chapter describes tokens and how one can use them on the Casper platform.

Expand Down
4 changes: 2 additions & 2 deletions source/docs/casper/concepts/economics/consensus.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ Each bid contains a delegation rate and activity status. The delegation rate can

Delegation allows third parties to participate in consensus by adding weight to their preferred validators. Rewards received by validators are distributed in proportion to tokens bid and delegated. The current or prospective validator responsible for the bid receives a portion of the delegator rewards set by the delegation rate.

Currently, delegation is unrestricted. Please visit [Delegation details](./staking/delegation.md) page to check more about delegation cost and related details.
Currently, there are delegation limits in the chainspec. Visit the [Delegating Tokens](../../users/delegating.md) page for more details.

## Incentives {#incentives}

The correct operation of the consensus protocol requires the platform's economics to discourage equivocation (signing conflicting consensus messages) for safety and incentivize participation for liveness. Participation consists of on-time block proposals and timely responses to block proposals.

Safety may be incentivized through slashing for equivocation. This feature is currently disabled but may be reactivated in the future.

The network incentivizes participation by issuing [rewards](../design/rewards.md) to validators for proposing blocks and creating and publishing finality signatures. Delegators also receive rewards by [staking](./staking/concepts.md) with a validator. All rewards are added directly to the corresponding bids and delegations.
The network incentivizes participation by issuing [rewards](../design/rewards.md) to validators for proposing blocks and creating and publishing finality signatures. Delegators also receive rewards by [staking](./staking.md) with a validator. All rewards are added directly to the corresponding bids and delegations.

### Validator Participation {#participation}

Expand Down
30 changes: 30 additions & 0 deletions source/docs/casper/concepts/economics/staking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Staking

<!--TODO updates needed once 2.0 rolls out: number of validators, unbonding period, block times. -->

The Casper Mainnet is a Proof-of-Stake blockchain that allows validators to stake the Casper native token CSPR on the network. Validators receive CSPR as an incentive for maintaining and securing the network. CSPR rewards are distributed as blocks are validated into existence and organized into eras.

**Consensus mechanism:** The Casper Mainnet and Testnet use a Proof-of-Stake consensus mechanism called [Zug](../design/zug.md). Another Casper network can choose between Zug and [Highway](../design/highway.md) using the network's chainspec.

**Number of validators:** The Casper Mainnet supports up to 100 validators on the network. This number was chosen to strike a balance between performance and decentralization. This platform parameter can be increased through upgrades as development continues and performance improves. In addition, validators can stake on the Casper Mainnet through permissionless bonding by participating in an auction for the validator slot.

**Permission-less bonding:** For validators to begin staking and earning rewards, they must win a staking auction by competing with current and prospective validators to supply one of the forthcoming top stakes for a given era. This process is permissionless, meaning validators can join and leave the auction without restrictions, except for a waiting period to unlock staked tokens.

**Unbonding:** To detach from the Casper Mainnet, it takes seven eras for both validators and delegators. Neither validators nor delegators receive rewards for the seven eras required for unbonding, as they are not actively contributing to the network's security during that time. However, during the unbonding period, they may receive rewards for participating in past eras. Read about rewards distribution [here](./consensus.md#rewards-distribution-distribution). The current unbonding period on the Casper Mainnet is 14 hours, based on the chainspec settings.

**Eras and block times:** An era on the Casper Mainnet is roughly 2 hours long. Casper's Zug consensus allows validators to propose blocks as quickly as network conditions allow. We anticipate block times to last between 8 seconds and 1 minute.

**Block rewards:** Validators receive [rewards](../design/rewards.md) proportional to their weight for securing the network and participating in consensus by producing blocks and generating and distributing finality signatures. Delegators receive a portion of the validator's rewards, proportional to what they delegated, minus the validator's delegation rate. The rewards earned are reduced if a validator is offline or cannot participate.

**Reward calculations:** Reward calculations depend only on the linear structure of the blockchain and published finality signatures rather than block time or consensus mechanism. Reward calculations assume a known constant token supply inflation with nominal platform operation.

**Reward cycle:** Rewards are [calculated and distributed](./consensus.md#rewards-distribution-distribution) to validators and delegators at the end of an era for all blocks in that era and several eligible blocks from the previous era. The algorithm looks back into blocks from the previous era to compensate for the delay in creating and distributing finality signatures.

**Token supply and inflation:** Mainnet launched with ten billion CSPR at genesis. The target annual supply growth rate is 8%.

<!--TODO We might want to update the numbers. As of Aug '24, these numbers are still correct. I checked with JS.-->
**Annual reward percentage:** Validators on the Casper Mainnet earned between 10% and 20% of their staked CSPR in the first year of the Mainnet operation, with regular participation under expected network conditions. The growth of individual stakes depends on the total active stake, as only a fixed number of tokens is created per era.

**Slashing:** Presently Casper does not slash if a validator equivocates or misbehaves. If a node equivocates, other validators will ignore its messages, and the node will become inactive. The node will terminate once it detects that it has equivocated.

**Delegation rate:** Validators define a delegation rate that they take in exchange for providing staking services. This rate is a percentage of the rewards that the validator retains for their services.
31 changes: 0 additions & 31 deletions source/docs/casper/concepts/economics/staking/concepts.md

This file was deleted.

63 changes: 0 additions & 63 deletions source/docs/casper/concepts/economics/staking/delegation.md

This file was deleted.

Loading

0 comments on commit d888244

Please sign in to comment.