Sponsor Smart Wallets
Smart Wallets use a different structure from Classic Wallets, which also makes the sponsorship process different.
- Classic Wallets must hold a reserve of XLM based on account usage (e.g. account creation, adding trustlines). They also pay a small Inclusion Fee per transaction.
- Smart Wallets are contracts. They do not require reserves, but they pay both an Inclusion Fee and a Resource Fee. The Resource Fee is calculated based on the resource consumption declared in the transaction, including storage, computation, and bandwidth.
📖 Learn more about Fees, Resource Limits, and Metering
📖 Learn more about Persisting Data in Smart Contracts
📖 Learn more about State Archival
Sponsor a Smart Wallet​
To improve UX, these fees can be covered by a sponsoring account, so users don't need to hold XLM. This makes onboarding into smart wallets seamless.
Sponsoring With the Wallet Backend​
The stellar/wallet-backend project provides server-side tooling to make user onboarding with smart wallets seamless.
Key Features​
- Fee Sponsorship ("Gasless" UX)
Uses fee-bump transactions so a distribution account pays transaction fees. - Channel Accounts
Manages sequence numbers and scales throughput by using pre-funded channel accounts. - API Access
Exposes endpoints for building, signing, and submitting transactions, secured by JWT-based authentication.
Sponsorship Flow​
-
Frontend (Smart Wallet App)
- User signs an operation according to their wallet's contract logic (e.g., passkey, policy signer).
- App sends the signed payload to the backend.
-
Backend (wallet-backend)
- Builds the transaction using a channel account for sequence numbers.
- Wraps it in a fee-bump transaction so the distribution account pays the fee (and any reserve if needed).
- Returns the transaction to the frontend which can then submit it.
-
Result
- User's wallet action succeeds.
- User never needed to hold XLM for fees or reserves.
- Sponsor absorbs costs and can manage them.