Skip to content
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

Update proof-of-stake.md #7663

Merged
merged 1 commit into from
Jan 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 14 additions & 20 deletions doc/src/learn/tokenomics/proof-of-stake.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,40 @@
title: Sui’s Delegated Proof-of-Stake System
---

The Sui platform relies on delegated proof-of-stake to determine the set of validators that process transactions.
The Sui platform relies on delegated proof-of-stake to determine the set of validators who process transactions.

## SUI token delegation

Within each epoch, a fixed set of validators process transactions, each with a specific amount of stake delegated from SUI token holders. A validator's share of the total stake is relevant because it determines each validator’s share of voting power for processing transactions. Delegating SUI implies the SUI tokens are locked for the entire epoch. SUI token holders are free to unstake their SUI or to change their delegate validator when the epoch changes.
Within each epoch, operations are processed by a fixed set of validators, each with a specific amount of stake delegated from SUI token holders. A validator's share of total stake is relevant in that it determines each validator’s share of voting power for processing transactions. Delegating SUI implies the SUI tokens are locked for the entire epoch. SUI token holders are free to unstake their SUI or to change their delegate validator when the epoch changes.

## Economic model

We now discuss how the different components of the Sui economy interact with each other in order to introduce Sui’s delegated proof-of-stake system. As a complementary reference, see the staking and tokenomics diagram in the [Sui Tokenomics](../learn/index.md) overview.
We now discuss how the different components of the Sui economy interact with each other in order to introduce Sui’s delegated proof-of-stake system. As a complementary reference, see the staking and tokenomics diagram in the [Sui Tokenomics](../tokenomics/index.md) overview.

The Sui economic model works as follows:

