What’s in this doc

This guide provides a high-level overview of Shinami’s Gas Station and the benefits it provides to your application. It shows you an image of the entire sponsorship flow, from setting up a fund 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.

Gas Station overview

What are gas fees?

A gas fee is the fee charged for writing data to the Aptos blockchain. Writing data is called executing a transaction. Gas fees pay the teams that run the hardware that processes transactions and stores any new data written to the chain. This hardware is called a validator node, as it validates whether or not a transaction is allowed to happen. While gas fees for Aptos are very small - averaging well under 0.001 APT per transaction this year as shown in the “Network Fees (APT)” graph here - they must be paid. Further, they must be paid in APT.

Why sponsor transactions?

In short: To create a low-friction user experience and increase user conversion, retention, and engagement. In full: Typically, the wallet that’s executing the transaction (the sender) pays the gas fees for a transaction. This means the wallet must have APT in it. For web2 native users, this adds too much friction: completing KYC checks to purchase APT from an exchange, downloading and setting up a wallet app, transferring APT 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 Gas Station to sponsor their transactions and use embedded or Keyless wallets they don’t need to manage. This allows for a great UX, improving sign-up conversion and user retention. Even apps that target Web3-natives, who are used to managing a self-custody wallet, can have a lot of friction from gas fees. For example, when DeFi users who trade non-APT tokens have no APT but need to buy some just to pay a 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.

What is a gas station?

A gas station is a service that sponsors your user’s transactions. It does two main things:
  1. Sponsor the gas fees of an individual transaction. It must create this sponsorship on-demand and quickly.
  2. Efficiently and performantly manage the use of your APT sponsorship fund at scale, through high QPS spikes.
A gas station manages the above for you, so that you can focus on building your app. With Shinami’s Gas Station, you periodically deposit APT in a fund in your Shinami account, and then our Gas Station uses it to handle the management and optimization of transaction sponsorships at scale. You just request a sponsorship for each transaction, and we take care of the rest!

End-to-end flow

This diagram shows a simple transaction. For a multi-agent transaction, you would send us the secondary signer addresses in step 5, you would get signatures from them in step 7, and you would include their signatures in step 8.

Summary of steps
1

App creates a Gas Station fund in the Shinami dashboard (only happens once per fund).
2

App sends APT to the fund to pay for upcoming sponsorships. (you’ll top off the fund every so often as needed).
3

An end user interaction with the app initiates a transaction. For example the user requests to mint an NFT or the app mints the user a free NFT for accomplishing a task.
4

App constructs a mint NFT transaction without fee payer information. The transaction expiration must be set to 1 hour or less.
5

App sends the raw transaction to Shinami’s Gas Station for sponsorship, along with any secondary signer addresses via a gas_sponsorTransactionBlock request.
6

Shinami Gas Station sponsors the transaction from the app’s fund and returns the fee payer account address and signature.
7

App gets the sender signature (and any secondary signer signatures required).
8

App submits the transaction with all signatures to the Aptos blockchain.

sign -> sponsor & submit

This diagram shows a simple transaction. For a multi-agent transaction, you would get signatures from secondary senders in step 3 and send them to Gas Station in step 4.

Summary of steps This assumes you’ve already created and funded a Gas Station fund (steps 1 & 2 in the first image).
1

An end user interaction with the app initiates a transaction. For example the user requests to mint an NFT or the app mints the user a free NFT for accomplishing a task.
2

App constructs a mint NFT transaction without fee payer information. The transaction expiration must be set to 1 hour or less.
3

App gets the sender signature (and any secondary signer signatures required). App sends the raw transaction to Shinami’s Gas Station, along with any secondary signer addresses, and asks it to sponsor AND submit the transaction.
4

Shinami Gas Station sponsors the transaction from the app’s fund and sends the sponsored transaction, along with the sender and sponsor signatures, to a Full node for submission to the Aptos blockchain

Creating and using a Gas Station fund

See the Aptos Gas Station FAQ page of our Help Center for information on how to set up a Gas Station fund and how to sponsor transactions using the fund.

Developer resources

See our: