Skip to main content
Typically submitting transactions to a blockchain requires the sender to pay a small amount of fees called gas fees. These fees compensate network participants, such as miners or validators, for the computational resources needed to execute transactions, smart contracts, and other operations. What it means in practice is that for users to transfer some stable coins such as USDC, they must also hold a small amount of the native tokens of the blockchains used to pay the gas fees. This creates friction because you must constantly top up all your wallets in order for them to stay functional. The Fee Sponsor enables you to sponsor gasless transactions for your wallets via the Transfer API. This allows you to manage a small set of fee sponsor wallets with native tokens and use them to pay gas fees for other wallets. To sponsor a transfer,
  • Designate a Dfns wallet as the fee sponsor. See below for supported networks.
  • Fund the fee sponsor wallet with some native tokens.
  • Specify the feeSponsorId when creating a transfer request. Note that the sponsor and sponsoree wallets must be for the same network.

End user access

By default, only service accounts and organization users (CustomerEmployee) can use a fee sponsor when creating transfers. If you want your end users (EndUser) to use a fee sponsor when making transfers from their delegated wallets, set allowEndUser: true when creating the fee sponsor.
const feeSponsor = await dfns.feeSponsors.createFeeSponsor({
  body: {
    walletId: 'wa-...',
    allowEndUser: true, // Allow EndUsers to use this fee sponsor
  },
})
If you don’t set allowEndUser: true and an EndUser tries to use the fee sponsor, they will receive a 401 Unauthorized error.
The sponsoree wallet (the wallet being sponsored) must be a custodial or delegated wallet managed by Dfns. External wallets cannot be sponsored.
Policy consideration: When using fee sponsorship, the fee sponsor wallet must sign a transaction to pay the gas fees. If the fee sponsor wallet has a policy that blocks or requires approval for signing (e.g., a Block action on Wallets:Sign), the sponsored transfer will fail. Ensure your fee sponsor wallet is not subject to any blocking policies.

Supported networks

Not all networks support this feature. You can create fee sponsors for the following supported networks.
MainnetsTestnets
ArbitrumOne 1ArbitrumSepolia
Base 1BaseSepolia
Berachain 1BerachainBepolia
Bsc 1BscTestnet
Ethereum 1EthereumSepolia, EthereumHoodi
Optimism 1OptimismSepolia
Polygon 1PolygonAmoy
SolanaSolanaDevnet
StellarStellarTestnet
Networks not supported: Tron, Bitcoin, and other non-EVM chains (except Solana and Stellar) do not support fee sponsorship due to their transaction models.

Getting Started


Footnotes

  1. The implementation leverages EIP-7702 that turns your EOA into a smart contract account. When you use this feature, the on chain account of the sponsoree wallet will become a smart contract. You can view the source code of the smart contract we use here. 2 3 4 5 6 7