DeFi Tax? Koinly demystifies the mysterious.

Got DeFi gains? The IRS wants their cut by the 18th of April 2022. Don’t panic - we’re unraveling everything you need to know about crypto tax in our how-to guide.

The IRS has made it very clear you need to pay tax on your crypto and report crypto gains and income in your annual Income Tax return. What’s less clear though is how exactly some DeFi crypto transactions are taxed. The IRS guidance hasn’t been updated since 2019, so while they cover the basics, they’ve left more recent market developments - like DeFi and NFTs, shrouded in mystery..

But don’t think you’re off the hook! There’s enough guidance to infer the tax implications of DeFi in the US.  Head of Tax, Tony Dhanjal at crypto tax calculator Koinly, spills the tea.

DeFi tax basics

DeFi tax gets complicated. It all depends on how the specific protocol you’re using works.

Buying, trading or selling on dexes? Easy. Follow the same Capital Gains Tax rules as you would for any other crypto coin or token.

Staking, liquidity mining, yield farming or lending? Whatever you’re up to -  the taxes you’ll pay all depends on how your specific protocol works, it could be subject to Capital Gains Tax or Income Tax. It all boils down to whether you earn new tokens or whether the price of your token increases. 

Let’s take a look at some different examples from popular protocols and how they’re taxed.

Liquidity pool taxes 

Liquidity pools essentially break down into three transactions - each of which may be taxed differently:

  • Adding liquidity
  • Removing liquidity
  • Realizing a gain or earning new tokens.

You might think that adding and removing liquidity from a given pool is tax free - but it’s not quite that simple because of liquidity pool tokens. When you add liquidity to a given pool, you’ll get LP tokens in return - representing your capital in the pool. Similarly, when you want to remove your capital, you’ll trade your LP tokens back for your capital.

From a tax perspective, this could be seen as a crypto to crypto trade - which means this transaction will realize a capital gain or loss, and  is subject to Capital Gains Tax.

When it comes to earning through liquidity pools - it all depends on how your specific liquidity pool works, so we’ll use a couple of examples.

For example, let’s say you added liquidity to a pool on PancakeSwap. You get liquidity pool tokens in return representing your stake in the pool and you get a percentage of the transaction fees as a reward. Your rewards aren’t paid out in the form of new tokens though. Instead, the value of your LP tokens increases. It’s only when you remove your capital from the pool that you’ll realize a profit. This example is more akin to a capital transaction and you’d pay Capital Gains Tax on any profit at the point you realize it. Any other protocols that work like this would be subject to the same tax treatment.

Now let's say you want to add to a Compound lending pool instead. Like above, you'll get cTokens that represent your capital in the lending pool and these cTokens will accrue value as you earn. So adding and removing liquidity (and some of your rewards) would still be subject to Capital Gains Tax when you transfer capital - like above. However, you'll also receive COMP tokens. You earn new COMP tokens - which you can claim at any time. Because you're earning new tokens, this is more likely to be seen as a kind of additional income and you'd pay Income Tax based on the fair market value of your tokens at the point you received them. 

What about staking, how is that taxed?

Staking can refer to two different activities in the DeFi space - although they’re both similar from a tax perspective. 

If you’re staking as part of a proof of stake consensus mechanism - for example if you’re staking ADA, AVAX or SOL - it’s likely that you need to pay Income Tax based on the fair market value of any staking rewards at the point you receive them. However, this is currently being challenged in court, so the tax treatment of staking  could be set to change in the future.

Meanwhile, if you’re staking tokens in various DeFi protocols in order to earn more rewards - like with liquidity pools - it all depends on how your specific DeFi protocol works.

SushiSwap is a great example for both of the different kinds of tax you could pay. For example, you can stake your SLP tokens and KMP tokens to earn SUSHI tokens. As you're earning new SUSHI tokens, you'll need to pay Income Tax based on the fair market value of your SUSHI tokens (in USD) at the point you receive them.

You can then stake your SUSHI tokens in the Sushi bar to earn XSUSHI. When you stake your SUSHI tokens though - you'll receive XSUSHI tokens in return. XSUSHI - like SLP and KMP tokens - accrue value. So you'll only realize a gain when you unstake your SUSHI by exchanging your XSUSHI tokens back. This would be more like a trade and therefore you'll pay Capital Gains Tax on any profits from trading your SUSHI tokens instead, both when staking and removing your stake.

