Sponsor gas, bridging, and swap costs for your users
Rhinestone lets you cover the fees for your users with a single onchain deposit.You can deposit USDC on Base, and subsidise gas, bridge fees, and swap fees across all chains.
When your users make transactions, you can select which (if any) fees you are willing to sponsor. Rather than charging the user these costs, the Orchestrator instead applies them against your sponsorship balance. You can sponsor up to their deposited amount, after which point, fees will be applied to your users’ intents, ensuring continuity should you run out of funds.The sponsored amount is calculated in USD at the time of the intent, based on the cumulative fees that would otherwise be charged to the user.
You can test fee sponsorship on testnets out of the box.Reach out to us if you need to set this up for production use. We will provide you with a wallet address to deposit to. Once you deposit, your sponsorship balance will automatically increase.Currently, we accept USDC deposits on Base. Reach out to us if you want to use fiat deposits.
Currently, the SDK doesn’t provide any policies out of the box. You can implement bespoke, flexible policies on your backend.Here’s one example, where we only sponsor transactions that interact with a specific contract:
Copy
Ask AI
// Sponsors a transaction only if it interacts with our appfunction isSponsored( sourceChains: Chain[], targetChain: Chain, calls: { to: string value: bigint data: string }[],): boolean { const appContractAddress = '0xbeefbeefbeefbeefbeefbeefbeefbeefbeefbeef' return calls.some((call) => call.to === appContractAddress)}
You can then use that function when handling the user’s transaction request:
Copy
Ask AI
const calls = [ { to: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045' as Address, value: 0n, data: '0xdeadbeef' as Hex, },]const transactionData = await rhinestoneAccount.prepareTransaction({ sourceChains: [sourceChain], targetChain, calls, sponsored: isSponsored([sourceChain], targetChain, calls),})