Gas Station

Sponsor gas fees to increase user conversion and retention

What's included?

This guide summarizes of the benefits of sponsoring transactions with Shinami's Gas Station. It shows you an image of the entire sponsorship flow, from setting up a find in your Shinami web dashboard all the way through executing a sponsored transaction. Finally, it summarizes our developer resources for getting started with Gas Station.

Why sponsor transactions?

If you don't sponsor transactions, users need a wallet with a SUI balance to pay gas fees. This is a lot friction for Web2-native users: downloading a wallet app, completing KYC checks to purchase SUI, transferring SUI to their wallet, and then connecting their wallet to your app. You won't convert many Web2 users this way. Instead, you can use Shinami's Sui Wallet Services to create wallets for users and Gas Station to sponsor their transactions. This allows for a great UX, driving sign-up conversion and user retention. To see this in action, check out our zkLogin Game Dashboard Demo.

Even apps that target Web3-natives, who are used to managing a self-custody wallet, can have friction from gas fees. For example, when DeFi users who trade non-SUI tokens have no SUI and don't want to buy it just to pay the tiny gas fee. This annoyance could lead to fewer actions you want to promote, like deposits and swaps. Sponsoring these actions can increase both your MAU and your revenue per user.

Apps on Sui can sponsor their end user's transactions to remove this friction, improving onboarding conversion and user retention. You deposit SUI in a fund in your Shinami account, and then our Gas Station handles the management and optimization of gas credits (SUI) to facilitate sponsored transactions.

Integrating Shinami's Gas Station with your app is very simple, and we have comprehensive API documentation - including a tutorial with all the sample code you need to get started linked at the bottom of this doc.


End-to-end flow

Diagram

Summary of steps

  1. App creates a Gas Station fund in the Shinami dashboard.
  2. App sends SUI to the fund to pay for upcoming sponsorships.
  3. An end user interaction with the app initiates a transaction. For example the user could ask to mint an NFT or the app could give the user a free NFT for accomplishing a task.
  4. App constructs the mint NFT transaction without a gas object under the hood (check out our TypeScript tutorial for examples).
  5. App sends it to the Shinami Gas Station for sponsorship via a gas_sponsorTransactionBlock request.
  6. Gas Station sponsors the transaction from the app's fund and produces the full transaction data and sponsor signature needed for execution.
  7. A signature is obtained from the user's wallet in one of the following ways
    1. Programmatically on the backend with no user action via an app-controlled Invisible Wallet or a user-controlled zkLogin wallet.
    2. User is presented a pop-up to confirm and sign (connected, self-custody wallet).
  8. App submits the transaction with sponsor and sender signature to the Sui blockchain by making a sui_executeTransactionBlock request to Shinami Node Service, which provides enterprise-grade infrastructure to read and write to the Sui blockchain.

Creating and using a Gas Station fund

See our FAQ for information on how to set up a Gas Station fund, how to deposit free Testnet SUI into it, and how to sponsor transaction using that fund.

Developer resources

Gas Station only

Gas Station + Invisible Wallets and zkLogin wallets

  • Our Invisible Wallet TypeScript Tutorial provides end-to-end sample code for setting up an app-controlled wallet on behalf of a user and sponsoring a transaction for it with Shinami Gas Station.
  • Our zkLogin wallet Next.js Tutorial helps you quickly set up your first zkLogin app that integrates with Shinami Gas Station for transaction sponsorship.