DeFi Tax Guide: Crypto Lending, Yield Farming & More

DeFi transactions can present complex and confusing tax challenges. Learn more about how lending, staking, yield farming, and more are taxed.

Table of Contents

This article is part of TokenTax's Cryptocurrency Tax Guide. Get help with cryptocurrency tax filing.

Last update: November 2021

What is decentralized finance (DeFi) and how is it taxed?

Decentralized finance (DeFi) is a rapidly growing crypto segment that increases people’s access to financial services—including trading, borrowing, and lending—without the delays and fees typically associated with traditional financial intermediaries.

However, the mechanisms of DeFi transactions often create complex and confusing tax situations, a challenge that is compounded by the IRS’ lack of guidance on the subject. In this guide, we’ll focus on decentralized finance taxes, noting where guidance is clear or where tax treatment is still up for interpretation.

What guidance does exist dictates that you recognize a capital gain or loss on a crypto asset when you sell or exchange it away; furthermore, crypto earned directly is recognized as income and taxed as such. This description applies to many of the DeFi transactions described below. However, as mentioned above, there are some common DeFi activities that do not neatly match this categorization.

If you’re not familiar with cryptocurrency capital gains and income tax treatment, we recommend you first read our guide on how cryptocurrency is taxed.

Taxes on interest and staking rewards income

If you stake or lend your crypto on a DeFi protocol, your resulting profit will be taxed.

Income earned as additional tokens: Ordinary income

Some DeFi platforms distribute interest or rewards by depositing additional coins into a lender’s wallet. This type of earning is taxed as ordinary income, like income made from a salary or direct payment for a good or service. Aave’s aTokens work like this.

For example, imagine you loan DAI on AAVE. In exchange, you receive aDAI that represents your deposit. As you earn income, you will earn additional aDAI, so that your wallet balance grows. This profit is taxed as ordinary income.

Income from tokens that increase in value: Capital gains

Some DeFi platforms distribute interest not as additional tokens, but as an increase in the value of a lender’s LP tokens. Yearn is one such platform.

In this situation, interest from the liquidity pool is taxed not as ordinary income, but as capital gains. That is because the number of tokens in the lender’s wallet does not increase; rather, the existing tokens increase in value.

For example, imagine you supply ETH to C.R.E.A.M. Lending. In exchange, you receive crETH that represents your share of the supply. As you earn interest, rather than earn additional crETH tokens, your existing crETH increases in value. This increase in value is taxed as capital gains..

Taxes on governance tokens

Receiving governance tokens: Ordinary income

Many DeFi platforms are now distributing governance tokens as incentives for activity on their platform. Strategically pursuing these offers is commonly known as yield farming. A distribution of these tokens is taxed as ordinary income.

For example, if you received $500 worth of SPELL in exchange for your activity in Abracadabra, you will owe ordinary income on that $500.

Selling governance tokens: Capital gains

When you sell governance tokens that have increased in market value since you received them, that increase in value will be taxed as a capital gain.

For example:

  1. If you earn 10,000 SPELL when SPELL is $.02, you owe income tax on that $200.
  2. If you sell that 10,000 SPELL when it reaches $.04, you will then owe capital gains taxes on your $200 of income.
  3. However, if you sell the 10,000 SPELL at $.01, you’ll have a capital loss of $100. Note that this does not directly offset the SPELL ordinary income.

Rebasing tokens

To maintain a consistent token value, a protocol with a rebasing function periodically adjusts the total coin supply according to the token’s price fluctuations. In other words, if the target value for a coin is $1, but the price drops below that, the protocol will reduce the number of coins in circulation. The opposite will occur if the price climbs above $1.

Are token rebases taxable events?

Token rebases are a grey area for crypto tax professionals, as the IRS has not issued guidance on the matter. This uncertainty is compounded by tge differences in rebasimg mechanisms between protocols.

We cannot offer comprehensive or definitive guidance on the future tax treatment of rebasing tokens. Absent guidance from the IRS, tax treatments must be determined on a case-by-case basis.

There are several potential treatments that have been discussed in the crypto tax community. The most aggressive would be to view rebasing as a corollary to stock splits.

In traditional markets, a stock split occurs when a company divides its existing shares into more shares in order to increase liquidity. This is not considered a taxable event because although a shareholder now owns more shares, those shares have the same market value as the shares he or she held before the stock split. A taxable event would only occur when and if the investor sold their shares for more than they were worth at the time they were received.

