Skip to main content

One post tagged with "gas price"

View All Tags

Sui’s Reference Gas Price (RGP) Mechanism

· 8 min read
Dora Noda
Software Engineer

Introduction

Announced for public launch on May 3rd, 2023, after an extensive three-wave testnet, the Sui blockchain introduced an innovative gas pricing system designed to benefit both users and validators. At its heart is the Reference Gas Price (RGP), a network-wide baseline gas fee that validators agree upon at the start of each epoch (approximately 24 hours).

This system aims to create a mutually beneficial ecosystem for SUI token holders, validators, and end-users by providing low, predictable transaction costs while simultaneously rewarding validators for performant and reliable behavior. This report provides a deep dive into how the RGP is determined, the calculations validators perform, its impact on the network economy, its evolution through governance, and how it compares to other blockchain gas models.

The Reference Gas Price (RGP) Mechanism

Sui’s RGP is not a static value but is re-established each epoch through a dynamic, validator-driven process.

  • The Gas Price Survey: At the beginning of each epoch, every validator submits their "reservation price"—the minimum gas price they are willing to accept for processing transactions. The protocol then orders these submissions by stake and sets the RGP for that epoch at the stake-weighted 2/3 percentile. This design ensures that validators representing a supermajority (at least two-thirds) of the total stake are willing to process transactions at this price, guaranteeing a reliable level of service.

  • Update Cadence and Requirements: While the RGP is set each epoch, validators are required to actively manage their quotes. According to official guidance, validators must update their gas price quote at least once a week. Furthermore, if there is a significant change in the value of the SUI token, such as a fluctuation of 20% or more, validators must update their quote immediately to ensure the RGP accurately reflects current market conditions.

  • The Tallying Rule and Reward Distribution: To ensure validators honor the agreed-upon RGP, Sui employs a "tallying rule." Throughout an epoch, validators monitor each other’s performance, tracking whether their peers are promptly processing RGP-priced transactions. This monitoring results in a performance score for each validator. At the end of the epoch, these scores are used to calculate a reward multiplier that adjusts each validator's share of the stake rewards.

    • Validators who performed well receive a multiplier of ≥1, boosting their rewards.
    • Validators who stalled, delayed, or failed to process transactions at the RGP receive a multiplier of <1, effectively slashing a portion of their earnings.

This two-part system creates a powerful incentive structure. It discourages validators from quoting an unrealistically low price they can't support, as the financial penalty for underperformance would be severe. Instead, validators are motivated to submit the lowest price they can sustainably and efficiently handle.


Validator Operations: Calculating the Gas Price Quote

From a validator's perspective, setting the RGP quote is a critical operational task that directly impacts profitability. It requires building data pipelines and automation layers to process a number of inputs from both on-chain and off-chain sources. Key inputs include:

  • Gas units executed per epoch
  • Staking rewards and subsidies per epoch
  • Storage fund contributions
  • The market price of the SUI token
  • Operational expenses (hardware, cloud hosting, maintenance)

The goal is to calculate a quote that ensures net rewards are positive. The process involves several key formulas:

  1. Calculate Total Operational Cost: This determines the validator's expenses in fiat currency for a given epoch.

    Costepoch=(Total Gas Units Executedepoch)×(Cost in $ per Gas Unitepoch)\text{Cost}_{\text{epoch}} = (\text{Total Gas Units Executed}_{\text{epoch}}) \times (\text{Cost in \$ per Gas Unit}_{\text{epoch}})
  2. Calculate Total Rewards: This determines the validator's total revenue in fiat currency, sourced from both protocol subsidies and transaction fees.

    $Rewardsepoch=(Total Stake Rewards in SUIepoch)×(SUI Token Price)\text{\$Rewards}_{\text{epoch}} = (\text{Total Stake Rewards in SUI}_{\text{epoch}}) \times (\text{SUI Token Price})

    Where Total Stake Rewards is the sum of any protocol-provided Stake Subsidies and the Gas Fees collected from transactions.

  3. Calculate Net Rewards: This is the ultimate measure of profitability for a validator.

    $Net Rewardsepoch=$Rewardsepoch$Costepoch\text{\$Net Rewards}_{\text{epoch}} = \text{\$Rewards}_{\text{epoch}} - \text{\$Cost}_{\text{epoch}}

    By modeling their expected costs and rewards at different RGP levels, validators can determine an optimal quote to submit to the Gas Price Survey.

Upon mainnet launch, Sui set the initial RGP to a fixed 1,000 MIST (1 SUI = 10⁹ MIST) for the first one to two weeks. This provided a stable operating period for validators to gather sufficient network activity data and establish their calculation processes before the dynamic survey mechanism took full effect.


