suideveloper
All questions
Sui basics

What is gas on Sui, and how are fees calculated?

October 27, 2026

Gas is the fee, paid in SUI, that every Sui transaction pays for the work it causes. It has two parts. The computation fee is computation units times your gas price. The storage fee is storage units times the storage price. If the transaction deletes or shrinks objects, you get a storage rebate back. So net gas = computation fee + storage fee − storage rebate. As of epoch 1291 (2026-10-25), the mainnet reference gas price is 100 MIST per computation unit and the storage price is 76 MIST per storage unit.

The formula

From the Sui docs:

Text
computation_fee = computation_units × gas_price
storage_fee     = storage_units × storage_price
net_gas_fees    = computation_fee + storage_fee − storage_rebate
  • Computation units are rounded up into coarse buckets: 1,000, 5,000, 10,000, 20,000, 50,000, 200,000, 1,000,000 and 5,000,000. Similar transactions cost the same, and anything above 5,000,000 units aborts. A transaction in the smallest bucket costs 1,000 × 100 = 100,000 MIST (0.0001 SUI) in computation at today's reference price.
  • Storage units scale with the bytes you write. The schedule is 100 storage units per byte, so each new byte costs 100 × 76 = 7,600 MIST at the current storage price.
  • Gas price is what you offer per computation unit. It has to be at least the reference gas price. Anything above that is a tip, which only matters for priority on congested shared objects.

Reference gas price

At the start of each epoch, each validator submits a price, and the protocol picks the price at the 2/3 percentile by stake. That becomes the reference gas price (RGP) for the whole epoch, which keeps fees predictable. You can check it yourself:

Terminal
curl -s https://graphql.mainnet.sui.io/graphql \
  -H 'content-type: application/json' \
  -d '{"query":"{ epoch { epochId referenceGasPrice } }"}'

Or in TypeScript:

TypeScript
import { SuiGrpcClient } from '@mysten/sui/grpc'

const client = new SuiGrpcClient({
  network: 'mainnet',
  baseUrl: 'https://fullnode.mainnet.sui.io:443',
})
const { referenceGasPrice } = await client.getReferenceGasPrice()

The storage price is a protocol parameter (storage_gas_price), changed only by protocol upgrades, not every epoch.

Gas budget

Every transaction sets a gas budget, the most it will pay. Execution succeeds only if gas_budget >= max(computation_fee, total_gas_fees). Before the rebate is applied, the budget has to cover the storage fee too.

  • If the budget can't cover computation, the transaction fails and the whole budget is charged.
  • If it covers computation but not storage, you're charged computation plus the cost of mutating the input objects. Your other changes are rolled back.
  • The minimum budget is base_tx_cost_fixed (1,000) times the gas price. At an RGP of 100 MIST, that's 100,000 MIST. The maximum is the max_tx_gas protocol setting.

The CLI estimates the budget with a dry run if you leave out --gas-budget. You can also ask for one explicitly:

Terminal
sui client call --package 0x2 --module sui --function transfer \
  --args 0xCOIN 0xRECIPIENT --dry-run

The SDK's Transaction builder also sets the budget and price automatically when you don't. See gas budget and dry-run a transaction.

Reading what you paid

Transaction effects include a gas summary with computationCost, storageCost, storageRebate and nonRefundableStorageFee, all in MIST. Explorers show the same fields. You can send a few testnet transactions in the playground and compare their gas lines.

Gotchas

  • All CLI and SDK amounts are in MIST (1 SUI = 10^9 MIST).
  • Creating objects costs much more than reading them, because storage is charged up front. Deleting objects you no longer need earns most of that back (see the storage fund).
  • The docs page lists a 2,000 MIST minimum and a 50 SUI maximum budget. The live mainnet protocol config (version 139) has max_tx_gas = 50,000,000,000,000 MIST (50,000 SUI), and the minimum scales with the gas price as described above. Read the current values from protocolConfigs over GraphQL rather than hard-coding them.

Sources

More on sui basics