Sui.

Post

Share your knowledge.

casey.
Aug 15, 2025
Expert Q&A

Sponsored Transaction

On SUI network is it possible to sponsor wallet B with wallet A when B wants to execute a transaction. That is A paying for the gas fees of B transactions.

  • SDKs and Developer Tools
  • Transaction Processing
  • Security Protocols
  • Move
0
2
Share
Comments
.

Answers

2
Tucker.
Aug 16 2025, 08:47

Yes — on the Sui Network, sponsored transactions are possible, and this is one of the key features that differentiates Sui from many other blockchains.

Here’s how it works in practice:

  1. Transaction Structure: A Sui transaction includes the sender (the one executing the action) and a separate gas object that covers fees. These two don’t need to belong to the same wallet.

  2. Sponsored Transaction Flow:

Wallet B builds the transaction with its desired actions (e.g., transfer NFT, call a Move function).

Instead of attaching its own gas object, Wallet B leaves gas payment to be filled.

Wallet A provides a gas object and signs the transaction, essentially “sponsoring” it.

The final transaction is signed by both A (gas payer) and B (action sender), then submitted.

  1. Use Cases:

Onboarding new users who don’t yet have SUI.

dApps covering fees for a smoother UX (“gasless” transactions).

Delegated operations where a service account pays gas for many users.

  1. CLI / SDK Support:

With the Sui SDK or Typescript client, you can construct a transaction block with one signer (B), then add another signature (A) for the gas object.

In the CLI, you can simulate by preparing a transaction with --serialize and then have another account sign it.

  1. Security Considerations:

Wallet A must trust Wallet B not to craft malicious transactions that burn excessive gas.

Typically, the sponsoring wallet uses gas budgets and may filter or whitelist transaction types before signing.

  1. Practical Tip: Many dApps implement a relayer or middleware service: the user signs the intent, the backend attaches gas and re-signs, then broadcasts.

So yes — Wallet A can pay gas for Wallet B’s transaction, but you need to build the transaction with multiple signers and handle it via the SDK or a relayer pattern.

0
Comments
.
acher.
Aug 16 2025, 10:48

Yes, on the Sui network you can sponsor another wallet’s transaction, which means wallet A can pay the gas fees when wallet B wants to execute something. This works through what is called a sponsored transaction, where B signs the transaction data and then A adds the gas object and signs as the payer. The network processes the action on behalf of B but charges the gas cost to A. This is useful if you want users to interact with your app without worrying about having SUI tokens themselves.

Read more: Sponsored Transactions on Sui

# Example flow:
# Step 1: Wallet B creates and signs the transaction (without gas)
sui client tx-transfer-sui <recipient-address> --amount 100 --serialize-output > tx.json

# Step 2: Wallet A attaches gas and sponsors the transaction
sui client sponsor-transaction --tx-file tx.json --gas-budget 5000000 --sponsor-signer <walletA-key>

# Step 3: Submit the combined signed transaction
sui client execute-signed-tx --tx-file sponsored_tx.json
0
Comments
.

Do you know the answer?

Please log in and share it.