Skip to main content
Paymaster enables users to pay transaction fees in any ERC-20 token (gasless) or have fees fully sponsored by dApps (gasfree). Invented and standardized by avnu through SNIP-9 and SNIP-29, this removes the friction of requiring STRK for gas, dramatically improving user onboarding.

πŸ’° Get up to $1M in gas subsidies from Starknet Foundation

The Propulsion Program covers your user’s gas fees with monthly USD reimbursements
avnu pioneered paymaster on Starknet:
  • Created the paymaster standard
  • Co-Authored SNIP-9 (Outside Execution) and SNIP-29 (Paymaster) with StarkWare, Ready and Braavos
  • Built the first production-ready implementation
  • Open-sourced the entire stack

Two Options

Integrate avnu Paymaster

Fastest path to production
  • Production-ready infrastructure
  • No ops overhead
  • Supports top traded tokens
  • Optional Propulsion Program funding

Run Your Own Paymaster

Full control & customization
  • Accept any ERC-20 as gas
  • Custom sponsorship logic
  • Self-hosted infrastructure
  • Open-source codebase

Gasless vs Gasfree

ModeWho PaysUser ExperienceRequirements
GaslessUser pays in USDC, USDT, or any tokenNo STRK needed for gasNo API key required
GasfreeYou sponsor (dApp covers fees)Completely free for useravnu API key required

Gasless: User Pays in Tokens

Users pay gas fees in any supported token instead of STRK. Perfect for wallets and apps where users hold stablecoins but no native tokens.

Quick Example

import { PaymasterRpc } from 'starknet';
import { executeSwap } from '@avnu/avnu-sdk';

const paymasterProvider = new PaymasterRpc({
  nodeUrl: 'https://starknet.paymaster.avnu.fi',
  headers: { 'x-paymaster-api-key': process.env.AVNU_PAYMASTER_API_KEY }, // Only for sponsored mode
});

// Gasless: User pays in USDC
const result = await executeSwap({
  provider: account,
  quote: quotes[0],
  slippage: 0.005, // 0.5%
  paymaster: {
    active: true,
    provider: paymasterProvider,
    params: {
      version: '0x1',
      feeMode: {
        mode: 'default',
        gasToken: '0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8' // USDC
      }
    }
  }
});
No API key needed for gasless - Users simply need sufficient token balance.

Gasfree: You Sponsor Gas

Your dApp covers all gas costs, providing a completely free experience for users. Ideal for onboarding, premium features, or when subsidized by the Starknet Propulsion Program.

Getting Started with Gasfree

1

Request API Key

Fill out the integration form and join our developer community:
  1. Apply: Request an API key
Once you’ve filled the form, please follow up on Telegram to expedite your request.
  1. Join Developer Groups:
You’ll receive your API key within 2 business days after review.
2

Fund Your Account (Optional)

Option 1: Propulsion Program (Recommended)Apply for the Starknet Propulsion Program to get up to $1M in gas fees covered with monthly USD reimbursements.Option 2: Self-FundThe avnu team will reach out to you to deposit STRK into the paymaster balance in STRK tokens.
3

Integrate

Add your API key for sponsored transactions:
import { PaymasterRpc } from 'starknet';
import { executeSwap } from '@avnu/avnu-sdk';

const paymasterProvider = new PaymasterRpc({
  nodeUrl: 'https://starknet.paymaster.avnu.fi',
  headers: { 'x-paymaster-api-key': process.env.AVNU_PAYMASTER_API_KEY },
});

// Gasfree: You sponsor
const result = await executeSwap({
  provider: account,
  quote: quotes[0],
  slippage: 0.005, // 0.5%
  paymaster: {
    active: true,
    provider: paymasterProvider,
    params: {
      version: '0x1',
      feeMode: {
        mode: 'sponsored'
      }
    }
  }
});
Security: Never expose API keys in frontend code. Use server-side proxy for gasfree transactions.

Integration Guides

Standards & SNIPs

avnu created and maintains the paymaster standards for Starknet:
Both standards were authored and proposed by avnu to establish paymaster as a core Starknet primitive.

Next Steps