Skip to main content
Fee Aggregation allows you to collect transaction fees in any token and have them automatically swapped to USDC on a daily basis. This simplifies fee management across multiple chains and tokens.

How It Works

1

Enable Fee Collector

Enable the fee collector from your Gelato dashboard to receive your unique fee collector address.
2

Send Tokens to Fee Collector

Transfer any ERC-20 token to your assigned fee collector address. This is a simple token transfer included in your transaction.
3

Automatic Daily Swap

Every 24 hours, all collected tokens are automatically swapped to USDC (assuming sufficient liquidity).
4

Withdraw

From the Gelato dashboard, select your receiver address and chain to withdraw your aggregated USDC balance.

Enable Fee Collector

Navigate to your organization settings and enable the fee collector to get started.
Enable Fee Collector
Once enabled, you’ll receive a unique fee collector address for your organization.

Fee Collector Dashboard

View your fee collector address, collected balances, and trigger withdrawals from the dashboard.
Fee Collector Dashboard

Requirements

Fee Collector Address

Each organization receives a unique fee collector address. Send tokens to this address to have them tracked and aggregated.

API Endpoint

Use our bundler/relayer endpoints at https://api.gelato.cloud/rpc or the Gasless SDK (which uses the correct URLs automatically).

Supported Chains

Fee collection and aggregation is currently available on:
  • Ethereum
  • Base
  • Ink
Need additional chains? Contact our team to enable fee aggregation on more networks.

Integration Example

Simply include an ERC-20 transfer to your fee collector address in your transaction:
import { createGelatoSmartAccountClient, sponsored } from "@gelatocloud/gasless";

const FEE_COLLECTOR = "0x..."; // Your fee collector address from dashboard
const FEE_TOKEN = "0x..."; // Token to collect as fee

// Include fee transfer in your calls
const result = await relayer.sendTransaction({
  payment: sponsored(),
  calls: [
    // Your main transaction
    {
      to: targetContract,
      data: mainCalldata,
    },
    // Fee collection transfer
    {
      to: FEE_TOKEN,
      data: encodeFunctionData({
        abi: erc20Abi,
        functionName: "transfer",
        args: [FEE_COLLECTOR, feeAmount],
      }),
    },
  ],
});