Yield farming taxes

Yield farming tax - like above - all comes down to how your specific DeFi protocol works. 


Keep up with the latest news, trends, charts and views on crypto and DeFi with a new biweekly newsletter from The Block's Frank Chaparro

By signing-up you agree to our Terms of Service and Privacy Policy
By signing-up you agree to our Terms of Service and Privacy Policy

For example, if you’re using the Inari yield farming protocol on SushiSwap - then you’re effectively trading SUSHI for XSUSHI - even if your SUSHI is then being lent out through different protocols in order to earn returns. This would be seen as crypto trade and any profits subject to Capital Gains Tax.

Meanwhile, if you were using PancakeSwap to stake LP tokens to earn CAKE (or even then staking that CAKE in order to earn more CAKE or tokens) then you earn new tokens as a result of your activities. This is more likely to be seen as additional income, so you'd pay Income Tax based on the fair market value of your tokens at the point you received them. 

NFT tax

We’ll include NFTs here as a little bonus, because the rules are just as muddy as they are for DeFi. From a tax perspective - NFTs aren’t all that different to any other token. They’re still seen as a kind of property and when you dispose of NFTs by selling or trading them, you’ll pay Capital Gains Tax on any profit you make.

We’ll include a caveat here though that the tax treatment of sold NFTs depends on whether you made the NFT. If you’re creating and selling NFTs (like a regular artist with a paintbrush), you’ll pay Income Tax instead.

There’s also the potential that in the future the IRS decides to tax some NFTs under the special collectibles tax rate of 28%,  instead of the maximum long-term Capital Gains Tax rate of 20%.

Wait, is nothing tax free?

The IRS will spare you taxes on a select few occasions, including:

  • Buying crypto with USD.
  • Transferring crypto between your own wallets.
  • HODLing crypto.
  • Gifting crypto (though you’ll need to file Form 709 if it’s more than $16,000 in value).
  • Donating crypto to a registered charity. 

How to calculate, report and file your DeFi crypto taxes in 5 steps

Now you get how it’s taxed, you can see how much of a hellscape crypto tax reporting is. We haven’t even got to the worst part either because not only do the IRS want a cut of your crypto gains and income - but the reporting requirements are heavy.

You’ll need to report every single disposal of crypto  in Form 8949, your net capital gain and loss in Schedule D, any income from crypto in Schedule 1 and add all this to Form 1040. It should go without saying but for investors involved in DeFi, this is potentially thousands of transactions that they need to report.

Save yourself hours of pain, use Koinly crypto tax calculator and follow these 5 easy steps to file your crypto taxes instead:

    1. Connect all your wallets, exchanges and blockchains to Koinly. You can do this via API or by importing CSV files of your transaction history. 
    2. Grab a coffee and let Koinly do its stuff. Koinly will collate your entire crypto transaction history and identify which transactions are taxable and which aren’t. Then it’ll calculate your cost basis, capital gains or losses and the fair market value of any crypto income on the day you received it.
  • Download your crypto tax report. Download the tax report you need, when you need it. Koinly can generate a huge variety of reports including Form 8949 and Schedule D, TurboTax online reports and our Complete Tax Report, with everything you need to know about your crypto taxes.
  • Use your crypto tax report to file your preferred way. Hand your reports over to your accountant, upload your crypto tax report to your tax app or live in the 1990s and file by post. The choices are endless.
  • Relax - you’re done for another year. 

That’s it - you’re done. If you’d like to learn more about crypto tax - check out Koinly’s ultimate US crypto tax guide.


This post is commissioned by Koinly. This report is for informational purposes only and should not be relied upon as a basis for investment decisions, nor is it offered or intended to be used as legal, tax, investment, financial or other advice. You should conduct your own research and consult independent counsel on the matters discussed within this report. Past performance of any asset is not indicative of future results.

© 2022 The Block Crypto, Inc. All Rights Reserved.

© 2023 The Block. All Rights Reserved. This article is provided for informational purposes only. It is not offered or intended to be used as legal, tax, investment, financial, or other advice.