Skip to content

⛽️ Gas Sponsorship with Biconomy MEE

Gas sponsorship in Biconomy MEE allows developers to fully abstract gas costs from end-users—regardless of wallet type or chain. Whether you're building on embedded wallets with EIP-7702, using native smart contract accounts, or orchestrating through Fusion from EOAs like MetaMask, MEE provides a unified, scalable sponsorship model.

This guide will:

  • Introduce sponsorship across EIP-7702, Fusion, and native SCAs
  • Help you choose the right flow for your app
  • Walk you through enabling sponsorship
  • Explain hosted vs self-hosted setups

🧠 Sponsorship Basics

Biconomy’s gas sponsorship abstracts the need for end-users to hold native gas. This is ideal for:

  • Onboarding users unfamiliar with wallets
  • Consumer apps where gas UX is a blocker
  • Advanced orchestrations involving bridging or multicalls

Sponsorship is activated per-project via dashboard.biconomy.io and requires an apiKey in all requests.

🧭 Choosing the Right Flow

Wallet TypeFlowSponsorship Ready?Notes
Embedded WalletsEIP-7702✅ EasyBest UX, full smart account delegation
External EOAsFusion⚠️ ConditionalRequires permit-supporting tokens or fallback gas
Native SCAsSCA Orchestration✅ FlexibleBest for apps controlling deployment

🔹 EIP-7702 Sponsorship (Embedded Wallets)

EIP-7702 lets you install smart account logic directly on EOAs, enabling orchestration and sponsorship with zero user effort.

const quote = await meeClient.getQuote({
  sponsorship: true,
  instructions: [/* your calls here */],
  delegate: true,
  authorization // Required for 7702 accounts
});

🔸 Fusion Sponsorship (External Wallets)

Fusion enables orchestration from EOAs (e.g. MetaMask) via a trigger + Companion Account pattern. It supports sponsorship, but with caveats:

🔐 Requirements

  • Set sponsorship: true
  • Trigger token must support permit() (ERC-2612) to be truly gasless
  • Otherwise, user must have enough native gas to approve() token transfer
const quote = await meeClient.getFusionQuote({
  sponsorship: true,
  trigger: {
    amount: 1n,
    chainId: base.id,
    tokenAddress: usdcAddresses[base.id]
  },
  instructions: [/* your calls here */]
});

🔸 Native SCA Sponsorship (Deployed Accounts)

If you’re orchestrating via pre-deployed smart contract accounts, you can sponsor transactions as long as the orchestrator account is set and you pass the apiKey.

const quote = await meeClient.getQuote({
  sponsorship: true,
  instructions: [instruction]
});

✅ Works across any chain MEE supports. Best for dApps that deploy user accounts up front.

🏗 Hosted vs Self-Hosted Sponsorship

🧡 Biconomy-Hosted

  • No infra required
  • Uses Biconomy-managed gas tanks
  • Set up via dashboard
  • Supports post-paid modes with enterprise contracts or paying via credit card
const meeClient = await createMeeClient({
  account: orchestrator,
  apiKey: "your_project_api_key"
});

🔸 Self-Hosted

  • Run your own sponsorship backend
  • Fully programmable: accept or reject transactions based on any custom logic
  • Define your own gas tank and token
sponsorshipOptions: {
  url: "https://your-custom-backend",
  gasTank: {
    address: "0x...",
    token: "0x...",
    chainId: 84532
  }
}

✅ Ideal for wallets, infra providers, or apps needing custom user-based policies.

🧪 Testnet Setup

On testnets, you'll often want to use sponsorshipOptions to point to a testnet gas tank:

const quote = await meeClient.getQuote({
  sponsorship: true,
  sponsorshipOptions: {
    url: DEFAULT_PATHFINDER_URL,
    gasTank: {
      address: DEFAULT_MEE_TESTNET_SPONSORSHIP_PAYMASTER_ACCOUNT,
      token: DEFAULT_MEE_TESTNET_SPONSORSHIP_TOKEN_ADDRESS,
      chainId: DEFAULT_MEE_TESTNET_SPONSORSHIP_CHAIN_ID
    }
  },
  instructions: [instruction]
});

🔍 Discover Available Gas Tanks

List available tanks using:

GET https://network.biconomy.io/v1/sponsorship/info

Or point to your self-hosted sponsorship URL to list custom tanks.

✅ Summary

  • Use EIP-7702 for embedded wallets — simplest and most powerful
  • Use Fusion for EOAs — ensure permit() or fallback gas is available
  • Use native SCAs if deploying and managing accounts
  • Start with Biconomy-hosted sponsorship; move to self-hosted as you scale
  • Sponsorship unlocks full UX abstraction with one gas tank across all chains