DeFi & Yield Farming

Liquidity Pool Math: How Pool Share and Fees Are Calculated

By HealthShaper Hub · · How we check facts

Liquidity pool math explained: how automated market makers calculate your pool share from LP tokens, and how trading fees accrue to that share over time.

Diagram of a liquidity pool showing deposit ratio, LP tokens minted, resulting pool share and accrued trading fees

Key takeaways

  • Pool share equals your LP tokens divided by the total LP token supply, not your deposit divided by total value directly.
  • Depositing 5 ETH + $10,000 USDC into a 500 ETH / $1,000,000 USDC pool with 100,000 LP tokens mints 1,000 tokens, a 0.99% share.
  • At a 21.68% fee APR, that 0.99% share earned $356.44 in fees over 30 days on a $20,000 deposit.
  • Depositing at the wrong ratio doesn't buy extra pool share — minting uses whichever token contributes the smaller ratio.
  • Your percentage share dilutes whenever new liquidity is added by others, even if your own token balance never changes.
On this page
  1. What a liquidity pool actually holds
  2. How pool share is calculated when you deposit
  3. How trading fees accrue to your share
  4. Why pool share dilutes even when your tokens don’t move
  5. Common mistakes with pool math
  6. The bottom line
  7. Frequently asked questions
  8. Sources

What a liquidity pool actually holds

A liquidity pool on an automated market maker (AMM) is a pair of token reserves locked in a smart contract, plus a running total of “LP tokens” that record who owns what fraction of those reserves. Trades don’t move through an order book matching buyers and sellers; instead, a trader swaps against the pool itself, and the pool’s own formula sets the price.

Uniswap’s documentation for its constant-product design describes the core rule as x × y = k: the two reserve balances, multiplied together, must stay equal to a constant, k, before and after every trade (ignoring the fee). If a trader buys ETH from a pool, they add USDC to one reserve and remove ETH from the other, and the amount removed is whatever keeps x × y equal to k. Larger trades move the price more than smaller ones, because a bigger shift in one reserve requires a bigger offsetting shift in the other to hold the product constant.

This is the same mechanism behind impermanent loss: the pool automatically rebalances as prices move, buying the falling asset and selling the rising one relative to a simple buy-and-hold position. Pool share math, covered below, is the other half of the picture — what you actually own of that constantly rebalancing pool.

How pool share is calculated when you deposit

When you deposit into an existing pool, the contract mints new LP tokens and sends them to you. Per Uniswap’s documentation, those tokens “entitle [depositors] to a proportional share of the liquidity available in the pool,” and if other providers later add or remove liquidity, tokens are minted or burned so that “everyone’s relative percentage share of the liquidity pool remains the same.”

The minting rule itself is simple division. If you deposit an amount of token X, and the pool already holds a reserve of X with a total LP token supply outstanding, your new tokens equal:

new LP tokens = your deposit of X ÷ pool’s reserve of X × current total LP token supply

When you deposit both tokens in the pool’s exact current ratio, the same answer comes out whether you compute it from token X or token Y, and it also equals your deposit’s dollar value divided by the pool’s total value before you joined.

Example: Suppose an ETH/USDC pool holds 500 ETH and $1,000,000 USDC (ETH at $2,000), with 100,000 LP tokens outstanding. You deposit 5 ETH and $10,000 USDC, matching the pool’s 1:2,000 ratio exactly.

Computing the mint amount both ways:

CheckCalculationResult
Via ETH side5 ÷ 500 × 100,0001,000 LP tokens
Via USDC side10,000 ÷ 1,000,000 × 100,0001,000 LP tokens
New total LP supply100,000 + 1,000101,000
Your pool share1,000 ÷ 101,0000.99%
From deposit to fee income, step by step
  1. Pool reserves: 500 ETH + $1,000,000 USDC
  2. Deposit 5 ETH + $10,000 USDC, matching the ratio
  3. LP tokens minted: 1,000 of 101,000 total
  4. Pool share = 1,000 ÷ 101,000 = 0.99%
  5. 30-day fees at a 21.68% fee APR: $356.44
  6. Ending value: $20,000 + $356.44 = $20,356.44
A hypothetical 5 ETH + $10,000 USDC deposit into an existing ETH/USDC pool.

Both sides agree because the deposit matched the pool’s ratio. If your two amounts don’t match, the contract can only credit you based on whichever side represents the smaller proportional contribution; most wallet front-ends handle this by swapping part of your deposit first so it arrives at the pool balanced, but the underlying math never rewards an unbalanced deposit with extra pool share.

How trading fees accrue to your share

Fees are where a pool share turns into an actual return. According to Uniswap’s documentation, a percentage of each trade, historically 0.30% on its constant-product pools, “is distributed proportionally to all liquidity providers” holding a stake in that pool. Concentrated-liquidity designs work similarly in principle but only pay fees to liquidity positions that are active at the current price, and Uniswap v3 fee tiers commonly run from 0.01% up to 1%, with stable pairs typically at the lower end.

