SVM Gas Sponsorship is an enterprise-only feature. Contact us to learn more about upgrading your plan.
SVM Gas Sponsorship works only with V3 MPC embedded wallets (the wallets Dynamic creates for your users). It does not work with external wallets like Phantom.
Quick start
1
Turn on gas sponsorship in the dashboard
- Go to the Dynamic Dashboard
- Navigate to Settings → Embedded Wallets
- Make sure Solana (SOL) is enabled in your chain configurations
- Toggle on SVM Gas Sponsorship
2
Send a transaction as usual
Once sponsorship is on, the
signAndSendTransaction you already use sponsors embedded-wallet transactions automatically. No code changes required.React example
In React, useuseGetWalletAccounts to get the user’s embedded wallet, then call signAndSendSponsoredTransaction from a button handler. The try/catch shows the user a friendly message if sponsorship fails (see Error handling).
Error handling
When you require sponsorship withsignAndSendSponsoredTransaction and it can’t go through, it throws a SponsorTransactionError. Wrap the call in a try/catch so you can show the user a message and decide what to do next.
SponsorTransactionError is thrown when:
- The sponsorship API cannot sponsor the transaction (sponsorship not enabled, or a limit was hit)
- The wallet doesn’t support sponsored transactions (e.g. an external wallet rather than a V3 MPC embedded wallet)
Advanced usage
Everything below is optional. Reach for it only when you need more control than the quick start gives you.How it works under the hood
When a transaction is sponsored, the SDK:- Sends the transaction to Dynamic’s backend for sponsorship
- Replaces the fee payer with Dynamic’s sponsored account
- Signs the sponsored transaction with the user’s wallet
- Broadcasts to the network with
skipPreflight: trueby default
Automatic vs. required sponsorship
There are two ways to send a sponsored transaction, and the difference matters when sponsorship might not be available:
Use
signAndSendSponsoredTransaction whenever a failed sponsorship should stop the transaction — for example when the user has no SOL to fall back on.
Opting out per call
PasssponsorshipMode: 'off' to skip sponsorship for a specific transaction even when the project setting is on:
Send options
You can passSendOptions to override defaults. Sponsored transactions use skipPreflight: true by default, but you can override this: