Yield Farming Taxes: The Complete Guide for DeFi Investors
Key Takeaways
- Yield farming generates multiple taxable events: LP deposits, reward harvests, reinvestments, and withdrawals.
- Yield farming rewards are ordinary income at FMV when received.
- Reinvesting rewards (compounding) creates additional taxable events; each reinvestment is a swap.
- Gas fees are capitalizable as investment costs.
- Yield farming can generate 200%+ annual ordinary income in high-yield scenarios, significantly increasing tax liability.
What Is Yield Farming?
Yield farming is the practice of deploying cryptocurrency across multiple decentralized finance (DeFi) protocols to generate returns through trading fees, interest, and governance rewards.
Unlike staking (locking tokens in a PoS blockchain), yield farming is an active strategy involving:
- Swapping tokens into liquidity pools
- Depositing tokens into lending protocols
- Harvesting and reinvesting rewards
- Rotating positions to chase higher yields
Yield farming became popular during the 2020-2021 DeFi boom when protocols offered enormous APYs to attract liquidity. Many yield farmers earned 200% to 500% annual yields.
From a tax perspective, yield farming is significantly more complex than staking due to the number of taxable events involved. For a broader overview, see our complete guide to crypto taxes.
How Yield Farming Rewards Are Taxed
Receipt of Rewards
When you harvest yield farming rewards (e.g., SUSHI, CAKE, CRV), the rewards are ordinary income at fair market value when received.
This follows the same principle as crypto staking taxes (IRS Rev. Rul. 2023-14). You must report the FMV of all rewards regardless of whether you immediately sell or hold them.
The FMV at receipt becomes your cost basis in the reward tokens. Any future appreciation or depreciation is a capital gain or loss.
Timing of Income
The IRS treats crypto reward income as taxable when you have "dominion and control" over it. With yield farming rewards, you have control when you harvest them from the protocol.
Some farmers hold rewards unharvested in the protocol (they accrue but aren't distributed). The tax treatment of unharvested rewards is unclear, but the conservative approach is to report them as income when you harvest (not before).
Annual Yield Farming Income Scenarios
The scale of yield farming income can be enormous. Example scenario:
- Deposit $100,000 in liquidity pools with 200% APY
- Earn $200,000 in annual rewards
- Harvest quarterly (four times a year)
- Report $50,000 of ordinary income four times
This $200,000 ordinary income is taxed at your marginal rate (potentially 37% if you're in the top bracket), resulting in $74,000 in federal taxes alone.
Many yield farmers significantly underestimate their tax liability and face large bills at tax time.
The Many Taxable Events in a Yield Farm
Yield farming is complex because it involves many taxable events beyond just receiving rewards:
1. Initial Deposit (Swap to LP Tokens)
Depositing tokens into a liquidity pool (Uniswap, Curve, Balancer) is likely a taxable swap. You exchange your tokens for LP tokens.
Gain/Loss = FMV of LP Tokens Received - Cost Basis of Tokens Deposited
This usually doesn't create a gain (the LP token is worth what you deposited), but it establishes a crucial cost basis.
2. Harvesting Rewards
Claiming rewards is an ordinary income event. Each harvest creates a taxable receipt of ordinary income.
3. Reinvesting Rewards
If you automatically reinvest rewards by depositing them back into the farm or liquidity pool, this is a separate taxable event:
- Swapping the reward token for LP tokens (if adding to a pool)
- Depositing into a new or existing protocol (if adding to a lending farm)
Each reinvestment is a taxable swap.
4. Removing Liquidity
Withdrawing your LP tokens and redeeming them for underlying assets is a taxable sale of the LP tokens.
Gain/Loss = FMV of Assets Withdrawn - Cost Basis of LP Tokens
5. Selling Harvested Rewards
When you sell harvested reward tokens, it's a capital gain or loss:
Gain/Loss = Sale Price - Cost Basis (FMV at Receipt)
Harvesting vs Auto-Compounding
Manual Harvesting
When you manually harvest rewards, you have clear taxable events:
- Receiving rewards (ordinary income)
- Choosing to reinvest (additional taxable swap)
This creates explicit tax records, making compliance clearer.
Auto-Compounding Strategies
Some protocols and strategies automatically reinvest rewards without manual action. Examples:
- Yearn Finance vaults (automatically reinvest yields)
- Curve's auto-compounding (some pools)
- Convex (auto-compounding for Curve)
Tax treatment remains the same: even if auto-compounded, each reinvestment is a separate taxable event. The fact that it's automatic doesn't change tax obligations.
The challenge: auto-compounding makes tracking difficult. Tax software must identify each auto-reinvestment transaction on-chain and calculate its tax impact.
Gas Fees and Tax Deductions
Gas fees paid in ETH (or other blockchain transaction costs) to:
- Harvest rewards
- Deposit/withdraw from protocols
- Swap tokens
These fees can be handled two ways:
Option 1: Capitalize to Cost Basis Add gas fees to the cost basis of the asset acquired. This increases cost basis and reduces future capital gains (or increases losses).
Option 2: Deduct as Investment Expense Claim gas fees as investment expenses if permitted by your tax situation (may not be deductible for most individual investors under current rules).
Recommendation: Capitalize gas fees to cost basis for most situations. This is more conservative and more commonly accepted by tax professionals.
Tracking Yield Farming Transactions
Accurate yield farming tax reporting requires capturing hundreds or thousands of transactions. Here's what you need to track:
For deposits:
- Date, tokens deposited, quantities, FMV
- LP tokens received, quantity
- Gas fees paid
For harvests:
- Date, reward token, quantity, FMV
- Gas fees paid
For reinvestments:
- Date, tokens swapped
- Tokens received, quantity, FMV
- Gas fees paid
For withdrawals:
- Date, LP tokens withdrawn, quantity
- Tokens received, quantities, FMVs
- Gas fees paid
For reward token sales:
- Date, quantity sold, sale price
- FMV at receipt (cost basis)
This level of detail is infeasible to track manually. Tax software is essential.
Example Yield Farming Tax Scenario
Let's walk through a simplified example:
January 1: Deposit $10,000 (5 ETH at $2,000 + $10,000 USDC) into a Uniswap pool; receive 50 UNI-USDC LP tokens.
- Cost basis in LP tokens: $10,000
- Gas fee: $50 (capitalized to cost basis, bringing it to $10,050)
March 1: Harvest 100 SUSHI at $5 each = $500 ordinary income. Reinvest by swapping SUSHI for 100 more UNI-USDC LP tokens.
- Ordinary income: $500
- Cost basis in new LP tokens: $500
- Total LP token cost basis: $10,550
June 1: Harvest 150 SUSHI at $3 each = $450 ordinary income.
- Ordinary income: $450
- Decide to hold SUSHI (not reinvest)
September 1: Sell 150 SUSHI for $2 each = $300 proceeds.
- Cost basis: $450 (FMV at June 1 receipt)
- Capital loss: $150
December 1: Withdraw all LP tokens (100 + 100 = 100 + 100) when worth $12,000 total.
- Cost basis: $10,550
- Proceeds: $12,000
- Long-term capital gain: $1,450 (assuming held over a year)
Annual tax summary:
- Ordinary income: $950 ($500 + $450 SUSHI)
- Capital loss: $150 (SUSHI sale)
- Long-term capital gain: $1,450 (LP withdrawal)
This simple example involves six distinct tax events across nine months. Most yield farmers manage dozens of pools and protocols, creating hundreds of tax events annually.
Recommendations for Yield Farming Tax Compliance
If you yield farm:
- Use tax software that can import blockchain data and identify all farming transactions
- Harvest systematically: Keep harvest dates and amounts documented
- Track gas fees: Maintain records of all transaction costs
- Separate farm protocols: Track each protocol separately initially, then combine in tax software
- Report annually: Don't wait until tax time to address yield farming income
- Consult a CPA: For significant yield farming activity (especially if APY exceeds your income), professional guidance is recommended
For a step-by-step walkthrough of the filing process, see how to file crypto taxes.