How Yield Farming Works
Yield farming is one of those crypto concepts that gets talked about frequently and explained poorly. The term covers a range of distinct strategies, each with its own mechanics and risk profile, but they tend to get compressed into a single idea: deposit crypto somewhere and earn returns. That compression obscures the important distinctions between what you are actually doing, who is paying the yield, and where the risk sits.
The Core Mechanism
Yield farming, broadly defined, means deploying crypto assets into a protocol that generates a return in exchange for their use. The return comes from one of three sources: fees paid by protocol users, token emissions from the protocol itself, or interest paid by borrowers.
Understanding which of these is driving the yield matters more than the yield figure itself. Fee-based returns are sustainable by definition — they are paid out of economic activity happening on the protocol. Token emission-based returns are inflationary and depend on the continued value of the token being emitted. Interest-based returns depend on sustained borrowing demand. A yield figure in isolation tells you almost nothing about its durability or its actual source.
Liquidity Provision in Automated Market Makers
The most common form of yield farming involves providing liquidity to an automated market maker. An AMM is a type of decentralised exchange that uses a mathematical formula to price assets and execute trades rather than relying on an order book. The most widely used formula is the constant product formula, x × y = k, where x and y are the quantities of the two assets in a liquidity pool and k is a constant.
When you provide liquidity to an AMM pool, you deposit equal value of two assets — say ETH and USDC — into the pool contract. In exchange, you receive LP tokens representing your proportional share of the pool. Every trade that passes through the pool pays a fee, typically 0.3 percent on Uniswap V2 or varying fee tiers on Uniswap V3. Those fees accumulate in the pool and accrue to LP token holders proportionally.
The return from liquidity provision is therefore driven directly by trading volume through the pool. High-volume pools on major trading pairs generate meaningful fee income. Low-volume pools on exotic pairs may generate negligible fees.
The risk that liquidity providers face is impermanent loss. When the price ratio of the two pooled assets changes, an AMM's rebalancing mechanism means that liquidity providers end up holding more of the asset that declined and less of the asset that appreciated, compared to simply holding the two assets. This underperformance relative to a simple hold position is impermanent in the sense that it reverses if prices return to the original ratio, but it becomes permanent when the LP exits the position at the changed ratio. On volatile asset pairs, impermanent loss can exceed fee income significantly.
Concentrated liquidity, introduced by Uniswap V3, allows liquidity providers to concentrate their capital within a specific price range rather than distributing it across all possible prices. This increases capital efficiency and potential fee income when prices stay within the range, but creates total loss of fee income and maximum impermanent loss exposure when prices move outside it. Concentrated liquidity is a more complex and active strategy than providing liquidity across the full price curve.
Lending Protocol Yields
Lending protocols represent a structurally simpler form of yield farming. You deposit an asset — USDC, ETH, or a range of others depending on the protocol — and borrowers take it out, paying an interest rate that flows back to depositors.
Aave and Compound are the two largest lending protocols by total value locked. Both use algorithmically determined interest rates that adjust based on the utilisation ratio of each asset pool. When a high proportion of deposited assets are borrowed, the interest rate rises to attract more deposits and discourage additional borrowing. When utilisation is low, the rate falls. This mechanism means that lending yields fluctuate continuously with market conditions rather than being fixed.
The risk to lenders in lending protocols is smart contract risk — vulnerabilities in the protocol code — and, on some assets, liquidation risk if the protocol becomes undercollateralised. Well-established lending protocols with long track records and multiple audits have lower smart contract risk profiles than newer or less scrutinised alternatives, but the risk is never zero.
A second source of yield in lending protocols is token incentives. Both Aave and Compound have historically distributed governance tokens to users as an additional incentive on top of interest income. These token distributions represent inflationary yield: the protocol is printing tokens and distributing them to attract and retain liquidity. The value of this component depends entirely on the market price of the governance token, which can go to zero as several have done in market downturns.
Liquidity Mining and Token Incentives
Liquidity mining specifically refers to earning a protocol's native token as a reward for providing liquidity or using the protocol's services. It became the defining mechanic of DeFi Summer in 2020, when Compound's distribution of COMP tokens to its users triggered an explosion of activity as participants rushed to maximise token earnings.
The economic logic of liquidity mining is that a protocol uses its token supply to subsidise user acquisition. Early participants earn tokens at high effective yields because token supply is being distributed to a small base of users. As more capital enters to capture the yield, the tokens are distributed across a larger base and the effective yield per unit of capital falls. In many cases the token price also falls as early recipients sell, compressing the yield further.
The lifecycle of liquidity mining programmes has been studied extensively. High initial APYs attract capital. Capital entry compresses yields. Yield compression causes capital exit. Capital exit may cause the token price to fall further. At the end of this cycle, a protocol that built its TVL on token incentives rather than genuine fee generation often finds itself with far less capital than it had at peak. Protocols that generated genuine fee income through this period tend to retain users after incentives wind down. Protocols that did not are left with little organic demand.
Evaluating whether a quoted yield figure includes token emission components matters for assessing how stable that yield is. A lending protocol offering 12 percent APY, where 2 percent comes from interest income and 10 percent comes from token emissions, is a very different proposition from one offering 12 percent in fee income alone.
Yield Aggregators
Yield aggregators add a layer of automation on top of the underlying yield strategies. Instead of manually moving capital between protocols to chase the best available yield, a user deposits into a yield aggregator vault and the vault's strategy contracts handle the reallocation automatically.
Yearn Finance is the best-known yield aggregator. Its vaults accept deposits of a single asset and deploy them into whichever combination of lending and liquidity provision strategies the vault's strategy is configured to pursue. The vault claims rewards, sells them for more of the deposited asset, and reinvests, compounding the yield automatically.
The return from a yield aggregator is determined by the underlying strategies it runs and the gas costs of the automated transactions. Aggregators are more capital-efficient on larger deposits, because the fixed gas costs of automated transactions are proportionally smaller relative to the capital being managed. Small deposits in yield aggregators may have their returns substantially reduced by gas costs.
The risk profile of a yield aggregator is additive: it combines the smart contract risk of the aggregator itself with the smart contract risk of all the underlying protocols its strategies interact with. A vault that touches five different protocols has five separate surfaces where a vulnerability could result in fund loss.
How to Think About Risk-Adjusted Yield
The most important discipline in evaluating yield farming opportunities is denominating yield and risk in the same terms.
High yields in token terms mean little if the token in which yields are denominated falls significantly. Yield figures should be assessed in stable terms where possible: what is the effective yield in dollar or stablecoin terms, accounting for expected token price change? This calculation is speculative by definition, but it is more informative than ignoring token price dynamics entirely.
Risk should be assessed at the protocol level. How long has the protocol been live? Has the code been audited, and by whom? What is the track record on bug bounties and security incidents? What is the TVL trend — is capital entering or leaving? Has the yield figure been stable or is it highly variable?
The strategies that have delivered durable risk-adjusted returns in DeFi over multiple market cycles have generally been the least exciting ones: stable asset lending on established protocols, liquidity provision on high-volume pairs with contained impermanent loss risk, and yield aggregation on conservative strategies. The opportunities with the highest headline yields have, systematically, been the ones that carried risks the yield figure did not adequately reflect.
That pattern is not unique to crypto. It is the basic structure of risk and return in any financial market, and recognising it is the foundation of any rational approach to yield farming.