Staking Economy

This article tells about how staking economy works on Sui and how staking rewards are calculated.

Staking on Sui

Sui is a proof-of-stake protocol, meaning validators' chances of winning block production are associated with a higher stake. Each Sui validator maintains its own staking pool, which consists of the validator's stake and the number of delegations hoping to get staking rewards paid at the end of each epoch (which is roughly 24 hours). The voting power of a validator in the Sui Network is determined by the amount of stake delegated to it by Sui accounts.

The sui staking economy ensures a fair, decentralized, and predictable staking experience. The idea is straightforward: a validator earns as much as the effort it has used for transaction processing (gas fees), making the staking system on Sui meritocratic.

Exchange Rate

Validator pools operate with a time series of exchange rates that are updated at the beginning of each epoch. These rates determine the amount of SUI coins that each staker can withdraw in the future. The exchange rates increase as rewards accrue in a staking pool.

When SUI coins are deposited to the staking pool, they get converted into liquidity tokens at the exchange rate of the current epoch. As rewards accrue, the exchange rate appreciates. Conversely, the exchange rate depreciates as rewards are claimed or the staking amount gets withdrawn. At the next epoch, those liquidity tokens will be worth more and translate into more Sui. These liquidity tokens aren't convertible or transferable; ,instead they're an abstract measure of stake. Because all SUI coins in the staking pool are treated the same, whether they were initially deposited as a stake or accrued as stake rewards, they all count as a stake.

🚧

All calculations below are exemplary. The data used is not real!

The exchange rate is calculated as specified in the formula below:

📘

Exchange Rate

ERi+1 = 1+(TPSRi/TPSi)*ERi,

where

ERi+1 - exchange rate in the next epoch,
TPSRi - third-party staking rewards in the current epoch,
TPSi - third-party stake in the current epoch,
ERi - exchange rate in the current epoch.

The distinction between third-party-owned and validator-owned rewards and stakes is relevant in that validators earn commissions on the staking pool's tokens, but third-party stakers do not.

Below is a sample calculation of the exchange rate:

📘

Exchange Rate Calculation Sample*

TPSRi = 125,000 SUI,
TPSi = 25,000,000 SUI,
ERi = 1.05

ERi+1 = 1+(125,000/25,000,000)*1.05 = 1.00525

Reward Calculation and Payment

Staking rewards are paid in two steps:

  1. The total amount of staking 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 because 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 (10 billion).
  2. The total amount of stake rewards is distributed across various entities. Importantly, remember that the storage fund is considered whenccalculatingoch total stake.

Net Staking Rewards

The net staking rewards won by all validators at an epoch - accrue from two sources: stake subsidies defined automatically by the Protocol, and the actual gas fees charged for transaction execution, as specified in the formula below.

📘

Net Staking Rewards

NSR = SS+(GU*RGP),

where

NSR - Net Staking Rewards,
SS - Stake Subsidies,
GU - Gas Unites executed by all validators at an epoch,
RGS - Reference Gas Price.

Let's look at an example of calculating the Net Staking Rewards at an epoch.

📘

Net Staking Rewards Calculation Sample

SS = 688,500,000 SUI,
GU = 850,000,000,000
RGS = 750 MIST

NSR = 688,500,000 SUI+(850,000,000,000*750) = 688,500,000 SUI+63750000000000 MIST = 688,500,000 SUI + 68,850,000 SUI = 757,350,000 SUI

Validator Reward

The rewards won by each validator are calculated based on the share of its stake in the total stake on the Sui Network, its commission, the tallying score obtained according to the tallying rule, and the storage fund rebate amount. The formula to calculate validator rewards is specified below:

📘

Validator Reward

VR = S(VS+VC_(1-VS))_TV_VS+(1-S)_SRec/V*SR,

where

VR - Validator reward,
S- Validator's share in the validator pool,
VS - Validator's share in the total stake on Sui,
VC - Validator commission for staking services,
TV - Tallying value determined by the tallying rule (validators that set gas price quotes exceeding the reference gas price in the current epoch get slashed rewards),
SRec- Storage Recapitalization amount paid to validators,
V- the number of validators in the validator set,
NSR- Net Staking Rewards in the last complete epoch.

Let's see how the validator reward is calculated on a sample below:

📘

Validator Reward Calculation Sample

S = 9%,
VS = 2%,
VC = 3%,
TV = 1,
SRec = 1200 SUI,
V = 104,
NSR = 757,350,000 SUI

VR = 0.09((0.02+0.03(1-0.02))1_0.02(1-0.09)_270,000/104_757,350,000 = (0.02+0.0294)_1_0.0182_2596.15385_757,350,000 = 0.0494_1_0.0182_11.5*757,350,000 = 7,83055974 SUI

Delegator Reward

The rewards withdrawn from the validator's rewards pool are calculated automatically based on the activation epoch and unstaking epoch of the stake as specified in the formulas below:

📘

Delegator Reward

DR = (DS(1-VC)(1-VS))_TV_VC*NSR,

where

DR - Delegator reward,
DS - Delegator's share in the validator pool,
VC - Validator commission for staking services,
VS - Validator's share in the total stake on Sui,
TV - Tallying value determained by the tallying rule (validators that set gas price quotes exceeding the reference gas price in the current epoch get slashed rewards),
NSR - Net Staking Rewards in the last complete epoch.

Let's see how delegator reward is calculated on a sample below:

📘

Delegator Reward Calculation Sample

DS = 3%,
VC = 4%,
TV = 1,
NSR = 757,350,000 SUI

DR = (0.03(1-0.04)(1-0.03))_1_0.03_757,350,000 SUI = 0.03_0.96_0.97_1_0.03_757,350,000 SUI = 846,293.183 SUI