Yield farming is the hunt for returns in DeFi protocols: you put your coins into liquidity pools or lend them out and earn fees and rewards in return. In this lesson we'll look at where the income really comes from, how automated market makers work, how to calculate impermanent loss, and what to check before you trust a smart contract with even a single dollar.
- DeFi yield comes from four sources: trading fees, borrower interest, token rewards and staking.
- A liquidity provider in a two-asset pair suffers impermanent loss when the prices of the two assets diverge.
- High yield is almost always paid for by new token issuance or extra risk.
- The main threats are smart contract bugs, oracle manipulation, stablecoin depegs and liquidations.
Where DeFi yield comes from
Money in DeFi doesn't come out of thin air: someone is paying you for providing capital. If you can't say exactly who is paying and for what, chances are you're the one paying, either through reward tokens losing value or through a risk you missed. That's why sizing up any strategy starts with one question: where does the income come from?
The first source is trading fees. Decentralized exchanges like Uniswap or Curve charge a small fee on every swap and pass it on to liquidity providers. The second is loan interest: on protocols like Aave, borrowers pay for their loans and depositors collect that payment. The third is token rewards, which a protocol hands out to attract capital. The fourth is staking income, if the strategy uses tokens like stETH.
The first two sources hold up as long as there's trading and demand for loans. Token rewards are a different story: the protocol prints them itself, and if people dump them en masse, the price falls and the real yield ends up far below the advertised one. Staking as a strategy of its own is covered in the lesson on HODLing and staking.
APR is the annual rate without reinvesting, while APY includes compounding. The same yield looks more impressive as APY, so always compare offers in the same units.
Liquidity pools and automated market makers
On a regular exchange, the order book sets the price. In DeFi, it's usually an automated market maker, or AMM: a smart contract holds two tokens, say ETH and USDC, and works out the price from their ratio. In the classic design, the product of the two token amounts stays constant, so when someone buys ETH from the pool, there's less ether left in it and its price goes up.
A liquidity provider deposits both tokens in equal value and receives an LP token, a receipt for their share of the pool. While the funds sit in the pool, the provider earns a cut of the fees from every swap. To withdraw, they hand back the LP token and get their share of the tokens, but in a different ratio than they put in.
Uniswap v3 and similar protocols introduced concentrated liquidity: you choose the price range where your money works. The narrower the range, the more fees you earn, but if the price moves outside it, the position stops earning and turns entirely into one of the two tokens. You have to manage a position like this the way you'd manage an active trade.
Impermanent loss: the main hidden cost
Impermanent loss is the difference between what your share of the pool is worth and what the same tokens would be worth if you'd simply held them. It shows up when the prices of the two tokens in a pair drift apart, and it doesn't matter which way the price moves.
Here's an example. You deposit 1 ETH and 2,000 USDC into a pool when ether is at 2,000. Ether doubles to 4,000, and arbitrageurs buy some of the ETH out of the pool. Your share is now roughly 0.71 ETH and 2,828 USDC, or about $5,657. If you'd just held the coins, you'd have $6,000. The gap is about $343, or 5.7%, and the fees have to make up for it.
It's called impermanent because the loss disappears if the price returns to where it started. But if you pull your liquidity after a big move, it becomes very permanent. In stablecoin pairs like USDC and USDT, the loss is minimal as long as both hold their dollar peg, while in pairs with volatile tokens it can eat the entire yield.
| Price change of one token | Impermanent loss vs. simply holding |
|---|---|
| Up 1.25x | about 0.6% |
| Up 1.5x | about 2% |
| Up 2x or down by half | about 5.7% |
| Up 3x | about 13.4% |
| Up 5x | about 25.5% |
If ether trades sideways for months, the loss stays small while swap fees pile up every day. That's why liquidity providers usually come out ahead in a calm market and fall behind simple holding in a strong trend.
Reward farming and lending strategies
Farming in the narrow sense means depositing your LP tokens into a separate contract and earning the protocol's tokens for it. This is where you see annual yields in the triple and even quadruple digits. It's almost always a temporary promotion: the rewards come from newly issued tokens, and the more people farm, the lower the rate and the heavier the selling pressure on the token.
Lending strategies are built on borrowing protocols. The simplest version is to deposit stablecoins and earn interest. A more advanced one is to deposit collateral, borrow another asset against it and deposit that as collateral again. Loops like this raise both the yield and the risk: if the collateral's price drops below the allowed level, the protocol automatically sells it with a penalty, just like liquidation in margin trading.
The more steps a strategy has, the more can go wrong. Every extra protocol in the chain adds the risk of its own smart contracts, oracles and tokens, and every transaction costs a network fee. With small amounts, a complex setup may not even cover the gas.
If a protocol promises a yield dozens of times higher than what Aave pays on the same stablecoins, someone is paying for the difference: through token issuance, a thinly traded token or the risk of losing everything. There's no free yield in DeFi.
Risks the ads don't mention
Impermanent loss isn't the only risk. DeFi runs on code, and a single vulnerability in a contract is enough to wipe out an entire pool. The main threats to keep in mind, whatever strategy you choose, are listed below.
Don't forget about taxes, either. Depending on the country, claiming rewards, swapping through a pool and even adding liquidity can count as taxable events, and the rules keep changing. Check how it works where you live, and read the lesson on how DeFi and NFT regulation works.
- Bugs and vulnerabilities in smart contracts, including audited ones.
- Price oracle manipulation, which attackers use to drain funds from lending protocols.
- A stablecoin losing its dollar peg, turning a "safe" pair into a losing one.
- Scams and rug pulls: the team behind an anonymous protocol runs off with users' funds.
- Bridge hacks, if the strategy uses tokens from another network.
- Liquidations in lending setups during sharp price moves.
Checklist before you put money in
Experienced DeFi users run every new protocol through the same set of checks. It won't guarantee safety, but it weeds out most of the obviously dangerous offers. If even one item raises doubts, skip the opportunity: money lost in a hack is almost impossible to get back. For the big picture of the sector and its main players, see the lesson on what decentralized finance is.
- Name the source of the yield: fees, interest or token issuance.
- Check the protocol's age and its total value locked history on DefiLlama.
- Look for audits from well-known firms and see whether there have been any incidents.
- Find out who controls the contracts and whether the team can change them without a time delay.
- Start with a small amount and test a withdrawal.
- After you exit, revoke token spending approvals, for example via revoke.cash.
Set up a separate wallet for experimenting and keep only the amount you're prepared to lose in it. Keep your main funds elsewhere and never connect that address to sites you don't know.
Open the Yields section on DefiLlama and pick two pools: a stablecoin pair like USDC/USDT and a pair with a volatile token like ETH/USDC. For each, write down what part of the APY comes from fees (base) and what part from token rewards (reward), and use the table in this lesson to estimate how much impermanent loss would eat if ETH doubled. That way you'll see how much of the shiny number is sustainable and what's left of it after the loss.
Entry is free and you trade on a demo account, so you need no money of your own. Free tournaments pay out Tour Passes, and those get you into tournaments with USDT prizes. The best go further — to a $5,000 funded account.
FAQ
Can you make money yield farming without risk?
No. Even stablecoin pools on major protocols carry smart contract risk and depeg risk. You can lower the risk by sticking to proven protocols and small amounts, but you can't get rid of it completely.
What's the difference between liquidity mining and yield farming?
Liquidity mining is a specific kind of farming where a protocol hands out its own tokens to liquidity providers. Yield farming is broader: it covers any hunt for yield in DeFi, including lending, staking and combined strategies.
Why does the advertised yield keep dropping?
DeFi rates aren't fixed. When more money flows into a pool, the fees and rewards get split among more people, and the reward token's price often drops as farmers sell. So high numbers rarely last long.
Do you need a lot of money for DeFi strategies?
On layer-2 networks and fast blockchains, fees are low and you can start small. On Ethereum mainnet, though, transaction costs can make small positions unprofitable.
Discussion
Comments from BuyCrypt Live. Sign in with Google or Apple — we create your BuyCrypt account on the way, the same one as in the app.