6 min read

The Sui Network: A Validator’s Perspective

Surfing the Sui Wave

Cover Image

Published on

28 May, 2023

The Sui network has taken several initiatives toward realising its vision of widespread digital asset ownership. Its horizontal scalability, instant finality, and low fees make it possible to build dynamic on-chain assets, which in turn attracts many users. The Sui whitepaper, while complete in its commentary on the network’s underlying concepts, can be laborious to navigate. By means of this article, we intend to cater to the requirements of validators on the Sui network. We seek to assist them in comprehending the intricate mathematics used for gas fee and reward calculations. Our goal is to provide a succinct guide for Sui validators to better understand the operations of the Sui network.

I. Sui Economy

The Sui economy has 3 entities interacting with each other. These are:

  1. The user. Users submit transactions to the Sui platform in order to create, mutate, and transfer digital assets.
  2. The owners. This is anyone who owns the native digital asset, called Sui. They have the option to delegate their holding to validators and take part in the governance of the network. The ones who delegate are called delegators.
  3. The validator. They process the transactions submitted by users.

This economy itself has 4 components:

  1. The SUI token. The network’s native asset.
  2. The gas fees. This is charged for every operation on the network.
  3. The proof-of-stake mechanism. The consensus mechanism for processing transactions and creating new blocks in the network.
  4. On-chain governance. System for upgrading the network operated by stakeholder voting.

II. Elementary Definitions

2_QFapn_zMEON4-LaG-WqlhA.webp

The total supply of SUI upper-bounded in the following sense: 3_P0hCf5YO8YYKK4YGrPIoYw.webp

4_iyEyYlkKCKoS5P_rhHrJBQ.webp

The amount of stake of the validator determines their share of voting power to process transactions. The total delegated stake is given by

5_u0kd3Msd8NAyIZZj-l_wFg.webp

6_mKTbcJkJGDlxwgBPG44Eiw.webp

Any owner of SUI is allowed to delegate part or whole of their holdings to validators. This delegation cannot be changed mid epoch.

III. Gas fees

The fees given by the user when transaction τ occurs is 7_cmg3XJQZ8gOQQrvOu1AzZw.webp

where, ComputationUnitsₑ[τ] and StorageUnitsₑ[τ] measure the amount of computation resources and storage resources respectively. The price of each unit of computation and storage is Pᶜₑ[τ] and Pˢₑ. Note that the price for each transaction is different, hence the τ dependence of Pᶜₑ. The storage price is constant for every epoch.

8_oRlRMWzFwPh5wAY2OD8CfA.webp

IV. Storage Fund

Basically, things are stored on the network and some fees is paid for that by the users. That amount is collected in the storage fund. The storage fund at the beginning of epoch e + 1 is given by:

9_s-DLqlgvxO97CTy4qCYR7A.webp

V. Stake Rewards and Distribution in the Network

Three things happen in the beginning of an epoch

  1. The delegators delegate their SUI to validators.
  2. The reference gas price is evaluated based on 2/3 median rule.
  3. The parameter αₑ , defined as:

10_97WcFNPGC4yF3cV74poqlQ.webp

is set.

Thus, the total stake can be divided into two parts the storage fund (having (1 − αₑ) fraction) and the delegated stake (having αₑ fraction). Now the total stake rewards at the end of an epoch are defined to be:

11_hZ0LmdH0Bmkgn28BN3mCWg.webp

We are only in control of the first term of this, and this will forget about the second part (since increase in total SUI flow is random, and based on network requirements). Thus we can approximately write:

12_w1pyUOntucWVw6wPYZcE1Q.webp Suppose that the validators enter an agreement with their delegators at a commission rate of δₑ . Then the fraction of stake rewards to the delegators is:

13_uSUxoHdbT1Wwd7YHZXRzXg.webp

The validator earns a fraction from the delegated amount, but also γ fraction of the storage fund is rewarded to them. Thus

14_-UqStJzFPNS3Y5kGHIzLhg.webp

The rest of the storage fund is reinvested:

15_Cw7jmnRVC4whz3evKc4L3w.webp

VI. Stake Subsidies

