Advanced DeFi & market structure

AMM trading fee

Every time someone swaps through an automated market maker, a small slice of the input is taken as a trading fee and handed to the liquidity providers. This fee is the LPs' entire reason to show up: it is the income that, hopefully, more than compensates them for impermanent loss and the opportunity cost of locking capital. The trader experiences it as a slightly worse exchange rate; in a constant-product pool the fee is removed from the input before the invariant is applied, so on the 0.3% tier only 99.7% of what you send actually moves the curve.

Uniswap v2 used a single flat 0.30% fee on all pairs, and the collected fees were simply added back into the reserves, compounding into the position automatically and slowly growing the invariant k. Uniswap v3 unbundled this into fee tiers — commonly 0.01%, 0.05%, 0.30%, and 1.00% — so that providers can charge little for stable, low-risk pairs (where competition is fierce and impermanent loss is small) and more for volatile, exotic pairs (where the risk and the spread are larger). In v3 fees accrue separately to each concentrated position rather than compounding into reserves, and must be collected explicitly.

The right fee level is an equilibrium: too high and traders route their volume to a cheaper venue, too low and LPs cannot cover their risk and withdraw, thinning the book. Many protocols also include a protocol fee switch, a governance-controlled toggle that diverts a fraction of the LP fee to the protocol treasury or token holders. Whether and when to activate that switch is one of the most contentious governance questions in DeFi, because it directly trades off LP retention against protocol revenue.

Fee revenue is path-dependent and volume-driven, while impermanent loss is endpoint-driven and price-driven. A pair can be 'profitable' over a choppy, high-volume week yet 'unprofitable' over a trending one with the same start and end price — same IL, very different fees.

Also called
swap feeLP fee兌換手續費