A Comprehensive Guide Of Sui's Gas-Pricing Mechanism

A Comprehensive Guide Of Sui's Gas-Pricing Mechanism
A Comprehensive Guide Of Sui's Gas-Pricing Mechanism

Discover how Sui's gas-pricing mechanism promotes fair competition and benefits users with low, predictable transaction fees.

Sui's gas-pricing mechanism is designed to provide users with low, predictable transaction fees while incentivizing validators to optimize their transaction processing operations and preventing denial of service attacks. In this article, we'll explore how this mechanism works and how it benefits users and validators.

Gas Fees for Computation and Storage

A unique feature of Sui's gas price mechanism is that users pay separate fees for transaction execution and for storing the data associated with each transaction. The gas fees associated with an arbitrary transaction are determined by two functions - the computation gas function and the storage gas function. These functions measure the amount of computation and storage resources, respectively, required to process and store the data associated with a transaction.

Computation Gas Prices

The computation gas price captures the cost of one unit of computation in SUI units. The transaction level sets this price, which the user then submits as the transaction's gas price. The gas price is designed to reward good validator behavior and incentivize them to process transactions promptly. Users can use this network-wide reference price as a reliable anchor when submitting their transactions because validators agree on it at the beginning of each epoch. When a user submits a gas price above the reference price, the difference can be thought of as a tip paid to the network to get higher priority.

Gas Price Survey, Tallying Rule, and Incentivized Stake Reward Distribution Rule

Sui's gas price mechanism is intended to make the reference price a credible anchor for users to use when submitting transactions to the network. This is accomplished through three main steps:

Gas Price Survey

At the beginning of each epoch, each validator responds to a survey and provides their reservation fee. The protocol chooses the 2/3 percentile by stake as the reference price, which is a price under which a quorum of validators are willing to promptly process transactions.

Tallying Rule

In a blockchain network, validators get information about the work done by other validators during a specific time period called epoch. They use this information to evaluate the performance of other validators. Each validator creates a multiplier that impacts the rewards of other validators. If a validator performs well, they get higher rewards, but if they don't, their rewards decrease. The Tallying Rule's aim is to encourage validators to follow the reference gas price by creating a system that's enforced by the community.

Incentivized Stake Reward Distribution Rule

When an epoch ends in a blockchain network, the Tallying Rule provides information to adjust the distribution of stake rewards among validators. Validators who did well will receive their usual stake rewards, but those who didn't operate efficiently at the reference gas price will get fewer rewards. Since the amount of stake owned affects rewards, validators are motivated to get more stake by lowering gas fees, which makes it harder for inefficient validators to compete. This is good for users because the stake reward distribution system motivates validators to deliver a more cost-effective network.

Storage Gas Prices

In a blockchain network, the storage gas price is the amount charged for storing data permanently in SUI units. It's set by governance proposals and isn't updated frequently. The idea is to make sure users pay for on-chain data storage by depositing these fees into a storage fund. The fees are then given to future validators.

Gas Prices as a Coordination Mechanism

Sui's gas-pricing mechanism encourages a healthy competition for fair prices. Users submitting transactions with computation gas prices at or close to the current epoch's reference price and storage gas prices at the targeted price face good user experience. This mechanism benefits users by providing low, predictable transaction fees and incentivizes validators to optimize their infrastructure and reduce transaction times. In addition, Sui's gas-pricing mechanism also helps to prevent network congestion by adjusting gas prices dynamically based on network demand.

Wrapping Up

Overall, Sui's gas-pricing mechanism is a well-designed system that balances the needs of both users and validators. By providing fair and predictable gas prices, it encourages healthy competition and incentivizes validators to optimize their infrastructure. Additionally, its dynamic adjustment mechanism helps to prevent network congestion and ensures the smooth operation of the blockchain.

Besides Sui gas-pricing mechanism, you can also read more about Sui Tokenomics and MIST to understand the basics of Sui Blockchain.

Be sure to check out Suipiens website and social media channels to stay up-to-date on all things about Sui Blockchain!

Official links about Suipiens: Website | Twitter | Discord