Hashtag Web3 Logo

Hashtag Web3 / Updated

DeFi Yield Farming Explained - How It Works, Yields, and Risks in 2026

DeFi yield farming is putting crypto to work in lending pools, liquidity pools, and vaults to earn fees and interest. Learn where yield comes from, how APY works, real 2026 return ranges, and the risks to check before you deposit.

DeFi Yield Farming Explained - How It Works, Yields, and Risks in 2026 - Hashtag Web3 article cover

DeFi yield farming is the practice of depositing crypto into DeFi protocols to earn a return from trading fees, lending interest, or token incentives. You supply assets to a pool or vault, the protocol puts them to work for traders and borrowers, and you earn a share of the revenue.

In 2026, realistic yields range from 3 to 5 percent APY on stablecoin lending to 5 to 25 percent on more active strategies that carry more risk. The era of sustained 1,000 percent APY from token printing is over because those returns came from inflation, not revenue, and most of those pools collapsed when the reward token price fell.

What yield farming is

Yield farming covers several related actions. You provide liquidity to a decentralized exchange. You supply assets to a lending market. You stake LP tokens or deposit into an automated vault that routes funds across protocols. In each case you are paid for making capital available to others who pay to use it.

The key question to ask about any farm is: where does the yield come from? If you cannot answer it, assume you are the source of the yield.

There are two broad sources:

  • Real yield. Fees paid by traders on a DEX, interest paid by borrowers on Aave or Compound, and network staking rewards. This yield is sustainable while the activity continues.

  • Inflationary yield. Token emissions paid to attract deposits. A new protocol mints its own token and gives it to depositors as a subsidy. This boosts headline APY but creates sell pressure when farmers sell the reward token.

Most farms in 2026 mix both. A Curve stable pool might pay 2 to 4 percent base from trading fees plus 1 to 5 percent in CRV incentives directed by veCRV gauge votes. Yearn vaults aggregate those returns and compound them, net of fees.

Who it is for

Yield farming suits active crypto users who already use self-custody wallets, understand that DeFi has no deposit insurance, and can tolerate smart contract risk and price volatility.

Good fits:

  • Holders of ETH, stablecoins, or liquid staking tokens who want to earn 3 to 8 percent on idle assets and are willing to monitor positions weekly. Stablecoin lending on Aave or Morpho and stable swaps on Curve are the most studied entry points.

  • On-chain analysts, DeFi quants, and portfolio managers who track utilization, fees, and incentives across chains and can rebalance capital when rates shift. These users benefit from vaults like Yearn and dashboards on DeFiLlama and Dune.

  • Builders testing strategies before managing outside capital. Yield farming is a live environment for learning AMM math, lending risk parameters, and gas-aware execution.

Poor fits:

  • Anyone who needs guaranteed redemption, FDIC coverage, or help recovering a mistaken transfer. DeFi transactions are final. If you send to the wrong address or approve a malicious contract, no support desk can reverse it.

  • Anyone uncomfortable managing keys, verifying contract addresses, and reviewing approvals. Start with a regulated custodian and a small test amount if that is you.

  • Small accounts that will be active on Ethereum mainnet. Gas of 5 to 20 dollars per swap on busy days can erase yield on a 500 dollar position. Base, Arbitrum, or Optimism often cost less than 0.05 dollars per transaction and are better for learning.

How it works

1. Liquidity provision on automated market makers

Decentralized exchanges like Uniswap do not use order books. They use automated market maker contracts that hold reserves of two tokens and quote prices from pool state.

The classic rule from Uniswap v2 is x * y = k. When you buy one token you add the other, the ratio shifts, and the price updates. You trade against the pool, not against a person.

To farm from trading fees you become a liquidity provider, or LP.

  1. You deposit both tokens in a pool, for example ETH and USDC in equal dollar value on Uniswap, or USDC and USDT in a Curve stable pool.
  2. You receive an LP token or position NFT that tracks your share of the pool.
  3. Each swap in that pool pays a fee. That fee goes to LPs pro rata. If you own 1 percent of the pool, you earn 1 percent of the fees while your capital is in range.

Fee tiers matter. Uniswap v2 charges 0.30 percent per swap, with 0.25 percent to LPs and 0.05 percent reserved as protocol fee where enabled. Uniswap v3 offers tiers of 0.01, 0.05, 0.30, and 1.00 percent. Curve stable pools often charge below 0.10 percent but make it up on volume and low slippage near peg.

Uniswap v3 and v4 add concentrated liquidity. You choose a price range for your capital. This raises capital efficiency but also raises risk. If price moves out of your range, you earn zero fees until you rebalance. Uniswap v4 also introduces hooks, which are external contracts attached to a pool that can customize fees or automate rebalancing. That gives pool designers more control, but hooks can add complexity and risk, so check docs and audits before using a hooked pool.

2. Staking LP tokens and liquidity mining

After you receive LP tokens, a common next step is to stake them in a farm run by the same protocol or a partner. This is called liquidity mining.

Example loop that was common in 2020 to 2021 and still appears with newer tokens:

  1. Provide ETH/USDC liquidity on Uniswap and receive the LP NFT.
  2. Stake that NFT in a yield aggregator farm.
  3. Earn the aggregator token on top of Uniswap trading fees.

This is where inflation shows up. A new protocol might offer 200 percent APY paid in its own token to attract liquidity. Farmers deposit, earn the token, sell it quickly, and move to the next farm. The APY collapses as supply inflates and price falls. DeFiLlama fee data helps here. If a protocol pays more in emissions than it earns in fees, the yield is subsidized.

Curve handles this differently and is worth studying. Curve directs CRV inflation through gauges. veCRV holders vote weekly on which gauges receive CRV emissions. LP rewards in a specific pool depend on inflation rate, gauge weight, and whether the LP locks CRV for a boost up to 2.5 times. The total CRV supply is capped near 3.03 billion with inflation falling about 15.9 percent each year, which is documented in Curve docs.

3. Lending and borrowing

Aave v3 is the clearest lending market to learn from. It is a non-custodial pooled protocol deployed on Ethereum mainnet and on Layer 2s like Base, Arbitrum, and Optimism.

How supply works:

  • You supply an asset such as USDC to a pool and receive an aToken, for example aUSDC. The aToken balance grows as borrowers pay interest.
  • Interest rates are utilization based. When more of a pool is borrowed, rates rise to attract suppliers and discourage new borrowing. When utilization is low, rates fall. Aave v3 uses two slopes around an optimal utilization point, with a steeper slope above the optimum.

In mid-2026, live Aave dashboards showed USDC supply APY near 3 to 6 percent on Ethereum mainnet depending on utilization and network, with similar ranges on L2s where gas friction is lower. Stablecoin supply APY on optimized lending markets like Morpho, which matches lenders directly to borrowers instead of using a shared pool, was often 5 to 8 percent for the same assets.

Borrowing requires overcollateralization because DeFi does not use credit scores. You post collateral worth more than you borrow. Each asset has a loan-to-value ratio and a liquidation threshold. For example, if ETH has a 75 percent LTV and 80 percent liquidation threshold, 10,000 dollars of ETH lets you borrow up to 7,500 dollars, but you become eligible for liquidation when debt exceeds 80 percent of collateral value.

Risk is tracked with Health Factor:

Health Factor = (Total Collateral Value * Weighted Average Liquidation Threshold) / Total Borrow Value

If Health Factor falls below 1, keepers can liquidate part of your collateral at a discount to repay debt. Aave v3 also supports Efficiency Mode for correlated assets like stablecoins, where LTV rises when collateral and debt are in the same category, which enables tighter stablecoin strategies but also faster liquidation if a peg breaks.

Flash loans are a separate primitive on Aave. You can borrow with no collateral if you borrow and repay in the same transaction. This is used for arbitrage and for refinancing positions, not for long-term leverage.

4. Vaults and aggregators

Yield aggregators automate the steps above. Yearn Finance is the reference case.

You deposit USDC into a Yearn vault. The vault allocates capital to one or more tokenized strategies, each tied to a single source like Aave, Curve, Morpho, or Pendle. Strategies harvest rewards, sell them, and reinvest. You hold a vault share that appreciates as yield accrues.

