Biconomy SDK
Search…
⌃K

Gas Paid In ERC20 Tokens

Currently, users who do not have native tokens in their wallet would have to exit the dApp, purchase/swap for native tokens & then come back to the dApp to send transactions. Enabling gas payments in ERC20 Tokens makes it easy for your users to pay for gas fees in the token that they currently have. We currently support gas fee payments using DAI, USDC & USDT, but have plans to support more tokens soon.
This feature enables you to improve UX in two main ways for your end users:
  1. 1.
    Allowing your end users to save their ETH or the native token on the blockchain they're interacting on
  2. 2.
    No stuck transactions when using dApps!
If you wish to skip the explanation of how gas payment in ERC20 tokens work via BiconomySDK, you can directly navigate to our Guide to Enabling Gas Fee Payments in ERC20 Tokens.

Flow Explained

This feature is supported using Biconomy's new upgraded relayer infrastructure. This relayer node which is used to power this infra is open sourced and you can read more about that here.
In this flow, the relayer shares a list of supported tokens that you can showcase to your users in your UI. Your user can choose which supported token to pay gas fees in. Then you can showcase the estimated gas to be paid using these ERC20 tokens. Once the user confirms the transaction, it is sent to the relayer.
After the transaction is sent to the relayer, it pays for gas in the native token & sends it to the chain. In the end, the relayer is refunded from the user's smart contract wallet in ERC20 tokens.
In order to enable this flow, please check out our Guide to Enabling Gas Fee Payments in ERC20 Tokens.