Sponsored Transactions (Fee Bump Tx)
⏱️ 4 min read
Introduction
Why Are Sponsored Transactions Needed?
Smart Accounts and Transaction Fees
The Fee-Bump Solution
┌──────────────────────────────────────┐
│ Fee-Bump Transaction (outer) │
│ Fee Source: Sponsor (G...) │
│ │
│ ┌──────────────────────────────┐ │
│ │ Inner Transaction │ │
│ │ Source: Native account (G..)│ │
│ │ Caller/From: C... or G... │ │
│ │ Operations: deposit/ │ │
│ │ withdraw, etc. │ │
│ │ Signed by: Caller │ │
│ └──────────────────────────────┘ │
│ │
│ Signed by: Sponsor │
└──────────────────────────────────────┘Prerequisites
Environment Configuration
Deposit with Fee Bump
Step 1: Initialize API Client and Keypairs
Step 2: Get Unsigned Deposit Transaction
Step 3: Sign Inner Transaction with Caller
Step 4: Create and Sign Fee-Bump with Sponsor
Step 5: Submit the Transaction
Withdraw with Fee Bump
Step 1: Get Vault Balance
Step 2: Get Unsigned Withdrawal Transaction
Step 3: Sign, Wrap, and Submit
Fee Considerations
Common Issues
Issue
Cause
Solution
Production Notes
Complete Example Repository
Additional Resources
Last updated