See how different app types implement gasless transactions with both the Supertransaction API and AbstractJS SDK.
All examples use Biconomy’s MEE (Modular Execution Environment), which has replaced traditional ERC-4337 bundlers and paymasters with a unified interface for transaction submission, gas sponsorship, and cross-chain orchestration.
NFT Marketplaces
Why gasless matters: Buyers abandon at checkout when they see unexpected gas fees.
const buyInstruction = await account.buildComposable({
type: "default",
data: {
chainId: base.id,
to: MARKETPLACE,
abi: marketAbi,
functionName: "buy",
args: [tokenId],
value: priceInWei
}
});
const isFirstPurchase = await checkFirstPurchase(buyerAddress);
const quote = await meeClient.getQuote({
sponsorship: isFirstPurchase,
instructions: [buyInstruction],
feeToken: isFirstPurchase ? undefined : { address: USDC, chainId: base.id }
});
const { hash } = await meeClient.executeQuote({ quote });
DeFi / Trading
Why gasless matters: Traders have USDC, not ETH. Multi-step transactions (approve + swap) need batching.
One-Click Swap
// Approve + Swap in one transaction, pay in USDC
const approve = await account.buildComposable({
type: "approve",
data: {
chainId: base.id,
tokenAddress: USDC,
spender: UNISWAP_ROUTER,
amount: parseUnits("100", 6)
}
});
const swap = await account.buildComposable({
type: "default",
data: {
chainId: base.id,
to: UNISWAP_ROUTER,
abi: UniswapAbi,
functionName: "exactInputSingle",
args: [swapParams]
}
});
const quote = await meeClient.getQuote({
instructions: [approve, swap],
feeToken: { address: USDC, chainId: base.id }
});
// User signs once, both approve + swap execute atomically
const { hash } = await meeClient.executeQuote({ quote });
Cross-Chain DeFi
Execute on Arbitrum, pay from Base:
const arbitrumDeposit = await account.buildComposable({
type: "default",
data: {
chainId: 42161, // Arbitrum
to: AAVE_ARBITRUM,
abi: aaveAbi,
functionName: "supply",
args: [USDC_ARBITRUM, amount, userAddress, 0]
}
});
const quote = await meeClient.getQuote({
instructions: [arbitrumDeposit],
feeToken: {
address: USDC_BASE,
chainId: 8453 // Pay from Base
}
});
Subscriptions & Payments
Why gasless matters: Recurring payments need to be frictionless. Users set and forget.
Subscription Service
// Monthly subscription paid in USDC
const subscription = await account.buildComposable({
type: "transfer",
data: {
chainId: base.id,
tokenAddress: USDC,
recipient: MERCHANT_ADDRESS,
amount: parseUnits("9.99", 6)
}
});
// Sponsor subscription payments (included in subscription cost)
const quote = await meeClient.getQuote({
sponsorship: true,
instructions: [subscription]
});
Payroll Distribution
// Company distributes salaries, sponsors all gas
const payments = employees.map(emp => ({
type: "transfer",
data: {
chainId: base.id,
tokenAddress: USDC,
recipient: emp.address,
amount: emp.salary
}
}));
const instructions = await Promise.all(
payments.map(p => account.buildComposable(p))
);
const quote = await meeClient.getQuote({
sponsorship: true, // Company pays all gas
instructions
});
Enterprise Applications
Why gasless matters: End users shouldn’t know they’re using blockchain.
Supply Chain Tracking
// Manufacturer records shipment, company sponsors
const recordShipment = await account.buildComposable({
type: "default",
data: {
chainId: base.id,
to: SUPPLY_CHAIN_CONTRACT,
abi: supplyChainAbi,
functionName: "recordShipment",
args: [shipmentId, "departed"]
}
});
const quote = await meeClient.getQuote({
sponsorship: true, // Company sponsors
instructions: [recordShipment]
});
const { hash } = await meeClient.executeQuote({ quote });
Tokenized Asset Transfers
// Real estate token transfer, seller pays gas in USDC
const transferProperty = await account.buildComposable({
type: "default",
data: {
chainId: base.id,
to: PROPERTY_TOKEN,
abi: erc721Abi,
functionName: "safeTransferFrom",
args: [sellerAddress, buyerAddress, propertyTokenId]
}
});
const quote = await meeClient.getQuote({
instructions: [transferProperty],
feeToken: { address: USDC, chainId: base.id }
});
Loyalty & Rewards
Why gasless matters: Rewards should feel like rewards, not cost users gas.
Redeem Points for NFT
// User redeems loyalty points, brand sponsors
const redeemReward = await account.buildComposable({
type: "default",
data: {
chainId: base.id,
to: LOYALTY_CONTRACT,
abi: loyaltyAbi,
functionName: "redeemForNFT",
args: [userAddress, rewardId]
}
});
const quote = await meeClient.getQuote({
sponsorship: true, // Brand pays
instructions: [redeemReward]
});
Quick Reference
| Use Case | Approach | Who Pays |
|---|
| NFT (first purchase) | Sponsored | Marketplace |
| NFT (repeat buyer) | Pay in token | User |
| DeFi swaps | Pay in token | User |
| Subscriptions | Sponsored | Service provider |
| Enterprise | Sponsored | Company |
| Loyalty rewards | Sponsored | Brand |