Continuing the example above, suppose the pool’s total value after your deposit is $2,020,000 (the prior $2,000,000 plus your $20,000), and it processes $400,000 in trading volume per day at a 0.30% fee. That works out to a 21.68% fee APR on the pool’s value, and your 0.99% share earns a proportional slice of it every day.

StepCalculationResult
Daily fee revenue (pool-wide)$400,000 × 0.30%$1,200.00
Your daily share of fees$1,200.00 × 0.99%$11.88
Fees over 30 days$11.88 × 30$356.44
Ending position value$20,000.00 + $356.44$20,356.44

That $356.44 assumes the ETH/USDC price ratio doesn’t move, which isolates the fee math from impermanent loss. In practice the two interact: fees add to your position continuously, while any price move between the two tokens pulls the other way. Run a full impermanent loss calculation alongside this fee math before sizing a real deposit, and see how impermanent loss is calculated for the reserve-rebalancing side of the same pool.

Why pool share dilutes even when your tokens don’t move

A subtlety worth internalizing: your LP token balance only changes when you deposit or withdraw, but your percentage share of the pool changes constantly as other people deposit and withdraw around you. If another provider adds liquidity equal to 5% of the pool’s current LP token supply, the total supply grows by that much, and every existing holder’s percentage share falls proportionally, even though the tokens they hold still represent the same underlying claim, reserves plus accrued fees, that they had a moment before.

This matters most for headline “share of pool” numbers shown in a wallet interface at the moment of deposit. That figure is a snapshot, not a fixed entitlement, and it will drift as the pool’s total LP supply changes over your holding period. Some of that pool math also underpins lending markets, where your share of a lending pool determines your share of interest paid by borrowers rather than swap fees; see our guide to DeFi lending and borrowing rates for how that side of the math differs.

Common mistakes with pool math

  1. Treating “share of pool” as fixed. It moves every time total LP supply changes, not only when you personally deposit or withdraw.
  2. Assuming an unbalanced deposit earns more. Minting always uses the more limiting ratio; extra value on one side buys you nothing extra.
  3. Confusing the fee tier with your actual yield. A 0.30% fee tier tells you the rate charged per trade, not your annualized return, which depends on trading volume relative to pool size.
  4. Ignoring that fee income and impermanent loss move independently. A pool can post a healthy fee APR and still leave you behind a simple hold if the price ratio moves far enough; check both, as covered in our yield farming guide.
  5. Skipping the contract’s own risk profile. Pool math tells you what a position is worth if the contract behaves as designed; it says nothing about exploit risk, which our smart contract risk checklist covers separately.

The bottom line

Pool share is LP tokens minted divided by total LP tokens outstanding, and it dilutes as other providers come and go, independent of your own balance. Fee income is that share multiplied by the pool’s fee revenue over a period, and it has to be weighed against impermanent loss, not treated as the whole return, before the math tells you whether providing liquidity actually beat holding.

Frequently asked questions

How is liquidity pool share calculated?

Pool share is your LP tokens divided by the total LP token supply after your deposit, not simply your deposit value divided by total pool value, though the two work out the same when you deposit at the pool's current ratio. If a pool has 100,000 LP tokens outstanding and your deposit mints 1,000 new ones, your share is 1,000 divided by 101,000, about 0.99%, even though your capital is a slightly different fraction of the pool's value before you joined.

What are LP tokens and what do they represent?

An LP token is a receipt an automated market maker mints when you deposit into a pool, representing a claim on your pro-rata portion of that pool's reserves. It is not a fixed amount of either underlying token; redeeming it later returns whatever ratio of the two assets the pool holds at that moment, which shifts as trades move the reserves and as fees accumulate.

How are trading fees distributed to liquidity providers?

Each swap through a pool pays a fee, commonly around 0.30 percent of the trade in older constant-product pools, split proportionally among everyone holding a stake in that pool at the time. In some designs the fee is added directly to the reserves so it compounds automatically; in others it accrues separately and has to be claimed. Either way, a larger pool share earns a larger slice of every fee collected.

Does depositing at the wrong token ratio give me a bigger pool share?

No. If your two deposit amounts don't match the pool's current reserve ratio, the contract mints LP tokens based on whichever token represents the smaller proportional contribution, so you gain nothing by over-depositing the other side. Most front-ends convert an unbalanced deposit into a balanced one before it reaches the pool, but the underlying math treats the limiting side as what counts.

Why does my pool share go down even though my LP token balance stays the same?

Pool share is a ratio, not a fixed quantity. When other liquidity providers deposit, the total LP token supply grows while your own token count is unchanged, so your percentage of the pool falls even though the tokens you hold, and what they represent in reserves plus accrued fees, have not been taken from you.

Sources

  1. How Uniswap Works — Uniswap Labs — docs.uniswap.org
  2. Understanding Returns — Uniswap Labs — docs.uniswap.org
  3. Fees — Uniswap Labs — docs.uniswap.org

This content is for education only and is not financial, investment, tax or legal advice. Crypto assets are volatile and you can lose money. Examples use hypothetical numbers. See our disclaimer and editorial policy.