If we applied this treatment to rebasing tokens, capital gains would be only realized when and if you end up selling your asset for more than it was worth when it was deposited in your wallet.

More conservative approaches would be to consider rebase income as dividend payments in kind or as regular income.

Wrapped tokens

Tl;dr: We don’t know for sure yet, but the safe route is to see these as crypto to crypto exchanges that realize capital gains. You may also elect to file these as non-taxable exchanges if you wish. We recommend that you consult with a tax professional.

Is wrapping a taxable event?

It is not clear whether it is a taxable even to wrap tokens (i.e. ETH-->aETH on Aave). The IRS has not issued any specific guidance on the topic.

Some tax professionals may choose to interpret these as taxable events, while others may not.

Examples of such transactions include:

  • If you deposit LINK into Compound Finance, you receive cLINK in return.
  • If you make ETH an ERC-20 token, you create wETH
  • If you wrap stETH, you create wstETH

The most relevant IRS guidance states that crypto-to-crypto exchanges are taxable events that result in the realization of a capital gain or loss. In the IRS's cryptocurrency tax FAQ, for Answer 16 the agency writes: “If you exchange virtual currency held as a capital asset for other property, including for goods or for another virtual currency, you will recognize a capital gain or loss.”

The question at hand is whether or not these transactions are crypto-to-crypto exchanges.

Consider a deposit of ETH into Lido. In return, you receive stETH, which accrues staking rewards. stETH represents your staking share, but it is also a liquid staking solution.

This means that you can sell your stETH on an exchange or use it to “double dip” to earn extra yield. Here is the grey area: is the stETH you receive simply a receipt of your deposit? Or is ETH->stETH a token-to-token exchange and thus taxable event?

Crypto tax specialists are still waiting for official guidance from the IRS on how to treat these transactions. Currently, TokenTax's crypto tax software defaults to treating these transactions as taxable events.

However, if your tax professional interprets these transactions as non-taxable, we do offer users the option to classify them as such using the “Migration” transaction type. This transaction type does not trigger a capital gain or loss, and it will transfer the cost basis from asset to asset.

It’s important to know that treating these transactions as taxable does not necessarily mean you are paying more in taxes. When you eventually cash out your tokens you would realize capital gains or losses based on how the asset changed in value between acquisition and disposal.

Here’s how the same events will be taxed depending on the chosen tax treatment:

Taxable:

  1. You buy 1 ETH at $3000.
  2. Within 1 year, you exchange 1 ETH for 1 aETH on Aave when ETH is $4000. You realize a $1000 short term capital gain.
  3. Within this same year, you then exchange 1 aETH back to 1 ETH when ETH is $3800. You realize a $200 short term capital loss.
  4. You sell the 1 ETH at $3700 for a $100 short term capital loss.
  5. Your total capital gains between these transactions is $1000 - $200 - $100 = $700.

Non-taxable:

  1. You buy 1 ETH at $3000.
  2. Within 1 year, you exchange 1 ETH for 1 aETH when ETH is $4000. You choose to not realize taxes on this transaction.
  3. Within this same year, you exchange 1 aETH back to 1 ETH. You again choose not to realize taxes on this transaction.
  4. You sell the 1 ETH at $3700 for a $700 short term capital gain.
  5. Your total capital gains between these transactions is $700.

Treating similar transfers as taxable events would only result in greater tax liability if the holding time between initially buying the ETH and selling it was greater than one year. In that case, not treating the intermediate transfer steps as taxable events would mean that you would receive the favorable long-term capital gains rate instead of the short-term rates.

Pros and Cons of Each Tax Treatment

Taxable pros:

  • Treating these transactions as taxable events aligns most closely with existing IRS guidance. If the IRS later says that these transactions are taxable events, you won’t need to worry about amending and possible paying more taxes.
  • Accounting is easier when you treat these transactions as taxable events: it’s very similar to how crypto-to-crypto trades are treated.

Taxable cons:

  • These transactions may result in realizing capital gains earlier than you expected.
  • If you have long-term holdings, you may disrupt your holding period, resulting in short-term gains that do not receive the favorable long-term gains tax rate.

Non-taxable pros:

  • Your holding period on your assets won’t be reset when you have transactions like Compound deposits or liquidity pool entries/exits.
  • Your taxes will be deferred, so you won’t have a capital gain or loss realized on these assets (yet).

