DeFi Taxes — Swaps, Liquidity Pools, and Yield Farming

#DeFi taxes#liquidity pool tax#yield farming tax#DeFi swap tax#crypto DeFi IRS

DeFi takes an already complex crypto tax situation and multiplies it. A single yield farming position might generate dozens of taxable events — swaps, LP deposits, reward claims, and compound reinvestments. The IRS hasn't published specific DeFi guidance, but existing rules apply clearly enough to create real tax obligations.

Estimate your crypto tax liability with the Crypto Tax Calculator.


DeFi Taxable Events Summary

DeFi ActionTaxable?Tax Type
Token swap (Uniswap, SushiSwap)YesCapital gain/loss on the token sold
Adding liquidity (deposit to LP)Likely yesCapital gain/loss if swapping tokens
Removing liquidityLikely yesCapital gain/loss
Earning LP feesYesOrdinary income or capital gain
Yield farming rewardsYesOrdinary income when received
Lending (Aave, Compound)Interest earned = incomeOrdinary income
BorrowingNot taxableNo event (loan, not income)
LiquidationYesCapital gain/loss on collateral sold
Wrapping tokens (ETH → WETH)DebatedLikely not taxable (same asset)

Token Swaps

Every swap on a DEX is a taxable sale of one asset and purchase of another:

Swap 1,000 USDC → 0.3 ETH on Uniswap:

  • You "sold" 1,000 USDC (gain/loss depends on your USDC cost basis)
  • You "bought" 0.3 ETH at $3,333 each
  • Gas fee: 0.005 ETH (~$17) — deductible as a transaction cost

If you bought USDC at $1.00 and sold at $1.00, the gain is zero. But if you received USDC as yield at a different price, there could be a small gain or loss.


Liquidity Pool Deposits

Adding liquidity to a pool (like ETH/USDC on Uniswap) involves complexity:

Step 1 — The deposit itself may be taxable

If you deposit 1 ETH + $3,000 USDC into a pool, and you need to swap some ETH to get USDC first, that swap is taxable. The LP token you receive in return may or may not trigger a taxable event — it's debated.

Step 2 — LP tokens represent a changing position

As trades happen in the pool, your underlying position shifts. When you withdraw, you might get back a different ratio (0.8 ETH + $3,600 USDC). The difference from your original deposit is partially impermanent loss and partially earned fees.

Conservative approach: Treat the withdrawal as a taxable event — compare what you got out versus your original cost basis.

DepositWithdrawalTax Implication
1 ETH ($3,000) + 3,000 USDC0.8 ETH ($2,800) + 3,600 USDCGain on USDC portion, loss on ETH portion

Yield Farming

Yield farming rewards (governance tokens, protocol tokens) are taxable as ordinary income when you receive them:

Example — Farming SUSHI rewards on SushiSwap:

EventTax Treatment
Deposit LP tokensSee LP deposit rules above
Receive 100 SUSHI ($200 value)$200 ordinary income
Sell 100 SUSHI for $250$50 capital gain
Compound (re-deposit SUSHI)Still income when first received

If you auto-compound, each compound is a receipt of income (taxable) followed by a deposit (potentially taxable swap). Daily auto-compounding = 365 taxable events per position per year.


Lending and Borrowing

Lending (Aave, Compound)

Depositing crypto to earn interest:

  • Interest earned = ordinary income at FMV when received
  • Similar to bank interest, but paid in crypto
  • aToken/cToken rebasing represents interest accrual — taxable as received

Borrowing

Taking a loan using crypto as collateral:

  • Not taxable — loans aren't income
  • The crypto you deposited as collateral is not "sold"
  • Interest paid on the loan is generally not deductible (personal use)

Liquidation

If your collateral is liquidated:

  • Treated as a forced sale of your collateral
  • Capital gain or loss based on the collateral's cost basis
  • Liquidation penalty is an additional loss

Practical Tracking Challenges

DeFi is harder to track than exchange trading because:

  1. No 1099 forms. DEXs don't know your identity, so they can't issue tax forms.
  2. Multiple chains. Positions on Ethereum, Solana, Arbitrum, etc. must be consolidated.
  3. LP token tracking. Your share of a pool changes constantly.
  4. Bridging. Moving assets across chains creates additional events to track.

Tools that help:

  • DeBank / Zapper — Portfolio tracking across chains
  • Koinly, CoinTracker, TokenTax — DeFi-aware tax calculation
  • Chain-specific explorers — Transaction-level detail

Best Practices

  • Track every transaction — connect wallets to tax software early, not at year-end
  • Screenshot positions — LP values at deposit and withdrawal
  • Separate wallets by activity — one for trading, one for DeFi, one for holding
  • Keep gas receipts — gas fees can add to cost basis or be deducted as expenses
  • Consider quarterly estimates — DeFi income can be substantial; avoid underpayment penalties

Report all DeFi activity on Form 8949 and Schedule D. Use the Federal Tax Calculator to estimate your overall tax.

Share this article