DeFi Yield Farming: How It Works and How to Start
How liquidity pools pay out, what separates APY from APR, why impermanent loss happens, and the steps to stake your first LP tokens.

Yield farming means putting crypto to work in decentralized finance (DeFi) protocols instead of leaving it idle in a wallet. You supply assets that a protocol needs, and you earn a return for supplying them. This guide covers how that works, where the return actually comes from, and the ways it goes wrong.
What Exactly Is DeFi Yield Farming?
Yield farming is lending or staking crypto assets inside DeFi protocols in order to earn a return. In doing it, you are providing the liquidity that lets other people trade or borrow without a bank in the middle.
That liquidity is what powers decentralized exchanges (DEXs) and lending protocols, through code that runs on-chain: smart contracts. For the size and shape of the sector, see the DeFi statistics.
Where the Yield Comes From
The return is not interest paid by an institution. It has two sources, and they behave differently:
- Fees. Traders pay a fee on every swap, and borrowers pay interest on what they borrow. Both are passed through to the people who supplied the assets. This part of the yield is only as large as the activity that generates it.
- Token incentives. Protocols often hand out their own governance token on top of the fees, to attract deposits. This part is paid in a token whose price can fall, and it usually shrinks or stops when the incentive program ends.
Advertised yields vary enormously, from low single digits on stablecoin pools to triple digits on new tokens, and the high numbers are high because the risk is high. A quoted APY is a projection from current conditions, not a rate anyone has promised you.
Yield Farming vs. Traditional Savings
Comparing yield farming with a bank savings account shows what you give up as well as what you gain.
DeFi Yield Farming vs Traditional Savings
| Feature | DeFi Yield Farming | Traditional Savings |
|---|---|---|
| Returns | Variable and not guaranteed; set by trading activity and token incentives | A rate set by the bank, which can change but is known in advance |
| Control Over Funds | You keep self-custody, and you carry the consequences of losing your keys | Funds are held by the bank |
| Accessibility | Open to anyone with a crypto wallet and an internet connection | Requires a bank account and ID, and depends on where you live |
| Risk Level | High: impermanent loss, smart contract exploits, scams, token price risk | Low: deposits are insured in most jurisdictions, FDIC in the US |
| Transparency | Balances and transactions are visible on-chain | Opaque; operations are internal to the bank |
DeFi offers access and control that a bank does not, and removes every safety net that a bank provides. There is no deposit insurance, no fraud department and no way to reverse a transaction.
Understanding the Mechanics of Yield Farming
Underneath the yields is a system of interlocking parts. These are the ones to understand before committing money.
Start with liquidity pools. A pool is a shared pot holding two tokens, say ETH and USDC, that anyone can trade against. Rather than matching an individual buyer to an individual seller the way a stock exchange does, a DEX lets a trader swap directly with the pool. The pool only exists because people deposit into it.
The Role of Liquidity Providers
The people who deposit are Liquidity Providers (LPs). In return for locking up assets and enabling trades, an LP receives a share of the fees the pool generates. A pool charging a 0.3% fee per swap — the flat rate hardcoded into every Uniswap v2 pool — splits that fee among its LPs in proportion to what each one contributed. Since Uniswap governance activated the protocol fee in December 2025, v2 liquidity providers keep 0.25% of that 0.30% and the remaining 0.05% goes to the protocol. (Uniswap v3, by contrast, offers a choice of fee tiers — 0.05%, 0.30% and 1% as standard — for the same token pair.)

You also receive LP tokens when you deposit. These are the receipt proving you own a share of the pool, and you need them to withdraw.
Understanding APY vs. APR
Two terms appear on nearly every farm, and the difference between them matters.
- APR (Annual Percentage Rate): simple interest over a year, with no compounding.
- APY (Annual Percentage Yield): the rate including the effect of compounding, meaning rewards reinvested to earn further rewards.
Compounded daily, a 50% APR works out to roughly 65% APY. That is arithmetic rather than extra yield: you only get it if you actually reinvest, and every reinvestment costs a transaction fee.
The Seesaw Problem of Impermanent Loss
Impermanent loss is the most misunderstood risk in yield farming. It is not a theft or a failure. It is the gap between what your assets are worth inside the pool and what they would have been worth if you had simply held them.
Picture a seesaw. You deposit two tokens of equal value, one on each side, and the pool holds that balance. If one token's price rises and the other's does not, arbitrage traders buy the appreciating token out of the pool until its pool price matches the market, tipping your holdings the other way. You end up with less of the token that went up and more of the one that did not.
The loss is called impermanent because prices can converge again. It becomes permanent the moment you withdraw.
Your First Steps Into Yield Farming
Before anything else, you need a self-custody wallet: one where you, and only you, hold the private keys. MetaMask is a common choice as a browser extension and mobile app. Trust Wallet and Rabby are alternatives.

