How to Track Solana DeFi Taxes
Solana DeFi is fast and cheap, but every swap, deposit, and withdrawal creates a taxable event. Here's how to stay on top of it.
Token Swaps Jupiter, Raydium, Orca
Every token swap on Solana is a taxable disposition — even if no fiat (USD) changes hands. When you trade Token A for Token B, the IRS treats it as two separate events: you sold Token A (triggering a capital gain or loss) and bought Token B (establishing a new cost basis).
This applies regardless of the DEX you use. Jupiter aggregates routes across Raydium, Orca, and others — but each underlying swap is still a taxable event.
- ✓ Swap = selling Token A + buying Token B — two events, one transaction
- ✓ Capital gain/loss on Token A = proceeds minus your cost basis in Token A
- ✓ Your new cost basis in Token B = fair market value at time of swap
- ✗ "I never converted to USD" is not a valid reason to skip reporting
- — Transaction fees paid in SOL can be added to your cost basis or deducted as an expense
Even if BONK subsequently crashes to zero, your $500 gain on SOL was realized the moment you swapped. You would claim a separate capital loss on BONK only when you later sell or dispose of it.
Liquidity Pool Deposits & Withdrawals
Providing liquidity is one of the most tax-ambiguous areas of DeFi. The IRS hasn't issued direct guidance, and many crypto CPAs hold different views. Here's the most widely used interpretation:
- ✓ Depositing tokens into an LP likely constitutes disposing of those tokens in exchange for LP tokens — a taxable event
- ✓ Withdrawing from an LP = disposing of LP tokens for the underlying assets — another taxable event
- ✓ LP fee income (your share of trading fees) is generally treated as ordinary income when received or when withdrawn
- ✗ Impermanent loss is NOT directly tax deductible — it's only realized when you withdraw and the actual loss is crystallized
- — Some tax professionals argue LP deposits are non-taxable token conversions — discuss with your CPA before filing
The practical problem is that LP tokens from Raydium or Orca don't always have a clear market price on the day you deposit. You'll need to reconstruct the USD value of each token deposited at the time of the transaction — which is why having a full transaction history with timestamps matters.
Yield Farming & Lending
Solana has a rich lending and yield ecosystem — Marginfi, Kamino, Solend, and others. Each creates distinct tax events depending on how you earn.
- ✓ Interest and yield earned are ordinary income — taxed at your marginal rate, not capital gains rate
- ✓ Record the fair market value of each reward or interest payment on the day you receive it — that's your income amount and your new cost basis
- ✓ Depositing into Marginfi or Kamino creates a lending position — track deposits and withdrawals separately from your spot holdings
- ✓ Reward tokens from farming (e.g., protocol incentives) = ordinary income at FMV when received, regardless of whether you sell them
- — Borrowing against collateral is generally not taxable — but liquidations are, since they constitute a forced sale of your collateral
The most common mistake: people track the tokens they borrowed and repaid, but forget to record the reward tokens they harvested along the way. Each harvest is a separate income event.
How to Track It All
DeFi transaction volumes add up fast. A single week of active trading can produce hundreds of on-chain events. Here's a practical approach to staying organized:
- ✓ Start with your full transaction history — export everything before categorizing anything. LanaTax pulls this for free using your Solana wallet address.
- ✓ Identify each DeFi interaction by type — sort by transaction type (SWAP, TRANSFER, STAKE, etc.) before trying to calculate anything
- ✓ Use Helius transaction type labels — LanaTax uses Helius enrichment to categorize transactions, which makes identifying swaps, NFT mints, and DeFi events much faster
- ✓ Keep a separate record for LP positions — note the date, tokens deposited, USD value at deposit, and tokens received on withdrawal
- ✓ Resolve UNKNOWN transactions before filing — any transaction your tax software can't categorize needs manual review. Don't leave them blank.
- ✓ When in doubt, consult a crypto-savvy CPA — LP and lending tax treatment is genuinely unsettled. A professional can help you choose a defensible position.