Yearn v3 uses ERC-4626 compliant vaults and tokenized strategies. A strategy can be used by multiple vaults and can also be deposited into directly. Fees are simpler than in v2. Single-asset v3 vaults often charge 0 percent management fee. Vaults deployed through the factory charge a 10 percent performance fee on harvested profit, down from 20 percent before YIP-69. An additional protocol fee of 0 to 50 percent can be taken from those fees and sent to the treasury. Yield shown on yearn.fi is net APY, after fees and compounding, based on recent harvests.

A concrete example from early 2026: the Yearn OG USDC vault on Base via Morpho reported net APY near 4.8 to 5.4 percent annualized over rolling 1 to 6 month windows. The Yearn CRV vault v2 showed about 16 percent estimated net APY on a snapshot in April 2026. Those numbers move with utilization, trading volume, and CRV price, so treat them as snapshots, not promises.

5. Measuring yield - APY vs APR

APR is simple interest for a year with no compounding. APY includes compounding. If a protocol compounds rewards daily, APY will be higher than APR for the same nominal rate.

Formula:

APY = (1 + r / n)^n - 1

where r is APR as a decimal and n is compounding periods per year.

Example: 10 percent APR compounded daily gives about 10.52 percent APY. Compounded hourly it is about 10.51 to 10.52 percent depending on gas and claiming frequency. The difference grows with higher rates and more frequent compounding, but gas costs and harvest fees reduce the benefit for small deposits.

Many DeFi front ends quote APY assuming you reinvest rewards continuously and that current rates persist for a year. Both assumptions often fail. Rates change with utilization, volume, and token prices. Check whether the displayed APY is trailing 7-day, 30-day, or spot, and whether it is net of fees.

6. Where yield comes from in 2026

Use this checklist before you deposit:

  • Is the yield funded by real activity? Examples are swap fees on Uniswap, Aerodrome, and Curve, borrow interest on Aave and Morpho, staking rewards for securing Ethereum and Solana, and interest from tokenized Treasuries. These scale with volume and demand.

  • Is the yield funded by emissions or points? Token emissions are dilutive. Points programs credit activity now and convert to tokens later, which delays dilution but adds uncertainty. Treat headline APY above 20 percent as likely emissions heavy unless revenue data proves otherwise.

  • What is the protocol's revenue? DeFiLlama tracks fees and revenue per protocol. In 2026, mature protocols generated tens of millions in fees per day across tracked chains, which is why real yield can fund 3 to 15 percent APY without new tokens.

Pros and cons to weigh

Access and transparency. Anyone with a wallet and internet can supply, borrow, or swap without a bank account. Contracts, balances, and collateral are public on chain. You can verify code on Etherscan, check the proxy, and read audits. That makes independent checks possible.

Composability. Because DeFi products share token standards like ERC-20 and ERC-4626, you can use a receipt token elsewhere without withdrawing. You can supply USDC on Aave, receive aUSDC, and use that as collateral in another app in the same transaction.

Self-custody. You hold keys, not an exchange. That removes custodian failure but shifts key management to you. Hardware wallets, offline seed backup, and limited approvals become your controls.

Impermanent loss. This is the shortfall when the value of your share in a two-asset pool ends up less than the value of simply holding the two tokens outside the pool because prices moved apart while you were deposited.

For a constant product pool x * y = k, impermanent loss depends only on price ratio change:

Impermanent Loss = 2 * sqrt(price_ratio) / (1 + price_ratio) - 1

Uniswap docs publish the scale: 1.25x price change is about 0.6 percent loss vs holding, 1.5x is 2.0 percent, 2x is 5.7 percent, 3x is 13.4 percent, 4x is 20.0 percent, 5x is 25.5 percent. It is symmetric. A halving causes the same loss as a doubling.

Fees can offset this, but not always. A study of Uniswap v3 volatile pairs cited in 2026 reviews found about 54.7 percent of LPs lost money after fees and impermanent loss were netted. Stable pools on Curve have much lower impermanent loss when the peg holds, which is why they are common for conservative LP strategies.