Step 1: Set Up a Secure Crypto Wallet
- Download and install. Go to the official MetaMask site to get the extension for your browser. Check the address carefully; fake wallet sites are a standing phishing tactic.
- Create a new wallet. During setup you are given a 12-word secret recovery phrase.
- Secure the phrase. Write it down on paper and store it offline, in more than one place. Do not store it digitally and do not share it with anyone, including support staff who ask for it. Anyone with the phrase controls the funds, and there is no recovery if it is lost.
Step 2: Acquire the Necessary Crypto Assets
Most pools require a pair of tokens, typically a major asset such as ETH alongside a stablecoin such as USDC.
Buying usually means a centralized exchange, then withdrawing the tokens to your own wallet address. Copy the address exactly and send a small test amount first.
Transactions on a blockchain cost gas fees, which rise and fall with network congestion. Check a gas tracker before moving large amounts, and factor the cost into any strategy that involves frequent transactions.
Step 3: Connect to a DeFi Platform and Choose a Pool
Connecting means visiting a protocol — a DEX such as Uniswap, or a lending protocol such as Aave — and using the "Connect Wallet" control, then approving the connection in your wallet.
When comparing pools, look at:
- Asset type. Two volatile assets carry more impermanent loss risk than a stablecoin pair.
- Advertised APY. Treat a high number as a description of the risk, not just the reward. Check how much of it is fees and how much is a token incentive that can end.
- Total value locked (TVL). A deep pool absorbs trades with less slippage, and a pool that is draining is a signal worth reading.
Put concretely: deposit $1,000 of ETH into a lending pool, other users borrow it and pay interest, and that interest reaches you. At a 10% APY held for a year, that is $100 — separate from any change in the price of ETH itself, which can easily swamp it in either direction.
Step 4: Stake Your LP Tokens and Start Earning
Depositing into a pool earns you the pool's trading fees. On most farms, the token incentives require one more step: staking the LP tokens in the platform's farm or staking contract. Until that is done, the advertised farm rewards are not accruing.
Exploring Different Yield Farming Strategies
Strategies differ mainly in how much price volatility you take on.
Low-Risk Strategies for Capital Preservation
The most common conservative approach is providing liquidity for stablecoin pairs, pools made of two tokens pegged to the same asset, such as USDC/DAI. Because both sides are designed to hold the same value, the price divergence that causes impermanent loss is small.
Curve Finance specializes in swaps between like-pegged assets. The returns are modest. The residual risk is not zero: a stablecoin can lose its peg, and the smart contract risk remains.
Medium-Risk Strategies for Balanced Growth
A middle ground is providing liquidity for an established asset paired with a stablecoin or another major asset. Common examples:
- ETH/USDC: the leading smart contract platform paired with a widely used stablecoin.
- WBTC/ETH: Wrapped Bitcoin paired with Ethereum.
Both assets are volatile, so impermanent loss is a real factor. Their long track records and deep liquidity offer a degree of stability that newer tokens do not.
High-Risk, High-Reward Strategies
The speculative end means farming new, volatile or obscure tokens, often on new platforms, at advertised APYs in the hundreds or thousands of percent. Those rates are usually paid in the project's own token, and they fall as more capital arrives.
The specific dangers are large price swings producing heavy impermanent loss, unaudited contracts with exploitable bugs, and outright "rug pulls" in which the developers withdraw the liquidity and disappear. This is territory for capital you are prepared to lose entirely.
Automated Farming with Yield Optimizers
Compounding by hand means repeatedly claiming rewards, swapping them and redepositing, and paying gas each time. Yield optimizers, also called auto-compounders, do it for you.
Platforms such as Yearn Finance and Beefy Finance run vaults that:
- Collect earned rewards.
- Sell the reward tokens.
- Buy more of the underlying LP position.
- Redeposit it.
Batching this across many depositors makes compounding cheaper than doing it alone. The trade-off is another smart contract holding your funds, and a performance fee on top.
How to Choose the Right DeFi Platform
Chasing the highest advertised APY is the most common way to lose money in DeFi. The things worth checking first:
- Total value locked (TVL). How much is currently deposited, and whether that number is growing or falling.
- Security audits. Look for recent audits by known firms, and read what they found rather than just noting that an audit exists. No audit at all is a clear warning.
- Track record and team. How long the protocol has run, whether it has been exploited before, whether the team is public, and whether development is still active.
An audit reduces risk. It does not eliminate it, and audited protocols have been drained.
Comparison of Top Yield Farming Platforms
| Platform | Primary Function | Best For | Key Feature |
|---|---|---|---|
| Uniswap | Decentralized Exchange | A wide variety of token pairs and deep liquidity. | The largest and best known automated market maker. |
| Curve Finance | Decentralized Exchange | Stablecoin pairs, where price divergence is small. | Efficient swaps between like-pegged assets. |
| Aave | Lending Protocol | Lending single assets, with no impermanent loss. | Established borrowing and lending markets. |
| Beefy Finance | Yield Optimizer | Automating the compounding step. | Auto-compounding vaults across many chains. |
Lending a single asset on Aave avoids impermanent loss entirely, because there is no pair to diverge. It is the simplest starting point, and the yields reflect that.
The skills involved in evaluating these protocols — reading contracts, auditing risk, understanding tokenomics — are hired for. You can see the current DeFi jobs and what the roles around them pay.
Understanding the Real Risks of Yield Farming
Impermanent Loss, With Numbers
A worked example of an ETH/DAI position:
- Deposit 1 ETH at $3,000 and 3,000 DAI, a $6,000 position.
- ETH doubles to $6,000. Arbitrage traders buy ETH out of the pool until the pool price matches the market.
- Withdrawing now returns roughly 0.707 ETH and 4,243 DAI: about $8,485.
- Holding the original assets instead would have left you with 1 ETH at $6,000 plus 3,000 DAI, a total of $9,000.
The difference, about $515, is the impermanent loss. The position still gained, but less than holding would have. Fees earned over the period offset some of that gap, which is the trade LPs are making. The effect grows with the size of the price divergence, so it bites hardest in pools where both assets move independently.

