> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gelato.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Fee Aggregation

> Automatically collect and convert transaction fees to USDC across multiple chains.

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

<Steps>
  <Step title="Enable Fee Collector">
    Enable the fee collector from your Gelato dashboard to receive your unique fee collector address.
  </Step>

  <Step title="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.
  </Step>

  <Step title="Automatic Daily Swap">
    Every 24 hours, all collected tokens are automatically swapped to USDC (assuming sufficient liquidity).
  </Step>

  <Step title="Withdraw">
    From the Gelato dashboard, select your receiver address and chain to withdraw your aggregated USDC balance.
  </Step>
</Steps>

## Enable Fee Collector

Navigate to your organization settings and enable the fee collector to get started.

<Frame>
  <img src="https://mintcdn.com/gelato-6540eeb1/7yz_CBSZaJE_iWYr/images/enable-fee-collector.png?fit=max&auto=format&n=7yz_CBSZaJE_iWYr&q=85&s=51cc1f5a0fb3803fc24b16c554589508" alt="Enable Fee Collector" width="2574" height="1250" data-path="images/enable-fee-collector.png" />
</Frame>

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.

<Frame>
  <img src="https://mintcdn.com/gelato-6540eeb1/7yz_CBSZaJE_iWYr/images/fee-collector.png?fit=max&auto=format&n=7yz_CBSZaJE_iWYr&q=85&s=6f665528c93745e7469c809435bc5555" alt="Fee Collector Dashboard" width="2586" height="1476" data-path="images/fee-collector.png" />
</Frame>

## Requirements

<CardGroup cols={2}>
  <Card title="Fee Collector Address" icon="wallet">
    Each organization receives a unique fee collector address. Send tokens to this address to have them tracked and aggregated.
  </Card>

  <Card title="API Endpoint" icon="server">
    Use our bundler/relayer endpoints at `https://api.gelato.cloud/rpc` or the Gasless SDK (which uses the correct URLs automatically).
  </Card>
</CardGroup>

## Supported Chains

Fee collection and aggregation is currently available on:

* Ethereum
* Base
* Ink

<Note>
  Need additional chains? Contact our team to enable fee aggregation on more networks.
</Note>

## Integration Example

Simply include an ERC-20 transfer to your fee collector address in your transaction:

```typescript theme={null}
import { createGelatoSmartAccountClient } 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({
  calls: [
    // Your main transaction
    {
      to: targetContract,
      data: mainCalldata,
    },
    // Fee collection transfer
    {
      to: FEE_TOKEN,
      data: encodeFunctionData({
        abi: erc20Abi,
        functionName: "transfer",
        args: [FEE_COLLECTOR, feeAmount],
      }),
    },
  ],
});
```
