Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

This proposal is a work in progress.

Protocol Proposal

The current proof of stake (PoS) contract is a genesis contract written in Rholang. It defines a set of methods that codify how validator incentives will work.

The active set of validators are defined in the "bonds map" of the proof of stake (PoS) contract. The bonds map consists of n up to 100 key-value pairs where the key is the bonded validator a validator's public key and the value is their corresponding stakesstake, denominated in REVs. The bonds map is sorted by the base 16 encoding of the public key of the validator and has a maximum of 100 entries (validators).

Validators can propose blocks at any time they want given that the block contains at least 100 REVs worth of transaction fees and 10,000 gas worth of execution. ADD: describe how the Coop sets and can change these values in the Casper values contract.

Bonding requests are submitted to the network through transactions (deploys). Bonding requests accumulate in a "bonding draw set" in the proof of stake contract. The amount of staking REVs declared in the bonding request is moved from the declared wallet to the proof of stake contract. If multiple bonding requests that request to bond the same validator are submitted, the requested staking amounts of the latter are added to the former. At anytime, bonding requests can be withdrawn and locked up stake will be immediately withdraw-able.

Bonding requests, which are calls to the "bond" method in the PoS contract, are submitted through transactions to the network. Bonding requests insert the validator that initiated the transaction along with their stake into a "draw map" which has the same structure as the bonds map but is unlimited in size. Every 10,000th block, as many requests are stake-weight-randomly selected from the bonding draw set map to fill up the bonds map, but they sit in a "bonding staging set" for 10,000 blocks before actually being added to . If the bonds map . For example, if there are currently 72 bonded validators in the bonds map, 28 bonding requests in the queue will be selectedis currently full, then 10% of the bonds map is swapped out with the draw map using a random seed in the block.

There are no joining fees.

...

Unbonding requests are submitted to the network through transactions (deploys). Unbonding requests accumulate in a "unbonding set" in the proof of stake contract. Every 10,000th block, one validator is stake-weight-randomly selected from the unbonding set. The selected validator is removed from both the bonds map and the rewards map. The sum of the corresponding REV values in both maps are inserted into a "withdrawal map" under the validator's public key. 50,000 blocks after the insertion of an entry into the withdrawal map, validators may withdraw the corresponding number of REVs in the withdrawal map to their own wallets.

Validators can propose non-empty blocks.

Proofs for slashing are submitted to the network through transactions (deploys). If the slashing attempt is valid, the validator's stake in the bonds map is set to 0 and an unbonding request is automatically inserted into the "unbonding set" to eventually remove the slashed validator. The slashed amount of REV is transferred from the proof of stake contract to the cooperative's wallet.

...