DeFi Yield Farming Basics: Liquidity Pools, APY, and Impermanent Loss

A clear intro to DeFi yield farming: how liquidity pools work, where yield comes from, impermanent loss math, and a risk checklist before providing liquidity.
Related tool
Crypto Portfolio

Track the total value of your cryptocurrency portfolio in USD, EUR or BRL.

What yield farming actually is

Yield farming describes depositing crypto assets into decentralized finance (DeFi) protocols — liquidity pools, lending markets, derivatives platforms — in return for fees, interest, or token emissions. The term became mainstream during the 2020 "DeFi summer" when Compound’s COMP distribution kicked off a wave of incentive programs.

Yield farming is not a product; it is a strategy. The actual income can come from trading fees, lending interest, protocol token emissions, or a stack of all three. The nature of the yield determines both its sustainability and its risk profile.

How liquidity pools work

An automated market maker (AMM) pool holds two or more tokens in a mathematical relationship — most commonly x × y = k, the constant-product formula popularized by Uniswap. When a trader swaps one token for the other, the ratio shifts along the curve and the pool charges a small fee that accrues to liquidity providers.

Providers deposit equal value of each token (in a 50/50 pool) and receive LP tokens representing their share. Redeeming LP tokens returns a proportional slice of whatever the pool currently holds — which may be a different mix than what was deposited.

Where the yield comes from

Not all APY is the same kind of money. A sustainable yield farm generally combines multiple sources, with each contributing visibly to the quoted rate.

  • Trading fees: 0.01% to 1% per swap, split among LPs in proportion to their share
  • Lending interest: paid by borrowers in overcollateralized loan markets
  • Token emissions: protocol-native tokens distributed to LPs as incentives (often inflationary)
  • Bribes: external parties paying LPs to direct vote weight in governance-driven reward systems

APR vs APY and emission decay

APR is the flat annualized rate; APY compounds. On a 100% APR farm, monthly compounding yields an APY of about 171%. Dashboards often quote the more flattering APY; some calculate it assuming instant reinvestment that is impractical on high gas-fee networks.

Emission-based yields also decay. A pool paying 200% APY on day one typically pays 30% after a month, as more LPs dilute the fixed reward stream and token price softens. The sticker rate is a starting snapshot, not a forecast.

Impermanent loss explained

Impermanent loss (IL) is the opportunity cost of providing liquidity instead of simply holding the two assets separately. When the price ratio of the two pool assets changes, arbitrageurs rebalance the pool, and LPs end up with more of the falling asset and less of the rising one.

For a 2x price divergence, IL is about 5.7%. For a 5x divergence, it reaches 25%. IL is only "impermanent" if prices return to the deposit ratio — in practice, it often doesn’t, and the LP realizes the loss on withdrawal.

  • 1.25x price change: ~0.6% IL
  • 1.5x: ~2.0% IL
  • 2x: ~5.7% IL
  • 3x: ~13.4% IL
  • 4x: ~20.0% IL
  • 5x: ~25.5% IL

Risk categories beyond IL

IL is the most visible risk, but not the largest one historically. Smart-contract exploits have cost LPs billions cumulatively across DeFi history. Oracle manipulation, governance attacks, and rug pulls add layers that have nothing to do with the AMM math.

  • Smart-contract bugs: audit quality and bug bounties are only partial mitigations
  • Oracle risk: thinly-traded reference prices can be manipulated in a single block
  • Governance risk: concentrated token ownership can approve malicious upgrades
  • Stablecoin depegging risk in stable-stable pools
  • Bridge risk for wrapped assets
  • Regulatory risk: retroactive sanctions on protocols (Tornado Cash precedent)

Due diligence checklist

Before depositing, answer every question below. If any is unclear, the farm is probably too risky for the yield on offer.

  • How long has the protocol been live? (<6 months = high risk)
  • Who audited it? Are the reports public and recent?
  • Is there a bug bounty with meaningful payouts?
  • How is the reward token distributed? What is its emission schedule?
  • What is the realistic sustained APY after emissions end?
  • Is TVL concentrated in a few whales? (Concentration = exit risk)
  • What does the impermanent loss look like for realistic price moves?
About the author
RC
Renato Candido dos Passos
Fundador e especialista em Blockchain, Fonoaudiologia e Finanças

Founder of UtilizAí, with a background in Blockchain, Cryptocurrencies and Finance in the Digital Era, plus complementary studies in Theology, Philosophy and ongoing coursework in Speech-Language Pathology. Learn more.

Frequently asked questions

Are stable-stable pools safe?

Safer than volatile pairs regarding impermanent loss, but not risk-free. USDC/USDT pools still carry issuer risk for both stablecoins, and events like the March 2023 USDC depeg showed that stable-stable pools can suffer real IL when one leg breaks its peg.

What APY is realistic long-term?

Double-digit sustained APYs are rare once token emissions end. Mature stablecoin pools on established AMMs typically generate 2–8% from fees alone. Anything above 20% sustainably almost always includes meaningful tail risk you should be able to identify.

Is yield farming still worth it in 2026?

It depends entirely on the farm. Blue-chip LP positions on mature AMMs with established volume can provide reasonable fee income. High-APY farms on new protocols remain high-risk speculation. Sizing and diversification matter more than any single opportunity.

How do I calculate impermanent loss precisely?

For a 50/50 constant-product pool, IL = 2×√(p)/(1+p) − 1, where p is the price ratio change. At p=2, IL ≈ −5.72%. Tools like an IL calculator or DeFi Llama’s simulator can model specific pools numerically.

What happens if a protocol gets exploited?

You may lose some or all deposited funds. Some protocols maintain insurance funds; third-party insurance (Nexus Mutual, InsurAce) can cover certain smart-contract failures for a premium. Without insurance, losses are typically unrecoverable.

Related tools

Related guides