Smart Contract Flaws and Rug Pulls
DeFi runs on code, and code has bugs. Smart contract risk is the possibility that someone finds a flaw and drains a protocol. It applies to audited protocols too.
A rug pull is not a bug but a deliberate scam: a project attracts deposits with high advertised returns, then the developers remove the liquidity and disappear, leaving holders with a worthless token.
Recurring warning signs:
- Anonymous teams, with no reputation to lose.
- No third-party audit, or an audit by a firm nobody has heard of.
- Unlocked liquidity, meaning the developers can withdraw the pool at any time.
- Returns with no explanation. If nobody can tell you which trades or borrowers generate the yield, it is likely being paid out of new deposits.
Common Questions About Yield Farming
How Much Money Do I Need to Start?
There is no minimum set by the protocols. The practical floor is gas fees. Entering a position, staking, claiming and exiting are each separate transactions, and on Ethereum mainnet at busy times those can cost more than a small position earns in a year.
Layer 2 networks such as Arbitrum, Base and Polygon, and chains such as Solana, charge a small fraction of that, which is why smaller positions are viable there. Before depositing, add up the transactions a strategy requires and check that expected earnings clear the cost.
Is Yield Farming Actually Profitable?
It can be, and it is not reliable. The outcome depends on the strategy, the protocols you trust with the funds, the direction of the market and how actively you manage the position. Many farms that looked profitable on paper were not, once impermanent loss, gas and a falling reward token were counted.
The highest advertised rates carry the highest risk, and that relationship is consistent enough to treat as a rule. Yield farming is also not a set-and-forget investment: incentive programs end, pools drain, and positions need checking.
How Are Yield Farming Earnings Taxed?
Tax treatment of DeFi varies by country and is still being settled in many of them. As a general pattern, most jurisdictions treat it in two parts:
- Income. Rewards claimed from a farm are usually income, valued at the market price on the day you claim them.
- Capital gains. Selling or swapping those tokens later can trigger a separate charge on any change in value since.
Keep records of every transaction as you go; reconstructing a year of on-chain activity afterwards is difficult. Because the rules are local and complex, this is worth taking to an accountant who works with crypto in your country. Nothing here is tax or investment advice.
If any of the terms above are unfamiliar, the Web3 dictionary defines them.