Sui.

Post

Share your knowledge.

lite.vue.
Aug 26, 2025
Expert Q&A

How Do I Optimize Gas on Sui Transactions?

How Do I Optimize Gas on Sui Transactions?

  • Sui
  • Architecture
  • SDKs and Developer Tools
  • NFT Ecosystem
0
7
Share
Comments
.

Answers

7
dhaholar.
Aug 26 2025, 22:33

You optimize gas on Sui by keeping your transactions lightweight and avoiding unnecessary storage. Since Sui charges separately for computation and storage, you reduce costs by minimizing the number of objects you create or modify. You also benefit from batching multiple actions into one transaction when possible, which spreads the gas cost across operations. Submitting your transaction with a gas price close to the network’s reference price helps you avoid overpaying while still getting timely execution. Validators update this reference price each epoch, so staying informed helps you make smarter choices.

1
Comments
.
obito.
Sep 3 2025, 09:03

Think of gas on Sui like friction—most of it comes from storage and shared-object contention. To keep it smooth:

  • Favor owned objects. Mutating your own object is way cheaper than touching shared state.
  • Keep objects lean. Store links/hashes off-chain; don’t bloat structs with large vectors or strings.
  • Batch smartly. Do multiple updates in one transaction block instead of spamming many small ones.
  • Recycle storage. Delete or merge objects you no longer need—you actually get a storage rebate.
  • Avoid hotspots. Design dApps so global/shared objects aren’t hit every time; shard them or push logic to owned children.
  • Use &T not &mut T when you can. Reads are cheaper than writes, and it signals the runtime you don’t need locks.
  • Audit your gas. Run sui client dev-inspect and load tests; measure costs instead of guessing.

The trick is to design with parallelism and storage in mind—gas savings fall out naturally.

1
Comments
.
Opiiii.
Opiiii1029
Aug 26 2025, 22:35

hsggfbkfbdfvydenl cvgfsvsvdusdhsbdcfvdjcgddcbjlcd dkvdicgdjfcd dkkhvdicecedkhcdcjmd

0
Comments
.
tolexwills47.
Oct 2 2025, 23:06

You optimize gas on Sui transactions by minimizing how often you touch shared objects, since they require consensus and cost more than owned objects. Try to design your dApp so most actions use owned or immutable objects, which can be processed in parallel and keep fees low. You should also batch multiple operations into a single transaction block where possible, instead of sending many small ones. Reducing unnecessary data storage helps too, because storage fees make up part of gas costs. Finally, monitoring gas prices and submitting transactions during lower demand periods can save extra costs

0
Comments
.

Do you know the answer?

Please log in and share it.