LazorKit Logo

LazorKit

Devnet
← Back to Home

Recipe 02: Gasless USDC Transfer

Send USDC without paying gas fees using LazorKit's paymaster

🎯 The Game Changer: Gasless Transactions

Traditional Solana apps require users to:

  1. Buy SOL on an exchange
  2. Transfer SOL to their wallet
  3. Keep enough SOL for gas fees
  4. Hope they don't run out mid-transaction

⚠️ This creates significant onboarding friction. Many users drop off here.

With LazorKit's Paymaster:

// User only needs USDC // LazorKit pays the gas const signature = await signAndSendTransaction({ instructions: [transferIx], }); // ✨ Transaction complete - user paid $0 in gas
  • Users never touch SOL
  • Can use stablecoins immediately
  • Perfect for payments, commerce, tipping
  • Significantly reduced onboarding friction

Under the Hood:

LazorKit's paymaster service detects your transaction needs gas, adds their signature to cover the fee, submits the transaction atomically, and the user only signs once while paying nothing.

What You'll Learn

  • Send USDC tokens without paying SOL for gas
  • How LazorKit's paymaster covers transaction fees
  • Create token accounts automatically if needed
  • Build and sign SPL token transfer instructions
  • True Web2-like UX - users never worry about gas

Code Example

const { signAndSendTransaction } = useWallet();

// Build transfer instruction
const transferIx = createTransferInstruction(
  senderTokenAccount,
  recipientTokenAccount,
  senderPubkey,
  amount * 1_000_000, // USDC has 6 decimals
);

// Send gasless transaction
const signature = await signAndSendTransaction({
  instructions: [transferIx],
});

// No SOL needed! Paymaster covers the fee ✨

LazorKit handles all the complexity. Just build your instructions and send!

Try It Yourself

💸

Connect Your Wallet

Connect with Face ID to start sending gasless USDC transfers