StarkFiStarkFi

AVNU Paymaster

Gas abstraction — Gasfree and Gasless transaction modes

Overview

StarkFi integrates with the AVNU Paymaster to enable gas abstraction on Starknet. This allows users to transact without holding native STRK for gas fees.

Two Modes

StarkFi supports two mutually exclusive gas abstraction modes. Only one can be active at a time.

Gasfree (Developer Sponsors Gas)

The developer pre-funds the Paymaster with credits. Users execute transactions with zero gas cost — the developer covers all fees.

starkfi config set-gasfree on

Under the hood, transactions are sent with feeMode: "sponsored" to the AVNU Paymaster endpoint.

Best forHow it works
Onboarding new usersDeveloper pays all gas from pre-funded credits
Demo environmentsUsers need zero token balance to transact

Gasless (User Pays in ERC-20)

Users pay gas in an ERC-20 token (ETH, USDC, USDT, DAI) instead of the default STRK. The Paymaster handles the token-to-gas conversion automatically.

starkfi config set-gas-token USDC

Under the hood, the SDK patches the wallet's executePaymasterTransaction to inject { mode: "default", gasToken: <tokenAddress> }.

Best forHow it works
Users without STRKPay gas in tokens they already hold
Stablecoin-heavy walletsUse USDC/USDT/DAI for gas

Note: Setting a gas token clears gasfree mode, and vice versa. Use starkfi config list to verify your current mode.

Paymaster URLs

NetworkURL
Mainnethttps://starknet.paymaster.avnu.fi
Sepoliahttps://sepolia.paymaster.avnu.fi

StarkFi selects the correct URL automatically based on the configured network.

Supported Gas Tokens

TokenAddress (Mainnet)
ETH0x049d36570d...004dc7
STRK0x04718f5a0f...7c938d (default)
USDC0x033068f653...3b35fb
USDT0x068f5c6a61...09c0fb8
DAI0x05574eb6b8...ddf4ad

How StarkFi Uses the Paymaster

StarkFi CommandPaymaster Role
trade, send, batchPays gas in configured token or via developer credits
stake, unstake, rewardsSame gas abstraction for staking operations
lend-supply, lend-borrow, etc.Same gas abstraction for lending operations
deployWallet deployment can also be gas-abstracted
config set-gasfree on/offToggle developer-sponsored mode
config set-gas-token <token>Switch gas payment token
config listView current fee mode and gas token
Edit on GitHub

Last updated on

On this page