Monitor Sui Transaction Gas Costs & Network Congestion
This guide shows you how to track gas costs and network congestion on the Sui blockchain. You’ll learn to read gas prices from RPC endpoints, estimate transaction fees before sending, and spot congestion trends using public explorers and CLI tools. No prior blockchain experience is needed, but basic familiarity with command-line interfaces helps.
What You’ll Need
- A Sui wallet (for checking your own transaction history)
- Sui CLI installed (optional but recommended for precise queries)
- Access to a Sui RPC endpoint (public ones like
https://fullnode.mainnet.sui.iowork) - Basic knowledge of using a terminal or command prompt
Step-by-Step
- Check the current gas price via RPC. The simplest way is to query the Sui fullnode’s
suix_getReferenceGasPricemethod. Using curl, run:curl -X POST https://fullnode.mainnet.sui.io -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"suix_getReferenceGasPrice","params":[]}'. The response returns a number in MIST (the smallest Sui unit). Divide by 1,000,000,000 to get SUI. - Find your transaction’s gas cost in a wallet. Open your Sui wallet (e.g., Sui Wallet browser extension). Go to ‘Activity’ or ‘Transactions’, click on a specific transaction, and look for ‘Gas Fee’ or ‘Gas Used’. It shows the total SUI spent on gas. This includes both the computation cost and the storage cost.
- Use Suiscan or Sui Explorer for historical data. Visit suiscan.xyz or suiexplorer.com. On the main page, look for ‘Gas Price’ or ‘Network Load’ indicators. These sites often display average gas prices over time and current congestion levels (e.g., TPS – transactions per second).
- Estimate gas before sending with the CLI. If you have Sui CLI installed, use
sui client tx-block --dry-runbefore executing a transaction. For example:sui client transfer-sui --to --amount 100 --dry-run. The output shows the estimated gas cost and the gas used. This lets you predict fees without spending anything. - Monitor congestion via TPS and epoch metrics. Use the RPC method
suix_getLatestCheckpointSequenceNumberto get the current checkpoint. Then querysuix_getCheckpointwith that number. It returns a timestamp and the number of transactions. By comparing two checkpoints, you can calculate TPS. For example, if checkpoint 1000 has 500 transactions and checkpoint 1001 has 550, and the time difference is 2 seconds, TPS is (550-500)/2 = 25 TPS. Higher TPS often means more congestion. - Track gas price trends over time. Use the RPC method
suix_getReferenceGasPriceperiodically (e.g., every 10 minutes) and log the values. You can write a simple script to do this. Compare with network load. If gas price spikes while TPS rises, congestion is likely the cause. - Check specific transaction details via CLI. To see gas breakdown for a past transaction, run
sui client tx-block --tx. The output includes ‘Gas Used’ (computation and storage separately) and ‘Effective Gas Price’. This helps you understand what you paid for.
Common Mistakes
- Confusing MIST with SUI. Gas prices are often shown in MIST (1 SUI = 1,000,000,000 MIST). Always convert before comparing with wallet balances.
- Ignoring storage fees. Sui charges for storing data on-chain. A transaction that writes a lot of data (e.g., creating an NFT) will have a higher total gas cost than a simple transfer, even if the gas price is the same.
- Assuming gas price is fixed. The reference gas price changes every epoch (about 24 hours). It can increase or decrease based on network demand. Always check the current price before sending.
- Using a public explorer’s ‘average’ without context. Averages can be skewed by large transactions. Look at the median or the range of gas prices in recent blocks.
Tips
- Set a gas budget. In Sui, you specify a ‘gas budget’ when sending a transaction. If the actual gas exceeds the budget, the transaction fails. Set a budget slightly above the estimated cost to avoid failures.
- Batch transactions. If you have multiple transfers, consider using a batch transaction to reduce the total gas cost (one transaction instead of many).
- Use a local RPC for frequent queries. Public RPCs can be rate-limited. Running your own Sui fullnode gives you unlimited access and faster responses.
- Watch for epoch boundaries. Gas price updates at epoch boundaries. If you’re sensitive to cost, time your transactions right after a new epoch if the price drops.
Troubleshooting
RPC call returns an error. Check that the URL is correct and that you’re using POST with proper JSON headers. Some public endpoints may be down; try an alternative like https://sui-rpc.publicnode.com.
CLI shows ‘gas price is too high’ error. This means your gas budget is lower than the minimum required. Increase the budget using the --gas-budget flag (e.g., --gas-budget 10000000 for 0.01 SUI).
Explorer shows different gas cost than your wallet. Wallets may display gas in SUI with rounding, while explorers show exact MIST. Always compare in the same unit.
Transaction fails with ‘InsufficientGas’ error. Your gas budget was too low. Check the estimated gas from a dry-run and resubmit with a higher budget.
Network congestion makes transactions slow. If TPS is high, transactions may take longer to finalize. Wait a few minutes or increase your gas budget to prioritize (though Sui doesn’t have a tip system, higher budgets don’t speed up processing—just ensure you don’t fail).
Frequently Asked Questions
What is the current gas price on Sui?
It varies. As of early 2025, the reference gas price is typically around 750 MIST (0.00000075 SUI) per gas unit, but it changes every epoch. Check the RPC method described above for the live value.
How is gas cost calculated on Sui?
Total gas = (gas used for computation + gas used for storage) × effective gas price. Computation gas covers execution, storage gas covers the data stored on-chain. The effective gas price is the reference price at the time of the transaction.
Why did my transaction cost more than the estimate?
Possible reasons: the network gas price increased between your estimate and execution, or the transaction used more computation than expected (e.g., complex smart contract logic). Always add a buffer to your budget.
Can I reduce gas costs on Sui?
Yes. Use simple transfers (less computation), avoid storing large data, and batch multiple operations into one transaction. Also, monitor gas prices and transact during low-congestion periods.
Does Sui have a gas token like Ethereum’s Gwei?
No, Sui uses SUI for all fees. The smallest unit is MIST, similar to how Gwei is a sub-unit of ETH. One SUI equals 1 billion MIST.
How often does the gas price update?
The reference gas price updates at the start of each epoch, which lasts roughly 24 hours. However, the actual effective price can vary slightly within an epoch based on validator decisions.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.