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

# FeeForwarder

> How LI.FI's FeeForwarder contract works and what it means for partners

LI.FI has upgraded its fee handling mechanism on supported EVM chains, migrating from the **FeeCollector** contract to a new **FeeForwarder** contract. This page explains what changed, what it means for your integration, and what—if anything—you need to do.

## Why this change?

The previous FeeCollector model required fees to accumulate in a contract and be manually withdrawn later. This added operational overhead and delayed payouts to fee recipients.

With FeeForwarder, fees are forwarded immediately to the configured recipient wallet at transaction execution time. No manual withdrawal step is required. The contract is also designed to support future multi-party fee distribution models, such as splitting fees between LI.FI, an integrator, and a reseller.

## What changes for partners?

### Immediate fee forwarding

On chains where FeeForwarder is deployed, transactions call the new contract and fees are distributed automatically at execution time.

No action is required from partners.

### Backward compatibility

On chains where FeeForwarder has not yet been deployed, the system automatically falls back to the legacy FeeCollector contract. Existing withdrawal endpoints remain available, and no API changes have been introduced. Fee data in `/status` responses is unchanged.

## Event changes

For partners who parse on-chain events, the EVM fee event signature has changed.

**Previous event ([contract](https://github.com/lifinance/contracts/blob/main/src/Periphery/FeeCollector.sol)):**

```solidity theme={"system"}
event FeesCollected(
    address indexed _token,
    address indexed _integrator,
    uint256 _integratorFee,
    uint256 _lifiFee
);
```

**New event ([contract](https://github.com/lifinance/contracts/blob/main/src/Periphery/FeeForwarder.sol)):**

```solidity theme={"system"}
struct FeeDistribution {
    address recipient;
    uint256 amount;
}

event FeesForwarded(
    address indexed token,
    FeeDistribution[] distributions
);
```

This [sample transaction](https://basescan.org/tx/0x02e7f968e97382b43126d8f15a90b41f35a8b595b5a1a2d3be36a48ec5eb9854) shows fees forwarded directly from the LiFiDiamond address to the configured fee receiving wallets.

The Status API has been updated to correctly parse the new event format. Fee data, including `integratorFeeCost`, continues to be returned in the same `/status` response structure.

## What is not changing

* No API response structure changes
* No changes to fee configuration
* No changes required in partner integration code
* Solana, Bitcoin, Sui, and Move implementations are not affected
* Existing fees accumulated in FeeCollector are not automatically migrated; see the section below for how to withdraw them

## Withdrawing previously collected fees

Fees collected through the legacy FeeCollector contract before the FeeForwarder upgrade are **not** migrated automatically. They remain in the FeeCollector contract and must be withdrawn manually.

<Warning>
  Only the wallet address that was designated for fee collection when the fees were accrued can withdraw those fees. If you have since updated your fee wallet, use the **original** wallet to claim older balances.
</Warning>

### Check your legacy balances

**Via the Partner Portal:**

Log in to [portal.li.fi](https://portal.li.fi/) and review your fee balances dashboard.

**Via the API:**

```http theme={"system"}
GET https://li.quest/v1/integrators/{integratorId}
```

This returns your fee balances per chain and per token:

```json theme={"system"}
{
  "integratorId": "your-integrator-id",
  "feeBalances": [
    {
      "chainId": 137,
      "tokenBalances": [
        {
          "token": {
            "address": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
            "symbol": "USDC",
            "decimals": 6,
            "chainId": 137,
            "name": "USD Coin",
            "priceUSD": "1.00"
          },
          "amount": "50000000",
          "amountUsd": "50.00"
        }
      ]
    }
  ]
}
```

### Withdraw legacy fees

**Via the Partner Portal:**

Use the withdrawal feature in [portal.li.fi](https://portal.li.fi/).

**Via the API:**

```http theme={"system"}
GET https://li.quest/v1/integrators/{integratorId}/withdraw/{chainId}
```

This returns a transaction request that you sign and submit from the original fee wallet:

```json theme={"system"}
{
  "transactionRequest": {
    "to": "0x...",
    "data": "0x...",
    "value": "0"
  }
}
```

<Note>
  The withdrawal endpoint is available for EVM chains only. On Solana, Sui, and Bitcoin, fees have always been sent directly to your wallet and do not require withdrawal.
</Note>

## Summary

|                       | FeeCollector (legacy)         | FeeForwarder (new)                                       |
| --------------------- | ----------------------------- | -------------------------------------------------------- |
| Fee settlement        | Accumulated, claimed manually | Forwarded immediately at execution                       |
| Manual withdrawal     | Required                      | Not required                                             |
| Partner action needed | None                          | None                                                     |
| Backward compatible   | —                             | Yes, chains without FeeForwarder fall back automatically |

This is a backend contract upgrade. Partners do not need to take any action.

<Note>
  If you have questions about fee configuration or how the Status API reports fees for your transactions, reach out via your usual support channel.
</Note>
