Michelle Legge
By Michelle LeggeHead of Crypto Tax Education
Updated Apr 22, 2024
This article has been fact checked and reviewed as per our editorial policy.

USA DeFi Taxes: The Ultimate Guide 2024

DeFi has boomed in popularity since the 2020 DeFi summer and now millions of crypto investors in the US are using DeFi protocols to earn more crypto. As with all crypto investments, the IRS wants to know about your DeFi investments and tax them accordingly - either under Income Tax or Capital Gains Tax. We’re exploring everything you need to know about DeFi tax in the United States including what DeFi is, how investors are making money with DeFi and how DeFi earnings will be taxed by the IRS.

What is DeFi?

DeFi is an all-encompassing term for a variety of financial apps built on blockchain technology.

The term DeFi itself is short for decentralized finance. In essence, DeFi hopes to provide all the services traditional centralized financial institutions - like banks or even cryptocurrency exchanges - do, but without any limitations like regulations, borders and policies.

To understand this better, let’s look at an example. You want to take a loan out from the bank. You need to go to the bank, provide extensive information like your name, address, proof of your income, your credit score, your citizenship and more. The bank holds all the cards in this situation - they set the terms of the agreement, the repayment schedule and the rate of interest. They decide whether or not they’ll approve you for the loan based on your personal data and circumstances - and they can refuse you on something as simple as a less than stellar credit score.

With DeFi, there is no bank or any other intermediary party. Funds are created from liquidity pools - that is pools of various crypto assets like USDT, ETH or WBTC, provided by other investors - and anyone with enough collateral (or sometimes even with no collateral) can use these liquidity pools to perform a variety of transactions.

What is DeFiAll these transactions are automated by smart contracts - pieces of digital code that set the terms of the transaction. Those who want to use DeFi protocols to access different financial services don’t need to provide extensive personal data like KYC, bank records, credit scores and so on.

They’re borderless, limitless and transparent thanks to blockchain technology. With these tenets, DeFi hopes to empower people around the world with more control over their finances and improved access to financial services that centralized institutions have rigidly controlled.

It’s a tall order - but DeFi platforms have attracted more than $90 billion in collateral since the term was coined in 2018.

Most DeFi protocols are currently built on the Ethereum blockchain due to the smart contract capabilities. Smart contracts can be used for practically anything, provided you can write the code to execute it - let’s take a look at what DeFi can do.

General CTA

The DeFi market is constantly growing. Where it once started by imitating the services provided by typical crypto exchanges - like trading crypto, buying crypto, and selling crypto - on decentralized exchanges, the financial services offered now are far vaster. Let’s look at some examples of popular DeFi protocols.

  • Buy, sell, and trade crypto on decentralized exchanges (Dexes) like Curve and Uniswap.

  • Borrow and loan crypto through decentralized lending protocols like Aave and Compound.

  • Open a savings account through DeFi protocols like Anchor.

  • Buy, sell, and trade NFTs through decentralized NFT marketplaces like Open Sea.

  • Insure crypto, NFTs, and other digital assets through DeFi insurance protocols like Armor and Unslashed.

  • Make margin trades, trade derivatives, options, and other CFDs through DeFi protocols like Opyn and Lyra.

  • Diversify and balance your crypto portfolio through DeFi indexes like Set Protocol and Index Coop.

  • Play DeFi games like Axie Infinity, Decentraland, and Sandbox and earn tokens.

  • Use specific decentralized apps (Dapps) like Drife or PoolTogether.

  • Gamble crypto and bet crypto through DeFi gambling protocols like Wink or SportX.

DeFi platform examples

How do you make money with DeFi?

As you can see from the above - investors can use DeFi protocols to do a huge number of things and this list is always growing as more projects launch. But how do you use DeFi to make money or earn crypto?

Well, a number of ways. You can use dexes to make money the same way you would from centralized exchanges like Binance and Coinbase - by selling, swapping, and buying different cryptocurrencies.

Many of the cryptocurrencies used in DeFi use proof-of-stake blockchain networks - for example, the Binance Smart Chain that hosts PancakeSwap or Polygon. In the Binance Smart Chain example, investors can stake BNB to become a delegator and are rewarded with transaction fees on the blockchain in return for validating transactions. There are now dedicated DeFi staking protocols like Lido and Marinade Finance that make this easier than ever.

One of the key ways investors make money is by providing liquidity to various DeFi liquidity pools. DeFi protocols need these liquidity pools to function - otherwise, investors using them wouldn’t be able to easily trade, sell, buy, or borrow crypto assets. When you provide liquidity to a given DeFi protocol - you’re rewarded with a share of the transaction fees related to the pool you’ve invested in. This might be in the form of the crypto you provide, but more often than not it’s now provided in the form of liquidity pool tokens, a specific kind of governance or reward token you can stake or invest elsewhere. This is known as liquidity mining. Popular examples of liquidity mining include:

  • Earning CRV tokens by providing liquidity for Curve.

  • Earning CAKE tokens by providing liquidity for PancakeSwap.

  • Earning aTokens by providing liquidity for Aave.

These are just a few examples. The reality is all DeFi protocols and projects need investment to remove the need for an intermediary party - not just dexes or lending protocols like the above. You can invest in the vast majority of DeFi protocols - regardless of the service they’re providing.

As well as this, yield farming has sprung up out of DeFi and become a popular way to make money from DeFi protocols. This comes down to the way various DeFi protocols ‘stack’ - essentially allowing investors to essentially earn compound interest. For example, let’s say you provide liquidity to Curve and you earn CRV tokens as a reward. You can then invest these CRV tokens into Convex Finance to earn rewards on your CRV tokens as well. This is just one example of many, other popular yield farming protocols include:

  • Yearn Finance

  • Alchemix

  • Transchess

  • Beefy Finance

Finally, we mentioned DeFi games above - but one of the reasons DeFi games have become so incredibly popular is the play-to-earn model (P2E). There are a huge number of DeFi games that now offer tokens as a reward for players. From here, other engage-to-earn DeFi protocols and gamified DeFi protocols have sprung up in the DeFi space as well. P2E examples include:

  • Axie Infinity - Farm SLP tokens, earn AXS tokens by playing, breeding, and selling Axies, and renting or selling Lunacia land.

  • Decentraland and Sandbox - earn within the metaverse.

  • DeFi land - a multi-chain agricultural simulation, gamifying yield farming.

The way you’re using DeFi protocols to earn matters - because it all dictates how the IRS will tax you.

How do investors use DeFi?

IRS & DeFi Tax

The IRS hasn’t released any specific guidance on the tax treatment of DeFi just yet. But that doesn’t mean you won’t pay taxes on your DeFi investments - your crypto will be subject to either Capital Gains Tax or Income Tax.

The IRS has plenty of guidance on crypto taxes in the US - much of which will apply to DeFi investments. We can also infer from their stance on certain kinds of crypto investments how different DeFi investments are likely to be taxed.

All this comes down to the way the IRS views your crypto - is it a disposal of a capital asset or is it income?

Capital asset vs. income

The IRS is clear that they don’t view cryptocurrencies as a real currency. Instead, they view them as a capital asset - like a stock or a rental property - or as income.

If your crypto is seen as income, you’ll pay Income Tax on it. Meanwhile, if your crypto is seen as a capital asset, you’ll pay Capital Gains Tax. Let’s break the current guidance down on both.

How is DeFi taxedIf your crypto is seen as a capital asset, whenever you dispose of it, you’ll pay Capital Gains Tax on any profit. Disposals of a capital asset include:

  • Selling crypto for USD or other fiat currencies

  • Trading crypto for another crypto.

  • Spending crypto on goods or services.

Capital Gains Tax USA Meanwhile, if your crypto is seen as income, you’ll pay Income Tax on the fair market value of your crypto in USD. Examples of crypto income include:

  • Getting paid in crypto.

  • Mining crypto.

  • Staking crypto.

  • Airdrops.

  • Hard forks.

Income tax USAAs you can see from the above - the IRS has taken a pretty hard stance on what’s considered income. In particular, airdrops and hard forks might be a surprise to those not familiar with the IRS crypto tax guidance.

With the above in mind, we can look at the various DeFi protocols and concepts like yield farming, liquidity mining, loaning, staking and P2E and infer the likely tax treatment from the IRS.

Please note, this is not tax advice. You should consult a qualified accountant for bespoke advice on your DeFi investments and reporting it to the IRS (find one in our crypto accountants directory). Koinly recommends a conservative approach to crypto taxation.

Let’s break down the different DeFi transactions and how they’ll be taxed.

*Short or long-term Capital Gains Tax rules apply

TransactionTaxed?Tax Applicable
Swapping crypto on dexesYesCapital Gains Tax*
Adding/removing crypto from liquidity poolsYesCapital Gains Tax*
Earning new tokens liquidity miningYesIncome Tax
Staking rewardsYesDependent on protocol
Yield farmingYesDependent on protocol
Lending platformsYesDependent on protocol
Crypto margin tradingYesCapital Gains Tax*
Crypto derivativesYesCapital Gains Tax*
Selling NFTs you createdYesPotential Income Tax
Selling NFTs you boughtYesCapital Gains Tax*
Trading NFTsYesCapital Gains Tax*
Play to earn rewardsYesIncome Tax

Buying, selling, and trading crypto on dexes

Transactions on dexes are treated the exact same way as transactions on centralized exchanges. So when you sell or trade crypto on a dex - you’ll pay Capital Gains Tax on the profit from your transaction. You won’t pay any tax if you make a loss - though you should track and calculate these as you can offset them against any gains to reduce your tax bill.

Buying crypto with USD is not subject to Capital Gains Tax. However, if you’re using another crypto - even stablecoins - to buy crypto, this is a trade and subject to Capital Gains Tax.

DeFi lending tax

On the face of it, loaning crypto doesn’t seem like a taxable event - you’re not disposing of a capital asset, you’re just moving your asset to another place - most often a liquidity pool or vault. But it will actually all come down to how the DeFi lending protocol you use works.

If you deposit your asset into a DeFi lending protocol and you receive a token in return representing your asset - this could be seen as a crypto to crypto trade, which is subject to Capital Gains Tax.

Similarly, the way your interest earned from lending is taxed will depend on the specific DeFi protocol you use. If you’re earning new tokens or crypto - this is more likely to be seen as income and subject to Income Tax. But some DeFi lending protocols instead increase the value of your token(s) you received at the point you added your asset. Therefore you have no realized gain until the point you sell, swap or spend your token. This is more likely to be subject to Capital Gains Tax.

When it comes to borrowing crypto - it again comes down to how your protocol works and whether you provided collateral. If you provided collateral and received nothing in return, you haven't made a disposal and therefore no taxable event has occurred. However, if you provide collateral and receive tokens representing your collateral in return, the IRS may potentially view this as a crypto to crypto trade and any perceived gain may be subject to Capital Gains Tax.

Liquidity mining tax

We can break this down into three different transactions from a tax perspective:

  • Adding liquidity to a pool

  • Removing liquidity from a pool

  • Receiving liquidity pool tokens

When it comes to adding and removing liquidity from a pool - it all depends on how the DeFi protocol you’re using works as to the tax treatment. On the surface, we could think of this as a kind of transfer - like moving your crypto from one wallet to another - which is not subject to tax.

However, when you add funds to many DeFi liquidity pools - you’ll receive a token in exchange that represents your share in the pool. This could be viewed as a trade of one crypto for another - you’ve sent your original crypto asset and received another in return - so it could be subject to Capital Gains Tax.

Similarly, when you then want your investment back, you’ll remove your asset from the pool by exchanging the token back. This could also be subject to Capital Gains Tax.

When it comes to receiving liquidity pool tokens in return for providing liquidity - this could be subject to either Income Tax or Capital Gains Tax. It all depends on how the specific DeFi protocol you’re using functions. This is easier to understand with examples - so we’ll use two.

Let’s say you’re using Compound. When you invest in a Compound liquidity pool, you receive cTokens. But you don’t receive more cTokens the longer your asset is in the pool - instead the value of your cToken(s) increases. In this instance, you’re not earning new tokens. You’ll only have a realized gain when you sell or swap your cTokens. This means liquidity pool tokens that work like Compound are more likely to be subject to Capital Gains Tax.

Meanwhile, let’s say you’re also investing in Curve liquidity pools. You’ll earn CRV tokens as a reward. Because you’re receiving new tokens - this is more likely to be seen as income and subject to Income Tax.