Impact on the Sui Ecosystem

The RGP mechanism profoundly shapes the economics and user experience of the entire network.

  • For Users: Predictable and Stable Fees: The RGP acts as a credible anchor for users. The gas fee for a transaction follows a simple formula: User Gas Price = RGP + Tip. In normal conditions, no tip is needed. During network congestion, users can add a tip to gain priority, creating a fee market without altering the stable base price within the epoch. This model provides significantly more fee stability than systems where the base fee changes with every block.

  • For Validators: A Race to Efficiency: The system fosters healthy competition. Validators are incentivized to lower their operating costs (through hardware and software optimization) to be able to quote a lower RGP profitably. This "race to efficiency" benefits the entire network by driving down transaction costs. The mechanism also pushes validators toward balanced profit margins; quoting too high risks being priced out of the RGP calculation, while quoting too low leads to operational losses and performance penalties.

  • For the Network: Decentralization and Sustainability: The RGP mechanism helps secure the network's long-term health. The "threat of entry" from new, more efficient validators prevents existing validators from colluding to keep prices high. Furthermore, by adjusting their quotes based on the SUI token's market price, validators collectively ensure their operations remain sustainable in real-world terms, insulating the network's fee economy from token price volatility.


Governance and System Evolution: SIP-45

Sui's gas mechanism is not static and evolves through governance. A prominent example is SIP-45 (Prioritized Transaction Submission), which was proposed to refine fee-based prioritization.

  • Issue Addressed: Analysis showed that simply paying a high gas price did not always guarantee faster transaction inclusion.
  • Proposed Changes: The proposal included increasing the maximum allowable gas price and introducing an "amplified broadcast" for transactions paying significantly above the RGP (e.g., ≥5x RGP), ensuring they are rapidly disseminated across the network for priority inclusion.

This demonstrates a commitment to iterating on the gas model based on empirical data to improve its effectiveness.


Comparison with Other Blockchain Gas Models

Sui's RGP model is unique, especially when contrasted with Ethereum's EIP-1559.

AspectSui (Reference Gas Price)Ethereum (EIP-1559)
Base Fee DeterminationValidator survey each epoch (market-driven).Algorithmic each block (protocol-driven).
Frequency of UpdateOnce per epoch (~24 hours).Every block (~12 seconds).
Fee DestinationAll fees (RGP + tip) go to validators.Base fee is burned; only the tip goes to validators.
Price StabilityHigh. Predictable day-over-day.Medium. Can spike rapidly with demand.
Validator IncentivesCompete on efficiency to set a low, profitable RGP.Maximize tips; no control over the base fee.

Potential Criticisms and Challenges

Despite its innovative design, the RGP mechanism faces potential challenges:

  • Complexity: The system of surveys, tallying rules, and off-chain calculations is intricate and may present a learning curve for new validators.
  • Slow Reaction to Spikes: The RGP is fixed for an epoch and cannot react to sudden, mid-epoch demand surges, which could lead to temporary congestion until users begin adding tips.
  • Potential for Collusion: In theory, validators could collude to set a high RGP. This risk is primarily mitigated by the competitive nature of the permissionless validator set.
  • No Fee Burn: Unlike Ethereum, Sui recycles all gas fees to validators and the storage fund. This rewards network operators but does not create deflationary pressure on the SUI token, a feature some token holders value.

Frequently Asked Questions (FAQ)

Why stake SUI? Staking SUI secures the network and earns rewards. Initially, these rewards are heavily subsidized by the Sui Foundation to compensate for low network activity. These subsidies decrease by 10% every 90 days, with the expectation that rewards from transaction fees will grow to become the primary source of yield. Staked SUI also grants voting rights in on-chain governance.

Can my staked SUI be slashed? Yes. While parameters are still being finalized, "Tally Rule Slashing" applies. A validator who receives a zero performance score from 2/3 of its peers (due to low performance, malicious behavior, etc.) will have its rewards slashed by a to-be-determined amount. Stakers can also miss out on rewards if their chosen validator has downtime or quotes a suboptimal RGP.

Are staking rewards automatically compounded? Yes, staking rewards on Sui are automatically distributed and re-staked (compounded) every epoch. To access rewards, you must explicitly unstake them.

What is the Sui unbonding period? Initially, stakers can unbond their tokens immediately. An unbonding period where tokens are locked for a set time after unstaking is expected to be implemented and will be subject to governance.

Do I maintain custody of my SUI tokens when staking? Yes. When you stake SUI, you delegate your stake but remain in full control of your tokens. You never transfer custody to the validator.