LLMs.txt: agent-readable Markdown index of this site at /llms.txt

Fees

Learn how swap fees, protocol fees, and fee tiers work across Uniswap v2, v3, and v4.

Every Uniswap swap pays a fee. That fee compensates liquidity providers (LPs) for the capital they deposit into pools, and in some cases a portion goes to the protocol itself. How fees are set, collected, and distributed varies by protocol version.

Swap Fees

A swap fee is charged on every trade and accrues to the LPs whose liquidity is active at the time of the swap. Fees are distributed pro-rata: the more liquidity you provide in the active price range, the larger your share.

In Uniswap v2, every pool charges a flat 0.30% fee that is automatically added to pool reserves. In v3 and v4, fees are collected separately and must be manually redeemed by the position owner.

Key difference: in v2, fees compound automatically because they increase k (the constant product invariant). In v3 and v4, fees accumulate as claimable balances tied to each position.

Pool Fee Tiers

Uniswap v2 has a single fee: 0.30% on every pool.

Uniswap v3 introduced fee tiers, allowing multiple pools for the same token pair, each with a different fee. The standard v3 tiers are 0.05%, 0.30%, and 1%. Additional fee tiers can be enabled by UNI governance.

Uniswap v4 removes fixed tiers entirely. Pool creators can set any fee from 0% to 100% in 0.0001% increments (hundredths of a bip), and pools can use dynamic fees that adjust in real time through hooks.

In-Range Liquidity and Fee Accrual

In v3 and v4, LPs choose a price range for their position. Only in-range liquidity, positions whose range spans both sides of the current spot price, earns fees. If the price moves outside a position's range, that position stops accruing fees until the price re-enters.

This means LP fee income depends on two factors: how much liquidity you provide, and how well your chosen range tracks the market price.

Protocol Fees

Protocol fees are how the protocol can capture a share of the value generated by trading activity.

On Uniswap, a swap fee has two components: an LP fee and, when enabled, a protocol fee. As of December 2025, protocol fees are active across Uniswap protocol versions.

In v2 and v3, the protocol fee is taken from the LP fee. In v4, the protocol fee is additive to what the swapper pays.

Overview of fees by version

  • v2: Same fee for every pool. When governance sets the feeTo address on the v2 factory, every v2 pair sends 1/6 of its swap fee to the protocol.
  • v3: Different fee per tier, applied automatically. An open adapter (V3OpenFeeAdapter) sets each pool's fee by tier. The pool contract only allows a rate between 1/4 and 1/10 of the swap fee.
  • v4: Set per pool by a separate governance contract. V4FeePolicy computes the fee and V4FeeAdapter enforces it, registered with the PoolManager as protocolFeeController. The PoolManager caps the fee at 0.1% of the swap amount.

Collected fees sit onchain in a contract called TokenJar. Anyone can claim them by burning the required amount of UNI through the Firepit contract.

VersionWhere it's setRateFunded by
v2feeTo on the factory, all pairs at onceFixed at 1/6 of the swap feeLPs
v3Per-pool bound, applied automatically via an open adapter1/4 to 1/10 of the swap fee, by tierLPs
v4V4FeePolicy / V4FeeAdapter, per poolUp to 0.1% of the swap amountSwapper (added on top)

For the pools that currently charge a protocol fee and their rates, read the values onchain or check the protocol fee contracts, which also cover how fees are collected and released. For a deeper dive on how protocol fees work, including the TokenJar/Firepit flow and the full v4 fee-resolution logic, see Uniswap Protocol Fees and Protocol Fee Configuration in the Protocol Fee docs.

Dynamic Fees (v4)

Uniswap v4 supports dynamic fees: swap fees that adjust based on market conditions, implemented through hooks. Unlike the static tiers in v3, dynamic fees can change per swap or on a schedule (per block, daily, weekly, etc.).

Dynamic fees are set at pool creation and managed by the hook contract attached to that pool. Two update methods are available: calling updateDynamicLPFee on the PoolManager, or returning a fee override from the beforeSwap hook.

Dynamic fees are distinct from protocol fees and hook fees. All three can coexist on the same pool.

Hook Fees (v4)

Hook fees are custom fees implemented entirely within a hook contract. They are separate from swap fees and protocol fees and don't interfere with the core fee structure.

Hook developers can use hook fees to monetize their hooks, redistribute value, or implement use-case-specific pricing. Hook fees are typically applied in beforeSwap using the BeforeSwapDelta mechanism.

For implementation details, see custom accounting.