# Fee Batch

The Beefy Fee Batch is another core component of the [Beefy Protocol](/ecosystem/protocol.md) which distributes vault fees to our Ethereum [Incentive Programmes](/ecosystem/protocol/incentive-programmes.md) and [Treasury](/dao/treasury.md). As with the [Revenue Bridge](/ecosystem/protocol/revenue-bridge.md) which delivers fees to the Fee Batch, the Fee Batch acts in one direct only, helping to move earnings from vaults to the Beefy DAO and its tokenholders.

## What does the Fee Batch do?

Beefy's Fee Batch contracts were designed and implemented to improve gas efficiency across the protocol in its management of vault fees. Forwarding fees immediately in small values may increase the speed of Beefy's cashflow, but in practice also depletes that cashflow with a corresponding increase in gas costs.

When preparing to send out fees, the Fee Batch's outflow transaction is a multicall, which sends $WETH to the [Incentive Programmes](/ecosystem/protocol/incentive-programmes.md) and to a router liquidity pool, to swap for a stablecoin (e.g. $USDC), which is sent onwards to the [Treasury](/dao/treasury.md). The breakdown of fees into these categories reflects the [Beefy Fees Breakdown](/ecosystem/beefy-bulletins/beefy-finance-fees-breakdown.md).&#x20;

Following the migration of the [$BIFI Token](/ecosystem/bifi-token.md) to Ethereum in 2023, the protocol relied on Fee Batch contracts on each chain to aggregate fees from that chain's strategies, before transferring into the treasury and governance pools on that chain. See [here](https://optimistic.etherscan.io/address/0x2bbf9cfbda4293fa446e915aa12adc52ea8d5d53#code) for an example Fee Batch contract on Optimism, which often handled around 500 inflows and 2 outflows of $WETH per day, and [here](https://optimistic.etherscan.io/tx/0x8c8a31d0ff4e66fe55d5e55e2670ccf8015614cdd5bc78bd51ced42845bb6587) for an example outflow transaction.

Post-migration, most chains now use their [Revenue Bridge](/ecosystem/protocol/revenue-bridge.md) contracts to batch fees before bridging, as explained in [Revenue Bridge](/ecosystem/protocol/revenue-bridge.md#what-does-the-revenue-bridge-do). The obvious exception to this is Ethereum.

## Ethereum Fee Batch

Post-migration, the Ethereum Fee Batch contract has taken on the role of batching **all** revenue from the protocol's vaults after the [Revenue Bridge](/ecosystem/protocol/revenue-bridge.md) has returned the funds to Ethereum. This covers inflows from all of the hub chains across different bridges and assets.

Once received by the fee batch, and a sufficient amount has accumulated, the fees are split as previously between the [Incentive Programmes](/ecosystem/protocol/incentive-programmes.md) and the [Treasury](/dao/treasury.md), in accordance with the allocation detailed in the [Beefy Fees Breakdown](/ecosystem/beefy-bulletins/beefy-finance-fees-breakdown.md). Unlike under the previous fee batch, as the fees are received in stablecoins, the Treasury inflows do not need to be swapped, but incentives for the Governance Pools must first be swapped back to $WETH.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.beefy.finance/ecosystem/protocol/fee-batch.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
