Suinetwork: Sui gas fees for computation and storage

Updated:

On the Sui blockchain, transaction gas is paid in SUI and covers computation and onchain storage. Deleting onchain data can return part of its original storage fee.

What makes up the gas charge

Table: What makes up the gas charge
Parameter Treatment Applicable condition
Gas denomination SUI Sui uses its native token to pay transaction gas.
Computation charge Pays for transaction processing Computation and storage are separate gas components.
Storage charge Fees for data added onchain contribute to the storage fund The fund supports the cost of retaining data over time.
Reference gas price Two-thirds quantile of validator price quotes, weighted by stake The protocol sets the reference price at the start of each epoch.
Gas budget User-set cap on gas fees Execution fails if the budget can't cover computation fees or net gas fees after rebates.
Storage rebate Partial refund of the original storage fee Data deletion can produce a rebate; the non-refundable balance stays in the storage fund.

Computation and the epoch reference price

Validators quote the minimum gas price at which they're willing to process transactions. The protocol uses a survey of those quotes to set the reference gas price for an epoch. On Mainnet and Testnet, an epoch lasts about 24 hours.

Computation fees equal computation units multiplied by the transaction's gas price, which must be at least the epoch's reference price. The complete gas charge also depends on storage costs and any applicable storage rebate, so the reference price alone doesn't specify a transaction's total fee.

Storage funding and the deletion rebate

The storage fund connects fees paid when data is added with the cost of keeping that data available to future validators. Its SUI counts toward the total stake used to calculate rewards. Most rewards attributed to the fund compensate validators for storage, and the remainder are reinvested. The protocol doesn't distribute the fund's principal to validators.

Deleting onchain data can trigger a partial refund of the storage fees paid originally. The non-refundable balance remains in the fund and isn't returned on deletion. The rebate concerns storage; computation remains a separate part of the transaction's gas cost.

Suinetwork - What makes up the gas charge - diagram

Open full-size image

Gas charges when execution aborts

Before proposing a transaction, the receiving validator checks the signature, confirms that the inputs exist and the sender may use them, and validates the gas budget.

Visual summary: Suinetwork: Gas charges when execution aborts

Open full-size image

Execution can still abort because of an explicit abort instruction, a runtime error such as division by zero, or an insufficient transaction gas budget. In that case, Sui charges gas without committing application changes; any automatic merging of gas coins still takes effect.