Smart contract and dependency risk. Year-to-year loss data from Immunefi put DeFi protocol losses at 680 million dollars in 2025, up from 534 million in 2024 but 74 percent below the 2.62 billion peak in 2022, with most 2025 losses tied to protocol logic errors. An audit is a snapshot of one commit. It does not cover later changes, admin keys, or front-end compromise. Each layer you stack, for example LP token to gauge to vault to aggregator wrapper, adds a contract that can fail.

Liquidation and leverage risk. If you borrow to farm, a price drop can push Health Factor below 1 and trigger liquidation at a discount plus penalty. During sharp moves, liquidations can cascade. Use a buffer well below max LTV, and set alerts above the liquidation threshold.

Oracle and peg risk. Lending markets read prices from oracles. If an oracle is stale or manipulated, liquidations can trigger incorrectly. Stablecoins can depeg. Curve stable pools are built for assets that should trade near 1.00, and they become imbalanced when one asset breaks peg, leaving LPs with more of the weaker asset.

Fees and execution risk. Gas, slippage, and price impact reduce net yield. Pool fee tiers, protocol fees that can be enabled by governance, vault performance fees, and bridge fees all come off the gross. Layer 2s reduce gas by 5 to 20 times per ethereum.org notes, but you still pay bridging and must manage finality.

Regulatory and interface risk. Contracts are permissionless, but stablecoin issuers, front ends, and fiat ramps face sanctions, licensing, and compliance rules like EU MiCA. A front end can geofence assets, and an issuer can add controls to a token contract. Your on-chain position may remain, but the interface to manage it can change.

Current size and context in 2026

DeFiLlama chain snapshots provide a gauge, not a bank balance, because categorization and pricing move daily. As of June 18, 2026, DeFiLlama reported total TVL near 71.77 billion dollars across 453 chains, down from 114.49 billion on January 1, 2026 and 59.6 percent below the November 2021 peak of 177.48 billion. One day snapshot is not the whole story. Broader views that include liquid staking and restaking reported a higher range near 95 to 140 billion in April to May 2026. Daily DEX volume near that June snapshot was about 7.20 billion dollars, showing trading can stay active even as TVL falls.

Leading pools in that window included Aave v3 near 26.18 billion TVL across chains, Lido near 15 to 23 billion depending on pricing, Uniswap as the largest AMM by cumulative volume, Curve for stable swaps, and Sky Protocol for DAI at about 3.2 billion and USDS at about 7.5 billion circulating.

Stablecoin supply is larger than DeFi TVL. In mid-June 2026, stablecoin circulating supply was about 314 billion dollars, about 4.4 times DeFi TVL. That caps how much stablecoin yield DeFi can absorb and explains why tokenized Treasury products set a floor that emissions farms must beat.

How to get started safely

This is not financial advice. Start small, test the full loop, and keep amounts below what you can afford to lose.

If you want to try with a small amount

  1. Set up a self-custody wallet and back up keys offline. Use a hardware wallet for anything beyond a test sum. Write the seed phrase on paper or metal, never screenshot it, and practice recovery on a second device.

  2. Pick one chain and one well-known protocol to learn on. Good first steps are Aave v3 on Base or Arbitrum for lending, or a stable pool on Curve for LP mechanics. Verify URLs from official docs: app.aave.com, app.uniswap.org, curve.fi, sky.money. Check token contract addresses on an explorer before swapping.

  3. Fund with a small test amount, for example 50 to 200 dollars in USDC on a Layer 2. For lending, deposit, watch the aToken balance grow, then withdraw. For LP, add to a stable pair, check price impact and gas, and claim or remove to see fees.

  4. Track yield correctly. Record deposit time, gross fees or interest, gas paid per harvest, and net APY. A simple sheet that logs start value, end value, days held, and gas lets you compute net annualized return instead of relying on headline APY.

  5. Manage approvals. When a dApp asks for unlimited allowance, lower it to the amount you need. After you finish, revoke unused approvals with a tool like Revoke.cash and disconnect the site.

  6. Monitor risk if you borrow. Keep Health Factor above 1.5 if you have any borrow, set a price alert well above liquidation, avoid borrowing near max LTV, and never use your entire supply as collateral on a volatile asset.

