Skip to main content

About gas sponsorship

Overview

This page explains the concept of sponsored transactions in Ronin Waypoint. A sponsored transaction is one where a Ronin address (the payer) pays the gas fees for a transaction that another Ronin address (the user) initiates. You can use sponsored transactions to cover the fees for users in your game or dApp, which removes an obstacle for new users who would otherwise need to purchase tokens to send a transaction on chain.

Looking for implementation details?

To send a sponsored transaction in your project, see Sponsor transactions.

Entities

  • User: the Ronin address that initiates the transaction.
  • Payer: the Ronin address that sponsors the gas fees.
  • Sponsoring service: a service that verifies the user's eligibility for a sponsored transaction and requests signatures from the payer.

Use cases

Global gas sponsorship

Sky Mavis sponsors transactions for users in a few ways, including:

  • Each new Ronin Waypoint address receives a set number of sponsored transactions.
  • Each user receives a set number of sponsored transactions per day for swapping to RON or approval of tokens for use in Katana, Ronin's decentralized exchange.

For more information, see Ronin Wallet - One Time Free Transactions.

App-specific gas sponsorship

Developers can sponsor transactions for users interacting with their project's smart contracts. A transaction request can only be sponsored when it originates from a specific game or dApp, based on their app ID, and must match the allowlisted smart contract address.

Technical flow

  1. User initiates a transaction with Ronin Waypoint. The transaction type is 0x64.
  2. Ronin Waypoint requests the user's sponsored transaction quota from the sponsoring service, using the user's access token.
  3. Ronin Waypoint verifies the user's eligibility for a sponsored transaction with the sponsoring service. Outcomes include:
    • The user interacts with an allowlisted contract, wherein Ronin Waypoint applies sponsorship automatically for uninterrupted user experience. Automatically applied sponsorship takes priority over manual vouchers.
    • The user has a number of sponsored gas vouchers, which they can choose to apply to transactions.
  4. The user signs the transaction with senderSignature and sends it to the sponsoring service.
  5. Sponsoring service requests the payer to sign the transaction with payerSignature.
  6. Payer signs the transaction with payerSignature, indicating its agreement to sponsor the gas fees.
  7. The transaction, signed by both the user and the payer, is submitted to the Ronin chain for processing.

A sponsored transaction payload is a JSON object that contains the following fields:

  • chainId: the chain ID of the network.
  • nonce: the nonce of the sender.
  • max_priority_fee_per_gas: the maximum priority fee per gas. In case Ronin implements EIP-1559 later.
  • max_fee_per_gas: the maximum fee per gas. In case Ronin implements EIP-1559 later.
  • gas_limit: the gas limit.
  • destination: the destination address.
  • amount: the amount to send.
  • data: the data to send.
  • ExpiredTime: the expiration time of the transaction.
  • payerSignature: the signature of the payer, the address whose RON balance is deducted to pay for gas.
  • senderSignature: the signature of the user, the address that initiates the transaction. This address is deducted the amount to send.

User experience

Allowlisted smart contracts

When a user interacts with an allowlisted smart contract and is eligible for a sponsored transaction, Ronin Waypoint automatically applies free gas for uninterrupted user experience. The user just needs to sign the transaction by clicking Send.

User applies sponsored gas manually

Outside of allowlisted smart contracts, users can apply sponsored gas manually if they have a voucher, such as a new wallet user. They can choose to apply the voucher to the current transaction by clicking Apply.

In the Ronin Block Explorer, a sponsored transaction shows the payer's address.

Payer wallet out of RON

If the payer address runs out of RON, the UI displays a message that the sponsored transaction is unavailable, and prompts the user to use a standard transaction.