At the beginning of each epoch, three important things happen:
At the beginning of each epoch: Three important things happen:
* SUI holders delegate (some) of their tokens to validators and a new [committee](../architecture/validators#committees) is formed.
* The reference gas prices are set as described in Sui’s [gas price mechanism](gas-pricing.md)
* The reference gas prices are set as described in Sui’s [gas price mechanism](gas-pricing.md).
* The [storage fund’s](storage-fund.md) size is adjusted using the previous epoch’s net inflow.

Following these actions, the protocol computes the total amount of stake as the sum of delegated stake plus the storage fund. Call the share of delegated stake $\alpha$.

During each epoch, users submit transactions to the Sui platform and validators process them. For each transaction, users pay the associated computation and storage gas fees. In cases where users delete previous transaction data, they obtain a partial rebate of their storage fees. Validators observe the behavior of other validators and evaluate each other’s performance.
During each epoch: Users submit transactions to the Sui platform and validators process them. For each transaction, users pay the associated computation and storage gas fees. In cases where users delete previous transaction data, users obtain a partial rebate of their storage fees. Validators observe the behavior of other validators and evaluate each other’s performance.

At the end of each epoch, the protocol distributes stake rewards to participants of the proof-of-stake mechanism. This occurs through two main steps:
* The total amount of stake rewards is calculated as the sum of computation fees accrued throughout the epoch plus the epoch’s stake reward subsidies. The latter component is optional in that it will disappear in the long run as the amount of SUI in circulation reaches its total supply.
* The total amount of stake rewards is distributed across various entities. Importantly, remember that the storage fund is taken into account in the calculation of the epoch’s total stake. However, the storage fund is not owned by any entities in the way that delegated SUI is. Instead, Sui’s economic model distributes the stake rewards accruing to the storage fund – a share $(1-\alpha)$ of the total stake rewards – to validators in order to compensate them for their storage costs. Of these rewards, a share $\gamma$ is paid out to validators while the remaining $(1-\gamma)$ is used to reinvest in the fund’s capital. Finally, assume that validators charge a commission $\delta\\%$ on SUI token holders as a fee for delegation. The split of stake rewards across participants is given by:
At the end of each epoch: The protocol distributes stake rewards to participants of the proof-of-stake mechanism. This occurs through two main steps:
* The total amount of stake rewards is calculated as the sum of computation fees accrued throughout the epoch plus the epoch’s stake reward subsidies. The latter component is temporary in that it will only exist in the network's first years and disappear in the long run as the amount of SUI in circulation reaches its total supply.
* The total amount of stake rewards is distributed across various entities. Importantly, remember that the storage fund is taken into account in the calculation of the epoch’s total stake. However, the storage fund is not owned by any entities in the way that delegated SUI is. Instead, Sui’s economic model distributes the stake rewards accruing to the storage fund – a share $(1-\alpha)$ of the total stake rewards – to validators in order to compensate them for their storage costs. Of these rewards, a share $\gamma$ is paid out to validators while the remaining $(1-\gamma)$ is used to reinvest in the fund’s capital. Finally, let $\beta_v$ represent the share of stake managed by a validator $v$ that is owned by itself while $(1-\beta_v)$ represents the share owned by third-party delegators. Validators keep the full rewards accruing to their own stake but keep only a commission $\delta_v\\%$ on delegated SUI tokens as a fee for managing that stake. The split of stake rewards for the delegator pool staking at validator $v$ and for the validator itself equal:

$$ DelegatorRewards \ = \ ( 1 - \delta ) \ \times \ \alpha \ \times \ StakeRewards $$
$$ DelegatorRewards_v \ = \Big[ \alpha(1-\delta_v)(1-\beta_v)\Big]\mu_v\sigma_v \times StakeRewards $$

$$ ValidatorRewards \ = \ ( \ \delta\alpha \ + \ \gamma (1 - \alpha) \ ) \ \times \ StakeRewards $$
$$ ValidatorRewards_v \ = \ \Bigg[\alpha\Big(\beta_v+\delta_v(1-\beta_v)\Big)\mu_v\sigma_v+(1-\alpha)\frac{\gamma}{N}\Bigg] \times StakeRewards $$

$$ Reinvestment \ = \ ( 1 - \gamma ) \ \times \ ( 1 - \alpha ) \ \times \ StakeRewards $$
The $\mu_v$ variable captures the output of the [tallying rule](gas-pricing.md#tallying-rule) computed as part of the [gas price mechanism](gas-pricing.md) and corresponds to $\mu_v\geq1$ for performant validators and $\mu_v<1$ for non-performant validators. This variable ensures that validators have "skin in the game" and are incentivized to operate Sui efficiently. The $\sigma_v$ parameter captures each validator's share of total stake.

## Stake reward distribution
Consequently, validators with more stake earn more stake rewards and the joint $\mu_v\sigma_v$ term incentivizes validators to increase their share of stake while also operating the network performantly. In the long-run, this incentive encourages delegators to shift the stake distribution towards the network's most efficient validators, delivering a cost-efficient and decentralized network.

Sui’s gas pricing mechanism together with its delegated proof-of-stake mechanism jointly deliver an efficient economic model whereby validators are encouraged to operate smoothly with low but sustainable gas fees. A specific validator $v$ receives stake rewards equal to:

$$ ValidatorRewards(v) \ = \ RewardShare(v) \ \times \ ValidatorRewards $$

Where the $RewardShare(v)$ is determined in the [gas price mechanism](gas-pricing.md). Note that SUI token holders receive the same share of stake rewards as their delegate validator. Specifically, SUI token holders delegating at a validator $v$ obtain rewards equal to:

$$ DelegatorRewards(v) \ = \ RewardShare(v) \ \times \ DelegatorRewards $$
Finally, note that the storage fund rewards accrue to all $N$ validators equally (since all validators face a similar burden of holding data in storage). The small amount of stake rewards that is not distributed out to either delegators or validators, namely the share $(1-\alpha)(1-\gamma)$ of stake rewards, gets reinvested in the storage fund.

On net, this design encourages validators to operate with low gas price quotes – but not too low or else they receive slashed stake rewards. Consequently, Sui’s gas price mechanism and delegated proof-of-stake system encourages a healthy competition for fair prices where validators set low gas fees while operating with viable business models.

Expand Down