If you are evaluating yield farming as a career signal

  1. Learn to read contracts before you write them. Work through ethereum.org smart contract docs and the Aave and Uniswap docs. Study checks-effects-interactions and why Uniswap v4 fee growth is tracked as cumulative feeGrowthInside per liquidity unit.

  2. Ship one auditable project. Build a vault or a small AMM helper with Foundry tests, fuzz runs, and gas reports. Deploy to a testnet, verify on an explorer, and publish the repo with a clear README.

  3. Specialize and document. Options include concentrated liquidity math, liquidation bot design, or oracle risk. Write a short postmortem of a real incident, such as a price manipulation exploit, with the fix and how you would test for it. Publish data on Dune or a public dashboard. Teams hire for on-chain evidence.

FAQ

What is the simplest definition of yield farming? It is depositing crypto into DeFi contracts so others can trade or borrow against it, and earning part of the fees or interest they pay. You can do it by providing liquidity to an AMM, supplying to a lending pool, or depositing into a vault that automates those steps.

How is yield farming different from staking? Staking usually means locking tokens to help secure a proof of stake chain and earning issuance plus tips, about 3 to 4.5 percent on Ethereum in 2026. Yield farming is broader. It includes staking, but also LP fees, lending interest, and vault strategies. All staking can be seen as yield farming, but not all yield farming is staking.

What returns are realistic in 2026? Conservative stablecoin lending on Aave or Spark runs about 3 to 5 percent APY. Optimized lending on Morpho is often 5 to 8 percent. Stable LP on Curve is 2 to 4 percent base plus 1 to 5 percent incentives. Yearn stable vaults have printed about 4.8 to 5.4 percent net APY in early 2026 snapshots. Concentrated liquidity on Uniswap v3 or v4 can show 10 to 30 percent gross before impermanent loss and fees, but passive positions on volatile pairs often underperform holding.

What is impermanent loss in one sentence? It is the shortfall you get when your LP share is worth less than simply holding the two tokens because their prices moved apart while you were deposited.

Do I need to overcollateralize to borrow? Yes on markets like Aave. You lock more value than you borrow, for example 150 dollars of ETH to borrow 100 dollars of stablecoins. Undercollateralized borrowing only exists inside a single transaction with flash loans, where you must borrow and repay atomically.

Does APY guarantee the return for a year? No. APY is an estimate that assumes current rates, prices, and utilization persist and that you compound continuously. In practice, utilization shifts hourly, token incentives change weekly, and gas reduces compounding benefit for small positions.

What should I check before I chase a high APY? Check the revenue source on DeFiLlama, the audit and bug bounty status, whether admin keys are in a multisig with a timelock, the oracle used, and the token's inflation schedule. If the APY relies on a new token with no fee revenue, treat it as a subsidy that ends when emissions slow or price falls.

Are DEX trades anonymous? No. Ethereum is pseudonymous. Every transaction is tied to an address and is visible on chain. Analytics firms map addresses to entities. You get privacy from handing less data to a custodian, not privacy from ledger analysis.

Is yield farming still profitable? It can be, but profit depends on net yield after fees, gas, impermanent loss, and taxes. In mid-2026, with DeFi TVL near 70 to 80 billion and daily DEX volume near 7 billion, fees exist to pay LPs and suppliers. The profitable participants are usually those who pick sustainable revenue sources, size positions to survive volatility, and avoid overstacking layers of smart contract risk to chase a few extra basis points.

Where can I verify the numbers in this guide? Check supply and borrow APY on the official Aave app at app.aave.com, pool fees and impermanent loss math in the Uniswap docs at docs.uniswap.org, CRV emissions and gauges in the Curve docs at docs.curve.fi, Yearn v3 fee and vault docs at docs.yearn.fi, and TVL, fees, and volume on DeFiLlama at defillama.com. Confirm contract addresses on Etherscan or the relevant chain explorer before you deposit.