Fees

When a fee is collected, it is pooled in Flayer and queued to be swapped to ETH using Uniswap V4’s beforeSwap() hook. This hook manipulates a buyer’s swap data to include Flayer fee pool liquidity (no fee, no slippage), providing a better execution price and a more desirable fee token for the LPs (ETH). These ETH fees are then sent into the UV4 pool via donate() and triggered via the afterSwap(), beforeAddLiquidity() and beforeRemoveLiquidity() hooks for timely distribution.

LPs can then claim their share of the fees using the same logic as swap fee collection without any additional staking or gas.