Compound and PancakeSwap taxes in the US: a transaction-by-transaction guide
There is no single US tax rule called “the Compound rule” or “the PancakeSwap rule.” Federal tax treatment follows the economic event: exchanging one token for another, receiving a reward, creating or repaying a genuine debt, depositing assets for a new contractual right, redeeming an LP token or being liquidated. The IRS treats digital assets as property, but it has not issued a protocol-by-protocol ruling for every DeFi structure. A defensible report therefore maps each on-chain step, preserves the evidence and identifies uncertain ownership changes instead of forcing every smart-contract interaction into one category.
The DeFi tax event matrix
Prepare Your Crypto Tax Workpapers
Import your transactions, review the results and generate detailed tax workpapers without building the entire calculation manually in spreadsheets.
Start for free →| On-chain action | Likely reporting question | Do not assume |
|---|---|---|
| Token A swapped for token B | Disposition of A; basis established in B | That crypto-to-crypto is tax-free |
| Asset supplied to a lending contract | Did beneficial ownership change or did the user receive a new asset/right? | Every deposit is automatically a sale or automatically non-taxable |
| Borrowed token received | Is there a genuine obligation to return equivalent property? | Every inflow is income |
| Interest, incentive or farm reward claimed | Value and time of dominion and control; character under the facts | Every reward is capital gain |
| Liquidity added and LP token received | Was property exchanged for a distinct token or contractual interest? | All LP deposits share one fixed IRS treatment |
| Liquidity removed or lending position redeemed | Disposition of the claim/LP token and basis of assets returned | Withdrawal is merely an own-wallet transfer |
| Collateral liquidated | Disposition proceeds, basis, debt and fees | Liquidation is invisible because it was automatic |
The IRS digital-assets page states that digital assets are treated as property and that a sale or exchange can create gain or loss. This clearly covers a straightforward PancakeSwap token exchange. More complex lending and liquidity transactions require analysis of the rights given up and received. The IRS has not published a blanket conclusion for every Compound market, PancakeSwap pool, bridge wrapper or vault.
Compound lending, borrowing and collateral
A Compound workflow may contain four economically different layers: supplying collateral, receiving a protocol claim or balance, borrowing another asset and later redeeming or repaying. A tax engine should keep those legs separate. The wallet transfer into the smart contract is not enough by itself to determine whether the user disposed of property; the decisive question is whether the transaction exchanged the original asset for a materially different asset or right under the applicable facts.
Borrowed proceeds are generally analysed as a liability rather than income only where the arrangement represents genuine debt with an obligation to repay. DeFi documentation should therefore retain the borrowed quantity, token, USD value, collateral, interest accrual and repayment. If the protocol closes or liquidates collateral to satisfy the liability, the collateral disposition can create a gain or loss even though the user did not press a sell button.
Interest paid by an individual is not automatically deductible. Its treatment can depend on use of proceeds, investment-interest limitations, business status and substantiation. Interest received, COMP incentives or other tokens may be gross income when the taxpayer has dominion and control, but the correct character and timing depend on the reward arrangement. The IRS's staking ruling specifically addresses validation rewards in a proof-of-stake context; it should not be quoted as a protocol-wide ruling that resolves every lending incentive.
- Do not net deposits, borrowings, interest and liquidation into one unexplained P&L number.
- Do not treat a position snapshot as realised income.
- Preserve the transaction hash and protocol position identifier.
- Reconcile debt outstanding at year-end separately from taxable disposals.
- Check whether fees are already included before deducting them again.
PancakeSwap swaps, liquidity pools and farming
A direct swap of BNB for CAKE, USDT for BNB or one token for another is an exchange of property. Calculate proceeds for the asset surrendered at its USD fair market value, subtract its adjusted basis and establish the received asset's basis from the transaction value plus or minus properly capitalised costs. Gas and protocol fees must be linked to the actual transaction and used once.
Adding liquidity is more nuanced. If the user transfers two assets and receives a distinct LP token representing a pooled claim, there is a credible exchange analysis. If the legal and economic rights instead remain substantially unchanged, the conclusion may differ. Because the IRS has not issued a PancakeSwap-specific safe harbour, software should expose the selected treatment and its effect rather than silently marking every LP action taxable or non-taxable.
Removing liquidity reverses the structure: the LP token or claim is surrendered and underlying tokens return. The report needs the basis of the LP interest and the values of each asset received. Impermanent loss is not a separate deduction merely because a dashboard displays it; the realised result follows the actual disposition and basis calculation.
Farm rewards, CAKE incentives and fee distributions need a separate receipt record. A token received with unrestricted control may be income at fair market value. That amount generally becomes basis for a later sale, preventing the same value from being taxed twice. Merely accruing an amount that cannot yet be transferred or claimed can require a different timing analysis.
Other DeFi events that often break the calculation
Bridges and wrapped tokens can appear as a send on one chain and a receipt on another. That does not prove either a taxable exchange or a non-taxable transfer. Determine whether the user retained the same beneficial interest and whether a distinct token was received. Rebase changes, vault shares, token migrations and protocol compensation also need event-specific mapping.
- Approvals: contract approvals alone normally move no property and should remain informational.
- Gas: link gas to the transaction it facilitates; do not deduct it once as a fee and again through proceeds.
- Failed calls: they may incur gas without completing the intended exchange.
- Reinvested rewards: first identify the receipt, then the reinvestment; do not hide both inside the final LP balance.
- Liquidations: reconstruct collateral sold, debt repaid and liquidation penalty.
- Spam tokens: exclude malicious or valueless unsolicited entries from income only after documenting why.
The DeFi audit-trail guide explains how source movements and tax events should remain connected.
Form 8949, Schedule D and ordinary income
Capital-asset disposals generally flow through Form 8949 and Schedule D. Each reportable line needs a description, acquisition date, disposition date, proceeds, basis and adjustments where applicable. Ordinary reward or service income does not become a Form 8949 sale merely because it was paid in a token; it belongs in the applicable income route, while a later disposal of that token can create a separate capital gain or loss.
For 2025 and later digital-asset tracking, wallet-level basis records are especially important. Opening balances and own-wallet transfers determine whether the engine can identify an acquisition. Zero basis must not be presented as confirmed merely because the source is missing. If basis cannot be verified, the report should label the line for reconciliation and preserve the known proceeds rather than inventing a purchase.
Use the Form 8949 crypto guide for line categories and the US crypto tax guide for the broader return workflow. A Form 1099-DA choice does not by itself classify DeFi income, lending or derivative contracts.
A defensible DeFi record set
Download protocol and wallet history before an interface changes. An explorer transaction is essential but may not explain the economic intent; a protocol statement is helpful but may aggregate events. Keep both, together with the tax engine's mapping.
- wallet addresses and ownership evidence;
- transaction hashes, block times and chain IDs;
- assets and quantities sent and received;
- USD price source and timestamp;
- gas, protocol, liquidation and borrow fees;
- LP, lending and vault positions before and after the event;
- reward claimability and transfer restrictions;
- basis carried through bridges, wrappers and own-wallet transfers;
- manual classification changes with reason and date.
Run a year-end reconciliation by token and by protocol. If the calculated closing quantity differs from the on-chain balance, do not solve it by inserting a taxable receipt. Locate missing history, decimal errors, unsupported tokens or duplicated bridge legs first. The US staking guide covers the narrower IRS ruling for proof-of-stake validation rewards.
Frequently asked questions
Is depositing crypto into Compound always taxable?
No blanket IRS rule says that every Compound deposit has one result. Analyse whether the user exchanged the asset for a materially different token or right and document the contract.
Is a PancakeSwap token swap taxable in the US?
Generally yes: exchanging one digital asset for another is a property disposition. Report the asset surrendered and establish basis in the asset received.
Are DeFi borrowings taxable income?
A genuine loan is generally analysed as debt rather than income, but the facts must establish an obligation to repay. Liquidation or debt cancellation can create separate consequences.
Can I deduct impermanent loss?
Not as a standalone dashboard metric. The tax result follows actual disposals, proceeds and adjusted basis when the LP interest or assets are realised.
Where do DeFi rewards go on the return?
Potential income is reported in the applicable income category; a later disposal is a separate capital transaction. The exact category depends on how the reward was earned.
Official IRS sources
- IRS: digital assets guidance and official resources
- IRS Revenue Ruling 2023-14 on proof-of-stake rewards
- IRS: Form 8949, Sales and Other Dispositions of Capital Assets
- IRS: Schedule D (Form 1040)
Reviewed 1 September 2026. This is a reporting guide, not a protocol-specific IRS ruling or individual tax advice.
Related Resources
Generate Your Crypto Tax Report
Import your transactions, review the results and generate a detailed PDF report with a transaction-level audit trail.
Start for free →Disclaimer: This article is for general informational purposes only and does not constitute tax advice. For individual tax advice, consult a licensed tax professional.