Why use sponsorship
Both Classic and Smart wallets on the Stellar Network require XLM to be created and used, primarily to cover fees and reserve requirements.
- Classic wallets must maintain a minimum base reserve of XLM to exist on the ledger.
- Smart wallets (e.g., contract-based
C
accounts) don’t require a base reserve, but they incur fees for contract deployment, ledger writes, and interactions.
In both cases, wallets need to pay fees for operations such as transfers, contract calls, or trustline management.
The Onboarding Challenge
If users are responsible for covering these costs, onboarding requires them to either acquire XLM or receive it from an external source, adding friction and complexity to users. To streamline the user experience, applications often aim to abstract this away so users don’t need to understand or even be aware of XLM.
Why Direct Funding Isn't Safe
One option is to send XLM directly to a user’s wallet to cover creation and usage costs. However, this approach is vulnerable to abuse: malicious users could automate wallet creation and drain funds by creating multiple accounts.
Sponsorship Mechanisms
Stellar provides native fee and reserve sponsorship for Classic wallets, enabling applications to cover costs securely:
- Fee Sponsorship lets an application pay transaction fees on behalf of the user.
- Reserve Sponsorship lets an app lock the required XLM for account or trustline creation, without transferring it to the user.
This model avoids giving users direct control over XLM and protects the application from misuse, while enabling a seamless onboarding flow.
On the other hand, Smart wallets don't require a base reserve, but they incur fees for contract deployment, ledger writes, and interactions. Tools like Launchtube can be used to make this process easier.