DeFi Taxes — Swaps, Liquidity Pools, and Yield Farming
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 Action | Taxable? | Tax Type |
|---|---|---|
| Token swap (Uniswap, SushiSwap) | Yes | Capital gain/loss on the token sold |
| Adding liquidity (deposit to LP) | Likely yes | Capital gain/loss if swapping tokens |
| Removing liquidity | Likely yes | Capital gain/loss |
| Earning LP fees | Yes | Ordinary income or capital gain |
| Yield farming rewards | Yes | Ordinary income when received |
| Lending (Aave, Compound) | Interest earned = income | Ordinary income |
| Borrowing | Not taxable | No event (loan, not income) |
| Liquidation | Yes | Capital gain/loss on collateral sold |
| Wrapping tokens (ETH → WETH) | Debated | Likely 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.
| Deposit | Withdrawal | Tax Implication |
|---|---|---|
| 1 ETH ($3,000) + 3,000 USDC | 0.8 ETH ($2,800) + 3,600 USDC | Gain 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:
| Event | Tax Treatment |
|---|---|
| Deposit LP tokens | See 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:
- No 1099 forms. DEXs don't know your identity, so they can't issue tax forms.
- Multiple chains. Positions on Ethereum, Solana, Arbitrum, etc. must be consolidated.
- LP token tracking. Your share of a pool changes constantly.
- 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