Overview
SVM Gas Sponsorship is Dynamic’s built-in feature that automatically sponsors Solana (SVM) transaction fees for your users. When enabled, Dynamic handles all the complexity of fee sponsorship behind the scenes, allowing your users to transact without needing SOL for gas fees. When enabled, Dynamic automatically replaces the fee payer in Solana transactions with a sponsored account, so your users don’t need SOL for gas.SVM Gas Sponsorship is available exclusively for V3 MPC embedded wallets. It works automatically once enabled - no code changes required.
Prerequisites
- Dynamic SDK initialized (see Installation Guide)
- User authenticated (see Authentication Guide)
- Solana wallet available (see Wallet Creation)
- V3 MPC embedded wallets configured in the dashboard
Enabling SVM Gas Sponsorship
- Go to the Dynamic Dashboard
- Navigate to Settings > Embedded Wallets
- Ensure Solana (SOL) is enabled in your chain configurations
- Toggle on SVM Gas Sponsorship
The SVM Gas Sponsorship toggle only appears when Solana is enabled in your chain configurations and you’re using V3 MPC wallets.
How It Works
Once enabled, gas sponsorship is applied automatically to all transactions from your users’ embedded wallets. Your code remains unchanged:Transaction Flow
When your application sends a transaction:- Transaction Creation: Your app creates a standard Solana transaction
- Automatic Sponsorship: The SDK intercepts the transaction before signing
- Backend Processing: The transaction is sent to Dynamic’s backend
- Sponsorship Processing: Dynamic sponsors the transaction
- Fee Payer Replacement: The transaction’s fee payer is replaced with Dynamic’s sponsored account
- User Signing: The sponsored transaction is returned for the user to sign
- Broadcast: The fully signed transaction is sent to the Solana network
Limitations
Wallet Requirements
- Embedded wallets only: Sponsorship only works with Dynamic’s MPC embedded wallets
- V3 wallets required: Must be using V3 MPC wallet configuration
- Not for external wallets: External wallets (Phantom, Solflare, etc.) are not supported
Transaction Constraints
- Transaction size: Maximum 2KB for the base64-encoded transaction
- Already-signed transactions: Transactions that are already signed will not be sponsored
- Single transaction: Each transaction is sponsored individually (no batching)
Fallback Behavior
If sponsorship fails, the SDK will fall back to using the original transaction, which requires the user to have SOL for gas fees.Checking Sponsorship Status
You can check if gas sponsorship is enabled in your project settings:Error Handling
Best Practices
- Don’t assume sponsorship: Build your UI to handle cases where sponsorship might not be available
- Show transaction status: Provide feedback during the sponsorship and signing process
- Test in Sandbox first: Verify sponsorship works in your Sandbox environment before going live
- Monitor usage: Keep an eye on sponsorship usage in your dashboard
What’s Next
- Solana Connection - RPC setup and configuration
- Send Solana Transactions - Full transaction guide
- Sign Solana Messages - Sign messages with wallets