Non-taxable cons:

  • There has been no guidance from the IRS to say that these shouldn’t be taxable events. New guidance could be released that states that taxes are owed in this instance, in which case you would need to amend your tax returns. Alternatively, not treating these transactions as taxable events may not withstand scrutiny in an audit.
  • This treatment only defers capital gains or losses — you will still need to eventually pay taxes on your gains.
  • The accounting is more complex because cost basis needs to be transferred across different assets.

The main takeaways here are:

  1. You will need to pay taxes on your capital gains — no matter what.
  2. Different treatments only affect total tax liability when you have both capital gains and losses of the same asset AND some of your transactions with the asset are long-term and some are short-term.

Transfers into and out of liquidity pools

Tl;dr: We don’t know for sure yet, but the safe route is to see these as crypto to crypto exchanges that realize capital gains. You may also elect to file these as non-taxable exchanges if you wish. We recommend that you consult a tax professional.

When you deposit funds into a liquidity pool, in return you receive an LP token that represents your share of the pool. The IRS has not issued any specific guidance on whether or not this action is a taxable event.

One position is that this exchange is merely a deposit, with the LP token representing your original deposit ratio. In this interpretation, depositing or withdrawing your funds from a liquidity pool would not be a taxable event. This is a more aggressive stance.

A more conservative position is that these actions are taxable events because they are crypto-to-crypto trades; the crypto you deposit is exchanged for an LP token. Proponents of this position also point out that a liquidity pool supplier’s financial situation is rarely the same upon exiting a pool because of changing token ratios. If their economic situation has changed, the lender has likely realized a taxable event.

Taxes on multichain bridging

Tl;dr: We don’t know for sure yet, but the safe route is to see these as crypto to crypto exchanges that realize capital gains. You may also elect to file these as non-taxable exchanges if you wish. We recommend that you consult a tax professional.

The IRS has not issued guidance about the tax treatment of multichain bridging. However, conceptually the action is similar to wrapping or minting a token. For example, Interlay allows users to mint bitcoin onto Polkadot as PolkaBTC.

Thus, like minting or wrapping tokens, bridging crypto could likely be interpreted as either a taxable or non-taxable event. We recommend you consult a tax professional about which treatment to choose.

Taxes on crypto loans

Putting up cryptocurrency as collateral: Not taxable

It is not a taxable event to use crypto as collateral for a loan as long as you do not receive a different token in return.

For example, if you put ETH up as collateral to borrow stablecoins, you have not realized a taxable event—even if you convert the stablecoins into fiat.

As long as your collateral is not sold or exchanged, no tax liability will be triggered. This allows investors to make large payments, such as taxes, a home, or a car, without selling crypto and in turn incurring more tax liability.

Forced liquidations: Capital gains

If a cryptocurrency’s value decreases enough that a platform cannot maintain borrowers’ loan-to-value ratio, the platform will issue margin calls, which require borrowers to put up additional collateral.

If a margin call is not met, a platform may force a liquidation of the borrower’s collateral. In this scenario, the borrower will owe capital gains taxes on the sale, even though they will not receive the profits.

Getting your collateral back as a different coin: Possibly taxable

As we wrote earlier, putting crypto up for collateral is normally not taxable unless you receive a token in return at the time of the deposit. However, if you choose to receive your collateral back as a different coin than you deposited, this may be a taxable event.

For example, if you put up ETH as collateral, but receive DAI back when you close out your loan, you may owe capital gains taxes since there was an exchange of ETH for DAI.

Self-repaying loans: Debt cancellation income

The Alchemix protocol offers innovative “self-replaying loans,” in which the user essentially deposits collateral, borrows capital, and the internals of the protocol earn yield with the collateral to repay your loan over time. This loan structure does trigger income tax liability by creating what is called “debt cancellation income.”

For example:

  1. A user deposits 10,000 DAI of collateral to the Alchemix protocol in exchange for a loan of 15,000 alUSD.
  2. The protocol deposits the 10,000 DAI into a liquidity pool, which mints 500 DAI for the protocol over the course of a tax year.
  3. The protocol subtracts that 500 DAI from the user’s debt, resulting in 500 DAI of debt cancellation income for the user.

Taxes on other DeFi assets (TokenSets, tokenized assets, etc)

Other tokenized assets, such as tokens that represent your investment in a TokenSet, or tokens that represent a real-world asset like gold, are taxed at normal capital gains rates.

Learn how to save money on your crypto taxes

We’ll send you tips that smart investors use when filing their taxes

Calculate your crypto taxes now

TokenTax does the hard work so you don’t have to.