Most DeFi protocols work in one of these two ways. So to summarize:

  1. Income Tax: if you’re ‘earning’ new coins or tokens through liquidity mining.

  2. Capital Gains Tax: if your balance of tokens stays constant, but increases in value.

Read next: What is liquidity mining?

DeFi staking tax

This one is pretty straightforward. The IRS has guidance on staking, and states that staking rewards are income when received and taxed as such. 'When received' is important terminology here as this defines the point at which your staking rewards are taxable. In the guidance, the IRS states that in this instance, staking rewards would be considered received when the taxpayer has control over the assets - so whenever rewards are unlocked and they have the ability to dispose of their rewards.

The guidance does not distinguish between DeFi staking and staking as part of a proof of consensus mechanism, so it is likely all kinds of crypto staking should follow this guidance for tax treatment.

Read next: How is staking taxed?

Yield farming tax

Yield farming tax isn’t straightforward because yield farming itself can be built up of many different transactions. It’ll all depend on the specific DeFi protocols you’ve stacked or the yield farming protocols you’re using as to the specific taxation. But in short - if you’re selling, swapping or spending tokens or coins in your yield farming activities - this would be subject to Capital Gains Tax. If you’re receiving new coins or tokens as a result of your yield farming activities - this would be subject to Income Tax.

Read next: What is yield farming?

DeFi interest tax

You’ll either earn interest or pay interest with various DeFi protocols.

If you’re paying interest - the tax treatment will depend if you’re paying interest in crypto or USD. If you’re paying interest in USD or any other fiat currency, you won’t pay tax. But if you’re paying interest in crypto - this could be seen as spending crypto on goods or services, which would make it subject to Capital Gains Tax. However, if you're paying interest related to an investment expense, this could potentially be tax deductible.

Meanwhile, if you’re earning interest through DeFi protocols - this could be seen as a type of additional income. The IRS has quite a hard stance on tax on receiving any new crypto and it’s mostly viewed as income and subject to Income Tax. So it’s likely interest from DeFi protocols would be seen in a similar manner.

This said, it will all depend on how the specific DeFi protocol you’re using pays out. As we said in the liquidity mining section above - if you’re receiving new coins, this is likely going to be subject to Income Tax. But if you only receive one asset or token that increases in value based on your loaned assets - this is more likely to be subject to Capital Gains Tax.

Margin trading, derivatives, and other CFDs tax

The IRS doesn’t have specific guidance for tax on crypto margin trades, derivatives, and other CFDs for centralized or decentralized exchanges. However, they do have guidance for the tax treatment of more traditional margin trading products and derivatives products which we can follow for crypto too.

Provided you’re seen to be trading as an individual investor - you’ll pay Capital Gains Tax on profits from margin trades, derivatives, and other CFDs. So you don’t pay tax when you open a position, you’ll pay tax when you close your position and realize a capital gain.

In the instance of liquidation - for example through a margin call - this is a disposal from a tax perspective and needs to be reported to the IRS.

Read next: What is crypto margin trading?

Play-to-earn tax

The IRS has no guidance on play-to-earn tax from various DeFi games. So you need to look at your specific transactions and how they fit into the current crypto tax guidance from the IRS.

If you’re seen to be earning new tokens - for example, earning SLP or AXS tokens through playing Axie Infinity - this is likely to be seen as income and subject to Income Tax.

Meanwhile, if you’re selling or trading tokens or NFTs - like selling or trading NFTs on Sandbox - this is more likely to be seen as a disposal of a capital asset and subject to Capital Gains Tax.

Read next: What are the best play to earn games?

Transaction fees and transfer fees tax

Transaction fees are tax deductible for capital gains. What we mean by this is any time you have to pay a fee to conduct a transaction to buy, sell, or swap a crypto asset - you can add this to your cost basis (what it cost you to acquire the asset). This will reduce any capital gain later on by giving a more realistic view of the asset cost.

Transfer fees are a little blurrier. It’s not clear whether transfer fees - for example moving tokens from one wallet to another - can be added to your cost basis. This could be viewed as a maintenance cost - which you cannot add to your cost basis.

