Developers

Liquidity pools

Last reviewed 1 December 2026.

Information, not advice. This page explains how documented automated market makers (AMMs) hold reserves and how liquidity can be withdrawn. It is not financial, legal, investment, or tax advice. It is not a recommendation to provide liquidity, trade, or use any pool. Providing liquidity can lose value relative to holding the assets, including through impermanent loss, fees that do not offset that loss, smart-contract risk, and fraud.

Safety: This site will never ask you to enter a seed phrase, private key, or wallet backup. Do not “validate” a pool or “claim LP rewards” on a site that asks for a recovery phrase. Approving a token spender is a signing action; check the spender address against official documentation.

A liquidity pool is a smart contract (or Solana program account) that holds reserves of two or more assets so that traders can swap against those reserves. The people or programs that deposited the reserves are liquidity providers (LPs). What an LP actually holds afterwards is not “a share of the market” in the abstract: it is an LP token or a position NFT (or equivalent) that the protocol uses to authorize withdrawal.

If you do not yet know how the deposited tokens themselves work, read the token issuance overview first — especially ERC-20 and SPL.

Constant product (Uniswap v2 and its relatives)

Uniswap Labs' documentation of impermanent loss states the constant-product rule used by Uniswap pools: x * y = k.

  • x is the reserve of token0
  • y is the reserve of token1
  • k is the product the pool keeps (fees aside) as swaps change the reserves

A trader who sells token0 into the pool increases x and decreases y so that the product remains k (in the no-fee idealization). The implied price is the reserve ratio. Official Uniswap v2 material on understanding returns describes the same invariant and the LP tokens the contract mints to bookkeep each provider's share of the pool.

Those LP tokens are themselves ERC-20 balances. Whoever can spend them can redeem a corresponding share of the current reserves. That fact is the mechanical core of many “rug pulls,” discussed below.

Uniswap v3 and v4, briefly

Uniswap's concentrated liquidity documentation describes Uniswap v3 as letting an LP allocate liquidity to a chosen price range, bounded by lower and upper ticks, instead of the full range. Liquidity earns fees only while the pool price is inside that range. If the price moves out, the position becomes one-sided and does not earn swap fees until the price returns (or the LP moves the range).

Uniswap Labs' impermanent-loss article notes that concentrating liquidity in a range can increase the chance of impermanent loss, and that v3 and v4 allow positions across multiple ranges.

Uniswap v4 introduces a singleton PoolManager that holds pool state, and optional hooks: external contracts attached when a pool is initialized, which can run at lifecycle points such as initialize, add/remove liquidity, and swap. Official docs say a hook cannot be added to an existing pool; you create a new pool with the hook you want. Anyone reviewing a v4 pool needs to read the hook contract, not only the pool fee tier.

This page does not document every v3 or v4 instruction. Use the official protocol docs for integration.

Raydium on Solana

Raydium's official pool-type documentation describes three AMM programs that run in parallel:

  • CPMM — a standard x * y = k constant-product pool. A deposit of both tokens at the current ratio mints fungible LP tokens. Official docs say CPMM supports Token-2022. Fees are described as compounding into reserves.
  • CLMM — a concentrated-liquidity pool in the same family of design as Uniswap v3. A position is a NFT, not a fungible LP token, and official docs say fees must be claimed; they do not auto-compound. Liquidity earns fees only while the price is in range.
  • AMM v4 — the older hybrid that official docs describe as coupling a constant-product curve with an OpenBook orderbook. The same page says it is no longer the default for new pools, and that new pairs today go to CPMM or CLMM.

Official Raydium docs also note that farm staking for their v6 farms uses CPMM / AMM v4 LP tokens, not CLMM position NFTs. When you inspect “who can withdraw,” look at the right object: the LP mint holders for CPMM, or the position NFT owner for CLMM.

This page does not reproduce Raydium fee-tier or APR illustrations.

Impermanent loss (labelled hypothetical)

Uniswap Labs defines impermanent loss as the loss of value for a liquidity provider when the prices of tokens in the pool change from what they were when the liquidity was added, compared with the situation after that change. Their article states that if the price returns to the original level, that difference can disappear — which is why it is called impermanent. Fees are a separate effect and may or may not offset the difference.

The following arithmetic is a hypothetical illustration constructed only from the official invariant x * y = k. It is not market data, not a forecast, and not a recommendation to provide liquidity. Fees, slippage, and gas are ignored so the invariant is visible.

Hypothetical. A provider deposits 10,000 units of Token A and 10 units of Token B into a constant-product pool, and we track that deposit as the entire pool so the shares stay simple. Then:

  • k = 10,000 * 10 = 100,000
  • The implied pool price is 1 Token B = 1,000 Token A

Now suppose trading (by other users) moves the implied price to 1 Token B = 2,000 Token A, while k remains 100,000. The reserves must satisfy A / B = 2,000 and A * B = 100,000:

  • B = sqrt(100,000 / 2,000) = sqrt(50) ≈ 7.071
  • A = 100,000 / 7.071 ≈ 14,142

If the provider withdraws at that moment, they receive about 14,142 A and 7.071 B.

Measure both outcomes in Token A at the new price of 2,000 A per B:

  • Value of the withdrawn pool share: 14,142 + 7.071 * 2,000 ≈ 28,284 A
  • Value of instead holding the original 10,000 A and 10 B: 10,000 + 10 * 2,000 = 30,000 A

The withdrawn share is about 5.7% less than holding, in this fee-free, 2× price-change hypothetical. Official Uniswap v2 discussion of returns presents the same directional result for a doubling of price, and notes that a move of the same factor down produces the same percentage gap in this model.

Concentrated positions change the numbers: official Uniswap and Raydium docs both describe amplification of the effect inside a narrow range, and zero fee earnings while out of range. This page does not invent a concentrated-liquidity formula beyond that qualitative official statement.

Rug pulls, honeypots, and leftover authorities

Uniswap Labs' article on unsellable token scams describes two mechanisms that often appear together:

  • A honeypot (unsellable token): the token contract lets a victim buy, then blocks or cripples sells — for example with a very high sell fee, or a whitelist or blacklist. A common wallet error is that a swap is expected to fail.
  • A rug pull, in the sense used there: after the victim has purchased, the scammers remove the liquidity in the pool, taking the valuable reserve asset and leaving a token that no longer has a meaningful pool to sell into.

Those are not failures of x * y = k. They are permissions: the token contract can restrict transfers, and the holder of the LP token or position can withdraw reserves.

Related privileges, documented on the token side rather than the AMM side:

  • Mint authority — if someone can still mint the traded token, they can create new units and sell them into the pool. On Solana this is the mint's mintAuthority (Set Authority; revocation to None is permanent). On Ethereum-family tokens, it is whatever mint function the verified source exposes.
  • Freeze authority (Solana) or pause / blacklist functions (many ERC-20-like contracts) can stop holders from transferring, which also stops honest sells.

ethereum.org's guide to identifying scam tokens adds a further point: name and symbol can be copied; the contract address cannot. Scam tokens may also fake transfers or balances in their own contract storage. Always start from an address published by the issuing project, not from a ticker search.

How to check withdrawal control and authorities

There is no single official “this pool is safe” badge. The checks below use official explorers, official program docs, and verified source. Third-party “honeypot detectors” and “token sniffers” are not used as authorities here. Uniswap Labs itself notes that such third-party tools can be inaccurate and that it is not affiliated with them.

Who can remove liquidity?

  • Uniswap v2-style pools (including many ERC-20 AMMs): the pool contract is (or issues) an LP ERC-20. On a block explorer, open the pair / LP token and look at holders. Anyone holding a balance can, in the ordinary protocol design, burn it and withdraw a proportional share of reserves.
    • If LP tokens were sent to a recognizable burn address, those shares cannot later be used to withdraw (the tokens are not spendable). Confirm the address and the balance on the explorer; do not trust a website badge alone.
    • If LP tokens sit in a “locker” or timelock contract, that contract — not the AMM — is now the withdrawal policy. Read the verified source of the locker, the beneficiary, and the unlock time. This site does not endorse any locker vendor. Unverified lockers can release early, to a different address, or not be a locker at all.
  • Uniswap v3: a position is an NFT. On the explorer, see who owns the position token id. That owner can decrease or collect liquidity for that range.
  • Uniswap v4: positions are managed through the official PoolManager / position accounting and any hook. Read official v4 docs and the hook source.
  • Raydium CPMM: fungible LP tokens, same holder analysis as above, with Solana explorers and official RPC.
  • Raydium CLMM: the position NFT owner can withdraw.

A pool can look deep in reserves and still be withdrawable in one transaction if a single holder (or a locker that has unlocked) controls most of the LP supply or the position NFT.

Mint, freeze, and token-level traps

  • Solana: use official tools, for example spl-token display <MINT> (add --program-2022 for Token-2022) or a getMint fetch, and read mintAuthority and freezeAuthority. Null means that role was revoked. For Token-2022, also read enabled extensions (transfer fees, transfer hooks, permanent delegate, pausable, non-transferable) as described in official extension docs.
  • Ethereum-family tokens: use a block explorer's verified source and read functions such as mint, burn, pause, blacklist, setFee, and renounceOwnership. If source is unverified, you cannot check this from the ABI name alone. Then check whether the admin role is still assigned.
  • Approvals: a token you already hold can still be taken if you approved a spender. ethereum.org warns about cloned interfaces that request allowances. Review and revoke allowances with a wallet you already trust, not with a new “drainer checker” site you were sent in chat.

None of these checks can prove that a token is a good project. They can only show whether known, mechanical privileges are still live.

Scam red flags

  • A site or assistant that asks for a seed phrase to “add liquidity,” “lock LP,” or “verify a honeypot.”
  • A token you can buy in one click but cannot sell, or that a wallet flags with a 100% sell fee, as described by Uniswap Labs.
  • LP tokens or a position NFT still sitting in an ordinary project wallet after a claim that “liquidity is locked forever.”
  • A locker contract that is unverified, upgradeable in a way that changes the unlock rules, or owned by an unnamed key.
  • Mint or freeze authority still set on a token that was advertised as fixed-supply or unfreezable. Check the mint or the verified source, not a marketing graphic.
  • A familiar ticker at a new contract or mint address, or a tiny pool that moves sharply on a small test swap — both called out in ethereum.org's scam-token guide.
  • Requests for unlimited approve or for a Solana token-account delegation on a site you reached from a DM.

Read next

Token issuance overview · ERC-20 · SPL Token and Token-2022 · Tools

Sources