Back to Blog
DeFi

DeFi Taxes Explained: How to Report Yield Farming, Staking & Liquidity Pools

December 10, 2025 13 min read

DeFi (Decentralized Finance) has created incredible opportunities for crypto investors, but it also creates complex tax situations. From yield farming to liquidity pools, here's how to properly report your DeFi activities.

⚠️ DeFi Tax Complexity

DeFi transactions can trigger dozens or hundreds of taxable events per day. Manual tracking is virtually impossible. Use dedicated crypto tax software to handle the complexity.

Overview: DeFi Taxable Events

In DeFi, the following activities are typically taxable:

  • Token swaps (e.g., swapping ETH for USDC on Uniswap)
  • Receiving staking rewards
  • Yield farming rewards
  • Adding/removing liquidity from pools
  • Wrapping/unwrapping tokens (WETH, WBTC)
  • Claiming governance tokens
  • Lending interest income

Staking Rewards

How Staking Is Taxed

When you stake cryptocurrency and receive rewards, the IRS considers this ordinary income taxable at the time you receive the rewards.

Tax Treatment:

  • When received: Fair market value is ordinary income (Schedule 1)
  • Cost basis: FMV at time of receipt
  • When sold: Capital gains/losses from cost basis

Example: Ethereum Staking

  • You stake 10 ETH and receive 0.5 ETH in rewards over the year
  • Average ETH price when rewards received: $2,000
  • Ordinary income to report: $1,000
  • Cost basis of staking rewards: $1,000
  • If you later sell that 0.5 ETH for $1,500, you have a $500 capital gain

Yield Farming

How Yield Farming Is Taxed

Yield farming involves providing liquidity or assets to DeFi protocols in exchange for rewards. These rewards are typically taxable as ordinary income when received.

Common Yield Farming Taxable Events:

  1. Depositing tokens: May or may not be taxable (see liquidity pools)
  2. Receiving reward tokens: Ordinary income at FMV
  3. Claiming/harvesting rewards: Taxable when claimed
  4. Selling reward tokens: Capital gain/loss

Complexity Alert

Many yield farming protocols accrue rewards every block (every ~12 seconds on Ethereum). This could mean thousands of micro-income events per day. You'll need software to aggregate these properly.

Liquidity Pools (LP Tokens)

Adding and Removing Liquidity

Liquidity pools on platforms like Uniswap, SushiSwap, and Curve have complex tax implications. The IRS hasn't issued specific guidance, but here's the commonly accepted treatment:

Adding Liquidity:

There are two interpretations:

  • View 1: Adding liquidity is a taxable exchange of tokens for LP tokens
  • View 2: Adding liquidity is like a deposit, with tax deferred until removal

The more conservative approach (View 1) treats adding liquidity as a sale of underlying tokens and an acquisition of LP tokens at that value.

Removing Liquidity:

When you remove liquidity:

  • You're disposing of LP tokens (potential capital gain/loss)
  • You receive underlying tokens at current proportions
  • Any difference from initial deposit reflects gains/losses plus impermanent loss

Example: Uniswap Liquidity

Adding liquidity:

  • Deposit: 1 ETH ($2,000) + 2,000 USDC
  • Receive: 10 UNI-V2 LP tokens
  • Cost basis of LP tokens: $4,000

Removing liquidity later:

  • Burn: 10 UNI-V2 LP tokens
  • Receive: 0.8 ETH ($2,400) + 2,400 USDC = $4,800 total
  • Capital gain: $4,800 - $4,000 = $800

Impermanent Loss

Impermanent loss occurs when the price ratio of pooled assets changes. From a tax perspective, impermanent loss is generally not deductible as a separate loss — it's reflected in the overall gain/loss calculation when you remove liquidity.

Token Swaps (DEX Trades)

How DEX Swaps Are Taxed

Every token swap on a decentralized exchange (Uniswap, 1inch, etc.) is a taxable event, just like a trade on a centralized exchange.

  • Selling token A: Capital gain/loss based on cost basis
  • Acquiring token B: Cost basis = FMV at time of swap
  • Gas fees: Added to cost basis of acquired token

Gas Fee Treatment

ETH spent on gas for a trade can be added to the cost basis of the acquired asset or treated as a separate sale of ETH. The more beneficial approach adds gas to the purchase cost basis.

Wrapped Tokens (WETH, WBTC, etc.)

Wrapping and Unwrapping

The tax treatment of wrapping tokens (e.g., ETH → WETH) is debated:

  • Conservative view: Wrapping is a taxable exchange (triggers gain/loss)
  • Alternative view: Wrapping is a non-taxable like-kind exchange (same asset)

Most tax professionals recommend the conservative approach for wrapped versions of the same underlying asset (WETH, WBTC) given IRS scrutiny of crypto transactions.

DeFi Lending (Aave, Compound)

When you lend cryptocurrency through DeFi protocols:

  • Depositing: May or may not be taxable (depends on protocol mechanics)
  • Interest earned: Ordinary income when received
  • aTokens/cTokens: May represent a taxable exchange
  • Withdrawing: May trigger capital gains if token mechanics differ

Example: Aave Lending

  • Deposit 1,000 USDC, receive aUSDC (interest-bearing token)
  • Conservative: This is a taxable swap of USDC for aUSDC
  • Interest accrues as additional aUSDC (income when claimable)
  • Withdraw: Swap aUSDC back to USDC (may trigger gain/loss)

DeFi Record-Keeping Best Practices

  1. Track every transaction: Use a block explorer or portfolio tracker
  2. Save wallet addresses: Document all wallets you control
  3. Record protocol interactions: Note which DeFi protocols you used
  4. Screenshot or export data: Protocols can change or disappear
  5. Use dedicated software: Manual tracking of DeFi is impractical

Using BasisTracker for DeFi

BasisTracker helps you track complex DeFi transactions:

  • Wallet imports: Connect wallets to pull on-chain transactions
  • Protocol detection: Automatically identifies DeFi interactions
  • Staking/farming income: Aggregates reward income
  • LP token tracking: Handles add/remove liquidity events
  • Cost basis optimization: FIFO, LIFO, HIFO for DeFi gains

Simplify Your DeFi Taxes

Don't get overwhelmed by complex DeFi transactions. BasisTracker handles the heavy lifting.

Download BasisTracker

Conclusion

DeFi has revolutionized finance but created significant tax complexity. Each type of DeFi activity — staking, yield farming, liquidity provision, lending — has its own tax implications.

The key is maintaining detailed records and using software designed for crypto's unique challenges. Given the lack of clear IRS guidance on many DeFi activities, consider consulting with a tax professional experienced in cryptocurrency.

This article is for informational purposes only. DeFi tax treatment continues to evolve; consult a qualified tax professional for advice specific to your situation.