DeFi Token Classification
Understanding DeFi transactions and their tax treatment
The REST API reference, plus guides for the dashboard uploader.
Understanding DeFi transactions and their tax treatment
DeFi (Decentralized Finance) transactions can have complex tax implications. Here's how to classify and report them.
DeFi includes:
Different DeFi actions have different tax treatments:
What: Exchange one token for another (e.g., ETH → DAI)
Tax treatment: Capital gain/loss
Example:
Swap 1 ETH (cost basis $2,000) for 2,000 DAI at $3,000
= $1,000 capital gain
What: Deposit tokens into a DEX liquidity pool
Tax treatment: Not immediately taxable
Example:
Deposit 1 ETH + 2,000 DAI into Uniswap
= No tax event yet
You receive LP tokens representing your share
What: Earn trading fees from providing liquidity
Tax treatment: Ordinary income
Example:
Provide liquidity
Earn 0.5 ETH in trading fees over month
= $1,500 ordinary income when earned
What: Earn governance tokens or rewards from protocols
Tax treatment: Ordinary income
Example:
Farm 100 UNI tokens by providing liquidity
UNI price: $6.00 = $600 ordinary income
What: Calling functions that auto-execute transactions
Tax treatment: Depends on the action
Let's trace a complete DeFi experience:
Step 1: Swap (Capital Event)
- Sell 1 BTC (basis $40,000) for 20 ETH at $50,000
- Capital gain: $10,000
Step 2: Provide Liquidity (No immediate tax)
- Deposit 10 ETH + 200,000 USDC into Uniswap
- Receive LP tokens
- No tax event
Step 3: Earn Fees (Income Event)
- Earn 0.2 ETH in trading fees = $600 ordinary income
Step 4: Yield Farm (Income Event)
- Earn 50 UNI tokens at $5.50 = $275 ordinary income
Step 5: Withdraw Liquidity (Capital Event)
- Withdraw 10.2 ETH + 202,000 USDC
- LP tokens no longer exist
- Calculate gain/loss based on:
* Deposit value vs withdrawal value
* Impermanent loss (if any)
Step 6: Sell Everything (Capital Event)
- Sell 10.2 ETH at $48,000 = -$960 loss
- Sell 202,000 USDC at par = $0 gain
- Report losses
What: Loss from price changes while providing liquidity
Deposit: 1 ETH ($3,000) + 3,000 DAI
ETH price drops to $2,000
When you withdraw: 1.5 ETH + 2,000 DAI
You have less DAI but more ETH
= Impermanent loss if you sold at lower ETH price
Tax treatment:
TaxFormatter approach:
What: Borrow tokens with no collateral for 1 transaction
Tax treatment: Generally not taxable
Example:
Flash borrow 1,000 USDC
Use in arbitrage: Sell USDC, buy token, sell for profit
Repay 1,000 USDC + fee
= Capital gain from the arbitrage
vs
Flash borrow, arbitrage fails, repay with loss
= Capital loss
What: Protocol asks users to migrate to new contract
Old: Have 1,000 oldToken
New: Migrate to 1,000 newToken
oldToken removed from wallet, newToken added
Tax treatment: Generally NOT a taxable event
What: Original token bridged to another chain with wrapper
Have 1 BTC on Ethereum (WBTC)
Bridge to Bitcoin blockchain (1:1)
WBTC → BTC
Tax treatment: Generally NOT a taxable event
TaxFormatter formats your export and surfaces items to review in the dashboard's AI Insights panel. It does not recompute cost basis, look up historical prices, or annotate individual rows — those calculations happen in your tax software or with your tax professional, working from the formatted CSV. DeFi classification (swap vs. LP vs. farming) is one of the areas the AI Insights panel calls out for review rather than deciding for you.
❌ Mistake 1: Counting LP fees as part of LP deposit value
✅ Fix: LP fees are separate ordinary income
❌ Mistake 2: Ignoring impermanent loss entirely
✅ Fix: Flag it; consult tax pro on deductibility
❌ Mistake 3: Not tracking wrapped/bridged tokens
✅ Fix: Normalize to single asset across chains
❌ Mistake 4: Forgetting yield farm rewards
✅ Fix: All rewards = ordinary income when earned
✓ Swaps = capital gains/losses
✓ Rewards and fees = ordinary income
✓ LP deposits = no tax event
✓ LP withdrawals = calculate gain/loss
✓ Track all income from farming
✓ Impermanent loss needs tax pro guidance
✓ Wrapped tokens = same asset
✓ Ask your tax professional to confirm any classification TaxFormatter flags for review