Yield farming and liquidity pools โ LP tokens, impermanent loss, and strategies
- LP tokens represent your proportional share of a pool's assets and accumulated trading fees.
- Impermanent loss formula: 2*sqrt(r)/(1+r) - 1 where r is the price ratio change โ direction does not matter.
- Sustainable DeFi yield is under 20% โ anything higher is temporary, inflationary, or hiding risk.
Yield farming is putting your crypto assets to work in DeFi protocols to earn returns. Instead of tokens sitting idle in a wallet, you deposit them into liquidity pools, lending protocols, or staking contracts that pay you fees, interest, or governance tokens.
This lesson covers the exact mechanics, the math behind impermanent loss, and how to evaluate whether a yield opportunity is genuinely profitable or a trap.
How liquidity pools and LP tokens work
A liquidity pool is a smart contract holding two or more tokens. When you deposit, you receive LP tokens representing your share:
- Trading fees โ Uniswap V2 charges 0.3% per trade, distributed proportionally to all LPs
- LP tokens โ represent your share of the pool. 10% of LP supply = 10% of all pool assets and fees
- Proportional deposits โ you must deposit equal value of both tokens at current prices
- Arbitrage โ bots keep pool prices aligned with centralized exchanges by exploiting differences
// Calculate LP token value and your share
const poolReserveETH = 1000; // 1000 ETH in pool
const poolReserveUSDC = 2000000; // 2M USDC in pool
const totalLPSupply = 44721; // total LP tokens
// You hold 447.21 LP tokens (1% of supply)
const myLPTokens = 447.21;
const myShare = myLPTokens / totalLPSupply; // 0.01 = 1%
const myETH = poolReserveETH * myShare; // 10 ETH
const myUSDC = poolReserveUSDC * myShare; // 20,000 USDC
console.log(`Your share: ${(myShare * 100).toFixed(2)}%`);
console.log(`Your ETH: ${myETH}`);
console.log(`Your USDC: ${myUSDC}`);
console.log(`Total value: $${myETH * 2000 + myUSDC}`);Impermanent loss: the math
Impermanent loss occurs when the price ratio of your deposited tokens changes from your entry point:
You deposit: 1 ETH ($2,000) + 2,000 USDC = $4,000 total
Scenario: ETH price doubles to $4,000
If you just HELD (no LP):
1 ETH x $4,000 = $4,000 + 2,000 USDC = $6,000
As LP (pool rebalances via x*y=k):
Pool must maintain constant k
New ratio: ~0.707 ETH + ~2,828 USDC = $5,657
Impermanent loss: $6,000 - $5,657 = $343 (5.72%)
IL formula for any price change:
IL = 2*sqrt(priceRatio) / (1 + priceRatio) - 1
2x price change: IL = -5.72%
3x price change: IL = -13.4%
5x price change: IL = -25.5%// Impermanent loss calculator function
function impermanentLoss(priceRatio) {
return 2 * Math.sqrt(priceRatio) / (1 + priceRatio) - 1;
}
// Examples
console.log('2x price:', (impermanentLoss(2) * 100).toFixed(2) + '%');
console.log('3x price:', (impermanentLoss(3) * 100).toFixed(2) + '%');
console.log('0.5x price:', (impermanentLoss(0.5) * 100).toFixed(2) + '%');
// Note: 2x and 0.5x give the same IL โ direction doesn't matterThe loss is 'impermanent' because if prices return to your entry ratio, the loss disappears. It becomes permanent when you withdraw. Trading fees may offset IL in high-volume pools.
Yield farming strategies ranked by risk
Common strategies from safest to riskiest:
- Stablecoin lending (lowest risk) โ deposit USDC into Aave for 2-6% APY. No impermanent loss, minimal price risk.
- Liquid staking (low-moderate risk) โ stake ETH via Lido (stETH) for ~3-4% APY, then use stETH in other DeFi protocols.
- Blue-chip LP (moderate risk) โ provide ETH/USDC liquidity on Uniswap. Trading fees offset some impermanent loss.
- Incentivized farming (moderate-high risk) โ deposit in pools offering extra token rewards. APY looks high but reward tokens often depreciate.
- Leveraged farming (high risk) โ borrow against LP positions to farm more. Amplifies returns AND losses. Liquidation risk.
- New protocol farming (highest risk) โ farm unaudited protocols for extreme APY. Most lose money or get exploited.
Explore Crypto Trading
Cryptocurrency trading is one of the fastest-growing financial markets โ open 24/7, globally accessible, and full of opportunity for those who learn the fundamentals first.
- Trade spot, futures & copy-trading on one platform
- Start with as little as $10 โ practice risk-free on the testnet
- Built-in TradingView charts, grid bots & DCA tools
Evaluating yield: APR vs APY and red flags
Before depositing anywhere, check:
- APR vs APY โ APR is simple interest; APY includes compounding. 50% APR compounded daily = ~64% APY. Protocols show the higher number.
- Source of yield โ is it from real economic activity (trading fees, lending interest) or just token emissions? Emission-based yield is inflationary.
- TVL trend โ declining TVL means LPs are leaving. Ask why.
- Audit status โ has the protocol been audited? By whom? How recently?
- Token price trend โ if the reward token is down 90% from launch, that 500% APY is meaningless.
Rule of thumb: sustainable DeFi yield is under 20%. Anything above is either temporary, risky, or the reward token is depreciating faster than you earn it.
When evaluating yield farming, start with the fundamentals: what problem it solves, who it serves, and how it compares to the alternatives buyers consider first.
Start with the fundamentals. Define who you are serving, the single outcome you want, and the budget you are comfortable committing before you compare any options.
A practical rule is to favour clarity over cleverness. The choice that is easiest to understand, spell, remember and act on tends to win over the long run.
Context changes the answer. What is optimal for a fast-moving startup is rarely optimal for an established brand, so weigh your own stage, market and ambitions.
Avoid the common mistakes: rushing the decision, copying competitors blindly, and ignoring the total cost of ownership beyond the very first year of use.
Think in terms of trade-offs rather than a single perfect answer. Every option trades memorability, cost, reach and flexibility in a slightly different mix.
Document your reasoning. Writing down why you chose one path makes it far easier to revisit the decision later and to explain it to partners and investors.
Test with real people. A quick check with a handful of your actual customers will surface problems that no amount of internal debate ever reveals.
Plan for growth. The option that fits today should still make sense when your audience, catalogue or team is several times larger than it is right now.
Finally, revisit the decision periodically. Markets, tools and best practices move quickly, and a choice that was ideal last year may deserve a fresh look today.
When evaluating yield farming, start with the fundamentals: what problem it solves, who it serves, and how it compares to the alternatives buyers consider first.
Start with the fundamentals. Define who you are serving, the single outcome you want, and the budget you are comfortable committing before you compare any options.
WSOT 2026: Squad Leader Slots Are Open โ Up to $128,000 per Leader
Join NowFrequently asked questions
Is providing liquidity profitable?
It depends on the pool. High-volume stablecoin pairs (USDC/USDT on Curve) earn consistent fees with minimal IL. Volatile pairs can suffer impermanent loss exceeding fee income. Always model IL against expected fees before committing capital.
What is the safest way to earn yield?
Stablecoin lending on established protocols (Aave, Compound) is the lowest risk โ typically 2-6% APY. You avoid impermanent loss and price volatility, bearing only smart contract risk.
Why do some farms show 1000% APY?
Extremely high APY comes from token emissions โ the protocol prints tokens and gives them to you. Heavy selling pressure from farmers dumping rewards usually crashes the token price, making the real return far lower than advertised.
Free Courses โ Learn New Skills
No sign-up · No fees · Learn at your own pace
Start Trading
Trade crypto and premium domains โ digital assets with real opportunities.
๐ Need a custom article?
Our editorial team writes it for you โ carefully crafted, SEO-optimized, about your topic, your domain name or your service. Multiple languages available. From $15 per language.
Find your name on Atom
DominantBrand curates the best premium, brandable names from Atom.com — the marketplace with a free AI appraisal, a USPTO trademark check, and secure escrow. Every listing even ships with a designed logo.