There are a few different types of fees on Balancer, each collected to support a healthy ecosystem. For example, Liquidity Providers collect swap fees as users trade with pools; this acts as an incentive for them to continue providing liquidity, which is useful to facilitate trades.
The fees ultimately go to Liquidity Providers in exchange for them putting their tokens in the pool to facilitate trades. Trade fees are collected at the time of a swap, and it goes directly into the pool, growing the pool's balance. For a trade with a given
, the amount collected by the pool as a fee is
. As the pool collects fees, Balancer Pool Tokens automatically collect fees because they represent a proportional share of the pool.
Let's say Alice, Bob, Chuck, and Diana all provide liquidity in the same pool starting out with a total value of $100. After some time, the pool has collected many trade fees and is now worth $200. The pool itself grows while the Liquidity Providers' proportional shares stay the same.
At the time of pool creation, the pool creator defines the fee and the owner. If the owner is set to an uncontrolled address (typically the zero address) then the swap fee is static. If the owner sets it to a controlled address, that address can set the fee at will, therefore making the swap fee dynamic.
There are two different ways that a pool can have Dynamic Fees, either the pool owner manually sets fees, or the pool creator delegates fees to a governance-approved controller by setting the pool owner to the
Protocol Swap Fees are a percentage of swap fees collected by pools. These go to the DAO Treasury to be used or held as the DAO sees fit. At deployment, Protocol Fees for swaps were set to 0%. These fees were activated by a governance vote and were later raised to 50% by a subsequent proposal. For the most up-to-date protocol fee data, please call
Protocol Swap Fees are a percent of the already collected swap fees; the traders would see no change in the amount collected. The Liquidity Providers, however, would see a small change. For example, if a pool has a 1% swap fee, and there was a 10% protocol swap fee, 0.9% of each trade would be collected for the LPs, and 0.1% would be collected to the protocol fee collector contract.
Flash Loan fees are a type of Protocol Fee on Balancer. The fees collected as interest on flash loans go to the DAO Treasury. At deployment, flash loan fees were set to zero, and as of this writing they have not been activated by governance.