The conservative approach to this is to actually treat transfer fees as a disposal and subject to Capital Gains Tax. You’ll be paying transfer fees in crypto - most often ETH - this is spending crypto on goods or services and therefore subject to Capital Gains Tax.

Wrapped tokens tax

Wrapped tokens offer interoperability between various blockchains. For example, you can’t trade Bitcoin on the Ethereum blockchain currently - but wrapped tokens like WBTC help investors get around these limits by offering an ERC-20 token of equivalent value.

When you ‘wrap’ a token, you’re exchanging one token for another. This could be seen as a crypto to crypto trade and subject to Capital Gains Tax. Even if you’re not making any realized gain or loss (as the two tokens are of equivalent value), you may still need to declare this to the IRS as a disposal for tax purposes.

Token rebases tax

Some tokens in DeFi protocols need to maintain a consistent value. To do this they have a rebasing function. This function adjusts the supply of coins according to price fluctuations. For example, if a given token is supposed to be worth $1, if the price drops below that the number of coins in circulation is reduced, while if the price rises above that, the number of coins in circulation is increased.

For some tokens - like Lido’s stETH which is tied to the value of ETH - these token rebases occur on a daily basis to keep the price consistent with the underlying asset. So you might end up with more or less tokens due to these daily rebases.

Unsurprisingly, the IRS hasn’t yet issued specific guidance on token rebases. However, they do have guidance on stock splits - which are a similar event in traditional markets. A stock split happens when a company splits existing shares into further shares to increase liquidity and the IRS does not view this as a taxable event. In other words, you might have more shares, but those shares have the same value. It would be reasonable to assume token rebases would be seen in a similar way.

How does the IRS know about my DeFi transactions?

They might not yet... but they will soon.

Under proposed guidance from the IRS, the definition of a crypto broker would include decentralized exchanges and platforms, meaning in the future, these platforms may be required to collect user data and issue the new 1099-DA forms to both users and the IRS in the future. This isn't yet set in stone - as there are public hearings still to come on the proposal yet - but if it takes effect, DeFi exchanges may be required to report your transactions to the IRS starting from the 2025 financial year.

Best crypto tax software for DeFi

Koinly crypto tax software calculates all your crypto taxes for you, including DeFi taxes. All you need to do is sync the wallets, exchanges, or blockchains you use with Koinly through API or import a CSV file of your crypto transactions.

From here, Koinly will identify your different crypto transactions and apply the relevant taxes. Your data should be labeled automatically, but if it isn’t you can tag your DeFi transactions as a loan interest, received from pool, or as a reward for deposits. For withdrawals, you can tag your DeFi transactions as cost, interest payment or sent to pool.

We give you complete control over how conservative you’d like to be with your crypto tax reporting. In our settings, you can choose whether to realize gains on liquidity transactions, whether to treat other gains as capital gains, and whether to treat transfer fees as disposals.

Once your transactions are imported, Koinly will calculate your crypto taxes for you. All you need to do is head over to the tax reports page, where you’ll see a simple summary of your crypto taxes. Below this, you’ll find a variety of tax reports you can download and submit to the IRS. This includes Form 8949 and Schedule D for crypto capital gains and Schedule 1 for crypto income. Koinly also offers tax reports for tax apps like TurboTax and TaxAct.

Once you’ve downloaded your tax report - it’s as simple as filing your taxes with the IRS, handing your report over to your accountant, or using your chosen tax app.

Koinly makes crypto tax easy. Get started for free today.


  • DeFi is an umbrella term for a variety of different financial apps and services.

  • The IRS hasn't yet given guidance on DeFi taxes - but that doesn’t mean you won’t pay tax.

  • Your crypto will be taxed under Income Tax or Capital Gains Tax - depending on the transaction.

  • If you’re seen to be earning new coins or tokens - this will be subject to Income Tax.

  • If you’re selling, swapping or spending coins or tokens - this will be subject to Capital Gains Tax.

Get your crypto tax report CTA banner

The information on this website is for general information only. It should not be taken as constituting professional advice from Koinly. Koinly is not a financial adviser. You should consider seeking independent legal, financial, taxation or other advice to check how the website information relates to your unique circumstances. Koinly is not liable for any loss caused, whether due to negligence or otherwise arising from the use of, or reliance on, the information provided directly or indirectly, by use of this website.