Why Fee Sponsorship?
Fee sponsorship unlocks critical use cases:- Frictionless onboarding: New users can transact immediately without acquiring gas tokens
- Enterprise adoption: Businesses can absorb transaction costs for customers
- Mobile wallets: Simplify mobile payment flows
- Gasless transactions: End users never see or think about gas
- Flexible business models: Charge fees separately or absorb costs
How Fee Sponsorship Works
In a sponsored transaction:- User signs the transaction with their key (including tx hash)
- Sponsor signs a separate
fee_payer_signaturecommitting to pay gas - Transaction executes with sponsor paying all gas fees
- User’s balance is unaffected by gas costs
Basic Fee Sponsorship
Here’s how to sponsor a transaction for a user:The sponsor must have sufficient balance in the fee token (stablecoin) to cover gas costs.
Sponsor Service Pattern
Build a backend service that sponsors transactions for your users:Conditional Sponsorship
Implement policies to control when you sponsor transactions:Fee Sponsorship + Batch Payments
Combine fee sponsorship with batch payments for maximum efficiency:Security Considerations
Rate limiting
Rate limiting
Implement per-user rate limits to prevent abuse of your sponsorship service.
Transaction validation
Transaction validation
Validate all user transactions before sponsoring. Whitelist contract targets and limit values.
Sponsor key security
Sponsor key security
Protect sponsor private keys. Use hardware security modules (HSMs) for production.
Balance monitoring
Balance monitoring
Monitor sponsor account balances and set up alerts for low balances.
Replay protection
Replay protection
The fee payer signature binds to the sender address, preventing cross-user replay.
Cost Management
Manage sponsorship costs effectively:Use Cases
Mobile Wallets
Enable seamless payments without gas management
Enterprise Payments
Absorb transaction costs for business customers
Gaming
Let players transact without cryptocurrency knowledge
Onboarding
Remove friction for new users during first transactions
Loyalty Programs
Sponsor transactions for rewards program members
Microtransactions
Enable small payments without visible gas fees
Next Steps
Batch Payments
Combine fee sponsorship with atomic batch operations
Smart Accounts
Use access keys with sponsored transactions
Tempo Transaction
Learn more about Tempo Transaction capabilities
Making Payments
Return to basic payment operations