How Yield Farming Works: Rewards, LP Tokens, and Risks
Yield farming pays token rewards for supplied liquidity or loans. How LP tokens, emissions, lock-ups and impermanent loss actually work, and what the risks are.
Yield farming is the practice of moving capital into a protocol in exchange for token rewards. The capital is usually liquidity in an automated market maker pool or a loan to a lending market; the reward is usually a separate token issued by the protocol. The advertised figure on a farming dashboard is a snapshot of a variable rate, not a fixed return, and it is frequently denominated in a token the protocol created. Understanding the mechanism means separating three things that dashboards blend together: the fee income from the underlying activity, the reward emissions paid on top, and the risks attached to both.
What the protocol is actually paying for
A decentralised exchange needs liquidity in each trading pair so that swaps can execute. A lending market needs deposits so that borrowers can draw funds. Both can pay for that liquidity in trading fees, but fees alone are often not enough to attract capital quickly. Yield farming, also called liquidity mining, is the subsidy used to close that gap: the protocol mints its own token and distributes it to suppliers on a schedule.
The supplier’s position therefore has two income streams. The first is the share of trading fees or borrower interest that accrues to the supplied assets. The second is the reward token, which is new supply created by the protocol. The second stream is the one that makes the headline rate look large, and it is the one that changes when emissions are adjusted.
LP tokens and where the position lives
When liquidity is added to an automated market maker, the protocol issues a separate token representing the share of the pool. This is the LP token. It is not a receipt held off-chain; it is a contract-level balance that the pool recognises, and it can usually be transferred or deposited elsewhere.
That transferability is the source of most of the complexity in farming. A common pattern is to deposit the LP token into a second contract, often called a farm, staking pool or gauge, which distributes the reward token. The original pool position and the reward position are then two different contracts with two different sets of permissions. A reader who wants to know what they actually hold can check the LP token balance and the farm’s staked balance separately rather than trusting a single dashboard total.
Because LP tokens are contracts, they can also be used as collateral or re-deposited into further strategies. Each additional layer adds a contract that must behave correctly for the position to be recoverable.
Why the advertised rate moves
The rate shown for a farm is a function of the reward token’s emissions schedule and the total amount staked. When more capital enters the same farm, the same emissions are divided among more LP tokens, so the rate per unit of capital falls. When emissions are reduced by governance, the rate falls again. When the reward token’s market value changes, the value of the reward stream changes even if the token quantity does not.
This means a rate observed at one moment is not a rate that will be received over a period. It is a spot estimate that decays as capital arrives. Protocols sometimes express the rate in terms of the reward token itself, which removes the price question from the number but not from the outcome: the quantity is fixed per block, the value is not.
Reward emissions are dilution
The reward token is not found money. It is newly issued supply distributed to farmers, and it dilutes every existing holder of that token unless the token has a mechanism that absorbs the issuance. From the protocol’s perspective this is a deliberate cost: paying tokens to rent liquidity. From the farmer’s perspective it means the reward is only worth what the market will pay for the additional supply.
A farm that pays a large quantity of a thinly traded token can show an attractive rate while the sale of the rewards moves the token’s market. The mechanism does not guarantee that the reward can be converted at the rate implied by the dashboard. This is the part of farming that marketing tends to leave out: the reward is a claim on a token, and the token’s market is separate from the farming position.
Impermanent loss sits underneath the fees
Supplying two assets to an automated market maker means the pool rebalances as prices move. If one asset rises relative to the other, arbitrageurs trade against the pool until the ratio reflects the market, and the supplier ends up holding more of the weaker asset and less of the stronger one than they deposited. The difference between the value of the pool position and the value of simply holding the two assets is impermanent loss. It is realised when the position is withdrawn, and it can exceed the fees earned.
The effect is larger for pairs whose prices diverge more, and it applies whether or not the position is being farmed. Reward emissions can offset it, but they do not remove it, and a farm whose reward token falls can leave the supplier with less than the assets they started with even while the fee income was positive.
Lock-ups, vesting and exit terms
Some farms require the LP token to be locked for a period, or distribute rewards that vest over time and are forfeited on early exit. These terms are set in the farm contract and are not always visible on the summary screen. Before depositing, the relevant questions are whether the staked balance can be withdrawn at any time, whether a withdrawal fee applies, and whether rewards already accrued survive an exit. A farm that pays in a vesting token is effectively asking the supplier to hold the reward exposure for longer than the farming position.
Contract and governance risk
Every layer of a farming position is a contract with its own permissions. The pool contract holds the supplied assets; the farm contract holds the LP tokens; the reward token contract can have minting or pause functions. If any of these has an administrative key, the holder of that key can change behaviour within the permissions coded into the contract. Governance can alter emissions, add withdrawal fees, or migrate the farm to a new contract.
This is not a hypothetical category. It is the reason a farm’s terms should be read as contract terms rather than as a promise. A protocol that can change the reward rate can also change the exit conditions, and the time to discover that is before depositing.
Reading a farm position from the command line
For a position held in a wallet, the contract state can be queried directly. The LP token balance shows the pool share; the farm’s staked balance shows what is deposited for rewards. Foundry’s cast is one way to read these values.
cast call <lp_token_address> "balanceOf(address)(uint256)" <wallet_address> --rpc-url <rpc_url>
The output is the wallet’s LP token balance in the token’s smallest unit. A balance that is zero while the dashboard shows a position usually means the LP tokens are staked in the farm contract, not held in the wallet.
cast call <farm_address> "balanceOf(address)(uint256)" <wallet_address> --rpc-url <rpc_url>
The output is the amount staked in that farm. Comparing the two balances against the pool’s total supply gives the share of the pool the position represents.
Source: https://getfoundry.sh/cast/reference/
Tax treatment of farming rewards
Farming produces several distinct events, and tax systems do not treat them the same way. Reward tokens received may be treated as income at receipt, as a capital asset acquired at zero cost, or as something else entirely; the LP token deposit and withdrawal may be treated as a disposal or as a non-event; impermanent loss may or may not be recognisable. Several of these areas are genuinely unsettled, and the treatment differs by country.
No rate or rule can be stated here that applies generally. What a reader must check for their own jurisdiction includes: whether reward tokens are taxed as income when received and at what value; whether depositing assets into a pool and receiving an LP token is a taxable disposal; whether fees reinvested in the pool are a separate event; how impermanent loss is treated on withdrawal; and what records the local authority expects. The relevant page is defi tax.
What a farming position actually exposes
| Risk | What it does to the position | When it does not apply |
|---|---|---|
| Impermanent loss | Pool rebalances against the supplier as prices diverge | Single-asset lending positions, where no pair is held |
| Reward dilution | Emissions reduce the value of the reward token | Farms paying in a token with a fixed supply and no new issuance |
| Lock-up or vesting | Capital cannot exit, or rewards are forfeited on exit | Farms with unrestricted withdrawal and no vesting |
| Contract and governance risk | Terms can change within the contract’s permissions | Contracts with no administrative control and immutable code |
| Reward token market risk | The reward may not convert at the implied rate | Positions where rewards are sold continuously and the rate is measured net |
The difference between a fee rate and a farming rate
A pool’s fee income and a farm’s reward emissions are separate numbers that are often added together on a dashboard. The fee rate depends on trading volume through the pool; the farming rate depends on emissions and total staked. A farm can show a high combined rate while the fee component is negligible and the reward component is being paid in a token whose supply is expanding. Reading the two components separately is the difference between understanding the position and accepting a headline number.
Common questions
What is yield farming in simple terms?
Yield farming is supplying assets to a protocol, usually liquidity to a trading pool or a loan to a lending market, in exchange for token rewards. The rewards are issued by the protocol on a schedule and are separate from the fees the supplied assets earn.
What is an LP token and why does it matter for farming?
An LP token is the contract-level balance that represents a share of a liquidity pool. Farms usually require the LP token to be deposited into a second contract, so the pool position and the reward position are separate. Knowing which contract holds the LP token is what makes the position recoverable.
Why does the yield on a farm keep changing?
The rate is emissions divided by total staked, so it falls as more capital enters the farm and changes when governance adjusts emissions. The value of the reward also moves with the reward token's market. A rate seen at one moment is a spot estimate, not a fixed return.
Can yield farming lose money even when the yield is positive?
Yes. Impermanent loss can exceed the fees and rewards earned, and a reward token that loses value reduces the value of the reward stream. Lock-ups and withdrawal terms can also prevent an exit at the moment it would be preferable.
How are yield farming rewards taxed?
Treatment varies by country and several areas are unsettled. Reward tokens may be treated as income at receipt, the LP deposit may be treated as a disposal, and impermanent loss may or may not be recognisable. The specific rules for the reader's jurisdiction need to be checked.
Sources
Read next
- How Liquid Staking Works: Tokens, Queues and Risks How liquid staking pools deposits, stakes with validators and issues receipt tokens. Covers rebasing vs value-accruing tokens, slashing, queues and depegs.
- Reading a Token's Supply and Unlock Schedule Tokenomics is the supply and distribution design of a token. Learn to read circulating vs fully diluted supply, unlock schedules, emissions and burns.
- Layer 2 Networks: How They Work Understand layer 2 networks: what moves off-chain, how rollups work, and the withdrawal wait. A clear, risk-aware explanation of L2 mechanics.
- DeFi Tax: What Counts as a Taxable Event Learn why DeFi transactions create multiple taxable events, how liquidity pools and yield farming are taxed, and what to check for your jurisdiction.
- Tax on Staking Rewards: Receipt vs Disposal How staking rewards are taxed varies by country and is often unsettled. Understand the two main treatments: taxed on receipt or only on disposal.