what is yield farming

What Is Yield Farming in Crypto?

Actively deploying crypto across DeFi protocols to maximize returns.

Not staking one token in one place and waiting. Moving capital wherever the best yield exists. Stacking reward layers on top of each other. Liquidity pool fees plus token emissions plus lending interest. All running on the same original capital simultaneously.

More moving parts. Higher potential returns. More ways to lose everything.

How It Works

Deposit tokens into a liquidity pool. Earn trading fees from every swap through the pool. Receive LP tokens representing the position.

Take those LP tokens. Stake them in a farming contract. Earn bonus reward tokens on top of the base fees.

Take the reward tokens. Deposit into a lending protocol. Earn interest on top of everything else.

Three protocols. Three yield streams. Same original capital working across all of them at once.

Where the Yield Comes From

Three sources. Which one is paying matters enormously.

  • Trading fees. Every swap through a liquidity pool generates a small fee. LPs earn a proportional share. Sustainable. Backed by real volume. More swaps, more fees.
  • Lending interest. Borrowers pay interest. Depositors collect it. Sustainable as long as genuine borrowing demand exists.
  • Token emissions. Protocol mints new tokens and distributes them to farmers as incentives. Most common source of eye-catching APY numbers. Least sustainable. New token getting printed constantly. Sell pressure built in from day one.

Real yield: fees and interest. Emission yield: a subsidy to attract liquidity. Subsidy ends or token collapses. APY disappears.

What Started It

Compound launched the COMP governance token in June 2020. Distributed it to anyone lending or borrowing on the protocol.

Using Compound suddenly paid you in tokens on top of the base interest. Capital flooded in. Every other protocol copied it immediately.

Uniswap. Aave. Yearn. SushiSwap. All launched tokens and distributed them to liquidity providers. DeFi Summer 2020.

Billions rotated across protocols chasing the highest emission rewards. APYs in the thousands of percent appeared. Most collapsed within weeks as token prices fell and capital moved on.

Real Example

Deposit $10,000 USDC into a Curve stablecoin pool to earn trading fees (about 2-5% in normal conditions).

Receive LP tokens and stake them via Convex Finance to boost CRV rewards and earn CVX incentives.

Combined yield can reach mid-single digits to low double digits depending on market conditions.

You can optionally lock CRV for veCRV to increase rewards, at the cost of long-term illiquidity.

This strategy uses multiple protocols and reward layers, with relatively low impermanent loss under normal conditions, but still carries risks including smart contract failure, stablecoin depegs, and reward token volatility.

The Risks

Smart contract exploits. Every protocol in the stack is another attack surface. Five protocols means five codebases that can fail. Harvest Finance, Cream Finance, Yearn vaults all exploited. Billions lost through farming-related hacks specifically.

Impermanent loss. Providing liquidity to volatile pairs. One token pumps while the other stays flat. AMM rebalances the position automatically. End up holding more of the underperformer. Fees sometimes offset it. Often don't.

Emission collapse. Rewards paid in a new protocol token. Token launches at $5. APY calculated at $5. Token drops to $0.20 during the farming period. Accumulated rewards worth a fraction of what the APY implied. Happened to almost every DeFi token in 2020-2021.

Liquidation. Some strategies borrow capital to amplify positions. Underlying drops. Collateral value drops. Position liquidated. Farming yield gone. Principal damaged.

Protocol rug. Newer farming protocols with unaudited contracts. High APY attracts deposits. Team drains the contract. Happened constantly during DeFi Summer and again through 2022.

Yield Farming vs Stakin

  • Staking locks tokens to secure a specific blockchain. One protocol. Mostly passive. Risk limited to price exposure and validator selection.
  • Yield farming actively moves capital across multiple DeFi protocols chasing the highest return. Multiple smart contract exposures. Requires monitoring, rebalancing, harvesting. Not passive.

Staking is the entry point. Yield farming is the advanced version with higher complexity and risk attached.

Auto-Compounding Vaults

Harvesting rewards manually means gas fees on every transaction. Time consuming. Easy to miss optimal timing.

Yearn Finance and Beefy automate it. Deposit once. Vault harvests, swaps rewards, reinvests automatically. Compounds continuously without touching anything.

Convenience adds another smart contract layer. Vault code on top of the underlying protocol. More complexity. More potential attack surface.

Most serious farmers use vaults for established strategies. Manual management for newer higher-risk positions where adding vault risk isn't worth it.

Yield Farming FAQ

Is yield farming profitable?

Depends on what's paying the yield, token prices during the farming period, and gas costs. Fee-based farming on established stablecoin pools can generate consistent returns. Chasing high emission APY on new volatile protocols usually ends badly once token prices collapse.