Another source of validator rewards are stake subsidies. For the mainnet, 1 billion SUI are allocated for stake subsidies. These are distributed in a geometric series. For the first 90 epochs, 1,111,111 SUI will be given as stake subsidies per epoch. For the next 90 epochs, this reduces to 1,000,000 SUI per epoch. This is a geometric progression with the common ratio = 0.9. The total adds up to a billion SUI*. In every epoch the stake subsidies are distributed among the validators by their stake distribution. Denote the stake subsidies in epoch e by Subₑ.

*If you just calculate it with a₀ = 1,111,111 and r = 0.9 the total actually just adds up to 999,999,900 SUI. But the series is not truly geometric, we are adding a small amount in every step. This amount eventually adds upto the missing 100 dollars.

VII. How is the validator rewards divided among validators?

During the epoch every validator can monitor the operations of other validators. Thus each validator can evaluate the performance of others. Validators collectively set a constant µˆₑ(v) for each validator v ∈ Vₑ. If the validator has a good performance µₑ(v) ≥ 1 otherwise, µₑ(v) < 1.

The total stake rewards are divided among validators in the following way: the rewards gained by validator v from the delegated amount will be σₑ(v)µₑ(v)δₑ(v)αₑ × Stake Rewards, while the storage fund rewards are distributed equally among all validators. So the rewards would be given by:

16_gqI_pW8qUhP8KUrHuZM3Rw.webp

Similarly, the delegators of the validator v have the reward:

17_QzWvp-3dY7wGBkh4Qx_baw.webp

and, it is further divided to each delegator based on their share of the validator’s stake.

VIII. How do we calculate our rewards practically?

First, let’s recall the elaborated formula for reward our particular validator will get:

18_by1yW9jX5Lv11JialiVsJw.webp But, we ourselves might have some stake on our validator. So, some of delegator rewards are also ours. Suppose that β of our stake is owned by us. Then we also get the following rewards:

19_Uzw-LIx3Gu5f7jnSQrwYkw.webp Thus the total reward for the validator (including stake subsidies) actually is:

20_m3aHPPjQ3tnViPDUJkk9-w.webp The rewards in dollars can be obtained by multiplying this with the SUI price P $ S . Suppose the cost for maintaining and running a validator in epoch e is Ce(v) (in dollars). Under the assumption that the validator’s performance is optimal and hence µe(v) ≥ 1, profit has a lower bound.

21_MHqWDZ64CIdWJj49CkxEng.webp

IX. How to set the Gas Price?

Let’s say that a validator wants to gain a minimum profit of P₀ every epoch. The information required for calculating the constants αₑ , σₑ(v) and β is available to the validators through the Sui JSON-RPC calls. The problem can be formulated as follows:

22_9zU5f0xMuKyJ3XViZqv7jg.webp Notice that the only two unknowns in the problem are the SUI token price P $ S during epoch e and the total computation units in that epoch. Developing prediction models for these two is the key part of solving this problem. Once there exists a reliable method for predicting these, calculating pₑ(v) is as simple as running a loop for pₑ(v) until the Profitₑ(v) ≥ P₀.

It is imperative that every validator on the Sui network understands the operations and underlying mechanisms of the network. With this blog, we intend to provide a comprehensive coverage of these ideas. After several triumphant Waves of testing, the Sui network is now making strides with the launch of its Mainnet earlier this month.

If you hold the SUI token, you can enhance your portfolio by staking to earn rewards. Leverage Luganodes' institutional-grade infrastructure to stake your holdings and create a passive income. Staking with us ensures ease of use, support, and safety while you earn, and also contribute to the security of the Sui chain.

Learn how to stake SUI tokens using this guide. You can learn more about staking on our website, and feel free to contact us for any queries!

About Luganodes

Luganodes is a world-class, Swiss-operated, non-custodial blockchain infrastructure provider that has rapidly gained recognition in the industry for offering institutional-grade services. It was born out of the Lugano Plan B Program, an initiative driven by Tether and the City of Lugano. Luganodes maintains an exceptional 99.9% uptime with round-the-clock monitoring by SRE experts. With support for 40+ PoS networks, it ranks among the top validators on Polygon, Polkadot, Sui, and Tron. Luganodes prioritizes security and compliance, holding the distinction of being one of the first staking providers to adhere to all SOC 2 Type II, GDPR, and ISO 27001 standards as well as offering Chainproof insurance to institutional clients.

Line pattern
© 2024 Luganodes | All rights reserved