We use cookies

We use essential cookies to run the site, and optional cookies for analytics. We never sell your data.Cookie Policy·Privacy Policy

How DeFi is taxed

DeFi is where crypto tax gets genuinely hard: a single strategy can fire dozens of taxable events across lending, liquidity, swaps, and rewards, and the rules are still settling. This guide covers the general principles and how CryptaTax untangles it from your on-chain history.

Calculate my DeFi taxes

General information, not tax advice. DeFi treatment is evolving, often lacks specific guidance, and varies by country, this is a good area to get professional advice and verify against your country's guidance.

How DeFi is taxed

The general principles

Most DeFi tax questions come down to two: is this a disposal (capital gains) or is this income?

  • Token swaps, generally a disposal of the token you give up, so a capital gain or loss (except in countries that don't tax crypto-to-crypto, like France and Poland).
  • Providing/withdrawing liquidity, depositing into or withdrawing from a pool may be a taxable exchange (e.g. swapping tokens for an LP token), depending on jurisdiction.
  • Yield, rewards, and liquidity-mining incentives, usually ordinary income at their value when received.
  • Lending, interest earned is usually income; the loan principal itself typically isn't a disposal.
  • Wrapping (e.g. ETH → WETH), may be a taxable exchange in some jurisdictions.
  • Impermanent loss, generally doesn't reduce your tax until you actually withdraw and realise it.

Because these depend heavily on country, the same action can be taxable in one place and not another.

How countries differ

  • United States, providing liquidity is often treated as a taxable exchange, yield is income, and wrapping may be a taxable exchange. US crypto tax →
  • France & Poland, crypto-to-crypto swaps aren't taxable, which changes how many DeFi legs are treated; tax often arises on cashing out to fiat. France → · Poland →
  • United Kingdom, DeFi follows HMRC's framework, where lending and liquidity may be disposals and rewards may be income or capital depending on the arrangement. UK crypto tax →

How CryptaTax handles DeFi

  • Ingests your on-chain DeFi activity across protocols and chains
  • Classifies each leg, swap, liquidity add/remove, lending, yield, wrap, bridge, according to your jurisdiction's treatment automatically
  • Separates capital gains from income so each lands in the right place
  • Tracks cost basis through complex, multi-step strategies

Capital gains report → · Income report → · Import your wallets →

Calculate my DeFi taxes

A worked example: one yield strategy, many taxable events

The reason DeFi feels overwhelming is that a single afternoon of activity can quietly create a long chain of separate tax events. Follow a typical liquidity and yield strategy step by step and you can see how quickly the legs add up, and why trying to reconstruct it by hand months later is so error-prone.

  • Step 1, you swap one token for another to get the pair you need for a pool. In most countries that swap is a disposal of the token you gave up, so it crystallises a capital gain or loss right there, before you have even entered the pool.
  • Step 2, you deposit both tokens and receive an LP token. Depending on your jurisdiction this can be treated as a further taxable exchange, handing over two assets in return for a new one, or as a non-event, with treatment that is still unsettled in many places.
  • Step 3, you stake the LP token in a yield programme. Staking the receipt token itself is often not a disposal, but the rewards that start accruing are usually ordinary income, valued each time you become entitled to them.
  • Step 4, you claim rewards repeatedly. Each claim is a fresh income event at that moment's value, and that value also becomes the cost basis for the reward tokens, which matters when you sell them later.
  • Step 5, you withdraw your liquidity. Unwinding the position can be another taxable exchange, and only now does any impermanent loss become real, because it is the withdrawal, not the paper fluctuation while you were in the pool, that you actually realise.
  • Step 6, you swap back to a stablecoin or to fiat. A final disposal closes the loop, measured against whatever cost basis each token carried out of the earlier steps.

One strategy, and you may have generated capital-gains events and income events spread across half a dozen transactions, each needing its own value on its own date. Miss the income legs and you understate income; miss the cost basis the income legs created and you later overstate your gains. This is exactly the kind of bookkeeping that rewards automation over spreadsheets.

Edge cases that trip people up

Lending and borrowing

Depositing into a lending protocol to earn interest is usually straightforward, the interest is income, and the principal coming back is not normally a disposal. Borrowing is where it gets subtle. Taking out a loan against your crypto is generally not a taxable event, because you have not disposed of anything. But if your collateral is liquidated to repay the loan, that liquidation is typically a disposal of the collateral, often at a bad moment and an awkward price, so a forced liquidation can leave you with a tax bill on top of the loss of the position.

Liquidity pools and receipt tokens

The crux with pools is whether your country sees the LP token as a new asset you acquired in exchange for your deposit, or merely as a receipt evidencing ownership you never gave up. The first reading makes entering and exiting the pool taxable exchanges; the second does not. Guidance is genuinely mixed and evolving, which is why the same liquidity move can be taxed in one jurisdiction and ignored in another.

Bridging and wrapping across chains

Moving an asset across a bridge to another chain, or wrapping it into a 1:1 representation, raises the same question: have you disposed of the original and acquired something new, or simply relabelled the same holding? Where the economic substance is unchanged, many would argue there is no real disposal, but some jurisdictions treat any token-for-token exchange as taxable on its face. The safe move is to keep the bridge and wrap transactions clearly recorded so the treatment can be applied either way.

Rebasing and auto-compounding tokens

Some DeFi tokens rebase, your balance changes automatically, or sit in auto-compounding vaults that reinvest yield for you. These can generate income you never consciously claimed, and the timing and valuation of that income is rarely obvious from the wallet alone. They are a common source of under-reported yield precisely because nothing looks like a manual claim.

Common DeFi tax mistakes

  • Treating crypto-to-crypto swaps as tax-free because no fiat moved. In most countries every swap is a disposal, only a few jurisdictions tax solely on the cash-out.
  • Forgetting the income leg of yield entirely, then being surprised when the same tokens are taxed again as gains on sale. Reward tokens are taxed twice in two different ways: as income on receipt, and on any change in value afterwards.
  • Losing cost basis through multi-step strategies. Each swap, wrap, and pool entry resets what a token cost, drop the thread anywhere and every later disposal is wrong.
  • Double-counting transfers between your own wallets as disposals because the two sides were never matched.
  • Ignoring gas and transaction fees, which often form part of cost basis or proceeds and can quietly change the result on high-frequency strategies.
  • Assuming a protocol's dashboard equals tax-ready data. Protocol UIs show positions and APYs, not dated cost basis and per-leg classifications.

How countries diverge further

Because formal DeFi guidance is thin almost everywhere, the gap between countries is wide and the details matter. Your country guide is the place to confirm how each leg is treated where you live:

  • United States, swaps, many liquidity moves, and often wrapping are treated as taxable exchanges, while yield and lending interest are income. See the US crypto tax guide →.
  • United Kingdom, HMRC has specific DeFi guidance that turns on whether a return is capital or revenue in nature, and on whether beneficial ownership of tokens actually changes when you provide liquidity. See the UK crypto tax guide →.
  • Germany, the distinction between private disposals and income, and the role of holding periods, can shape how staking-style yield and disposals interact. See the Germany crypto tax guide →.
  • France and Poland, because crypto-to-crypto trades are not themselves taxed, many internal DeFi legs fall away and tax tends to crystallise on the exit to fiat. See France → and Poland →.

Record-keeping for DeFi

Good DeFi records are less about any single number and more about preserving the full chain so each leg can be valued and classified correctly. The activity is all on-chain, which is a blessing and a curse: nothing is hidden, but reconstructing intent from raw transactions is hard once the protocols themselves have changed.

  • Every wallet address you used, so cross-wallet movements can be matched rather than mistaken for disposals.
  • The date, time, and token amounts for each swap, deposit, withdrawal, claim, wrap, and bridge.
  • A fair value for any reward or yield token on the day you became entitled to it, since that value is both income and future cost basis.
  • Gas and protocol fees paid on each transaction.
  • Notes on what each position actually was, because a string of contract interactions is meaningless months later without context.

For the underlying mechanics that everything above relies on, the cost basis guide → and the income guide → are worth reading alongside this one.

How CryptaTax automates the hard part

DeFi is the strongest case there is for letting software do the reconstruction. CryptaTax reads your on-chain history directly, recognises the protocols and the shape of each interaction, and rebuilds the chain of events so that nothing in the worked example above slips through. It separates the income legs from the capital-gains legs, carries cost basis through every swap, wrap, and pool entry, and applies your jurisdiction's treatment automatically rather than asking you to classify each transaction by hand.

Connect your wallets once and the messy parts, matched transfers, dated reward values, fee handling, and impermanent loss realised only on withdrawal, are handled for you, then split cleanly across your capital gains report → and income report →.

Calculate my DeFi taxes

More DeFi tax questions

Is borrowing against my crypto a taxable event?

Taking out a loan and posting crypto as collateral is generally not a disposal, so it usually is not taxable on its own. The tax risk sits in liquidation: if your collateral is sold to cover the loan, that sale is typically a disposal of the collateral. Treatment can vary by country, so confirm with your country guide.

How is impermanent loss taxed?

Impermanent loss is only a paper figure while you remain in the pool, it generally has no tax effect until you withdraw and turn it into a real gain or loss. At that point the difference between what you put in and what you took out is what matters, measured against your tracked cost basis.

Do I owe tax if I only moved tokens between chains?

Bridging the same asset to another chain may or may not be a disposal depending on how your jurisdiction views the move and whether the economic substance changes. Keep the bridge transactions recorded so the right treatment can be applied; do not assume it is automatically tax-free or automatically taxable.

Can CryptaTax tell income apart from gains automatically?

Yes. That separation is the core of what it does for DeFi, yield, rewards, and lending interest are routed to income, while swaps and qualifying liquidity moves are treated as disposals, all according to your country's rules and with cost basis carried through. You review the result rather than building it from scratch.

Where DeFi fits with the rest of your crypto tax

DeFi rarely happens in isolation. The coins you route through a protocol usually arrived from somewhere, an exchange buy, a staking reward, an airdrop, and they usually leave to somewhere, often back to an exchange to cash out. That means your DeFi activity is one chapter in a longer story, and the cost basis flowing into a swap or pool entry was set by an earlier event entirely outside DeFi. Treating the protocol as a self-contained world is exactly how basis gets lost and gains get overstated; the figures only reconcile when DeFi is stitched into your whole portfolio.

This is also why the disposal-versus-income split that runs through every guide matters so much here. A single strategy can produce both at once, and the income legs you recognise in DeFi feed straight into your income report, while the disposals land in your capital gains report alongside ordinary trades. Reading the trading guide next is worth it, because most DeFi legs are ultimately a disposal wearing a more complicated costume.

Getting DeFi right the first time saves disproportionate effort later, because errors compound through every downstream transaction. The practical move is to capture the full on-chain trail as you go and let it reconcile against your exchange activity, rather than reconstructing intent from raw contract calls months afterwards. CryptaTax reads the chain directly, places each leg on the income or disposal side under your jurisdiction's rules, and carries basis through the messy middle so the protocol activity lines up with everything else you did. The country-specific treatment that decides the closer calls, whether a liquidity move or a wrap is a disposal where you live, sits on your crypto tax by country page. Because formal DeFi guidance is still thin almost everywhere, this is also the area where reconciling early and keeping the full trail pays off most: the gaps you leave today are the ones that are hardest to close when you finally sell out of a position years later.

FAQ

Is DeFi taxable?

Yes, generally, though treatment is unsettled and varies by country. Swaps and some liquidity moves can be disposals; yield and lending interest are usually income.

Is providing liquidity a taxable event?

In many countries it can be. Depositing tokens for an LP token may be treated as a taxable exchange. It depends on your jurisdiction.

How is yield farming taxed?

Rewards and incentives are usually ordinary income at their value when you receive them, with a capital gain or loss when you later sell them.

Does wrapping ETH to WETH trigger tax?

It may, in some jurisdictions, if treated as a taxable exchange. Treatment is not settled everywhere.

Can CryptaTax handle complex DeFi?

Yes. It ingests your on-chain activity and classifies each leg per your country's rules, separating gains from income.

Related guides

Country-specific rules