DeFi Crypto Tax Guide: Lending, Liquidity Pools, Yield Farming, and Loans Tax
Learn how your activities with Decentralized Finance (DeFi) are taxed. We explain the tax treatment of lending, liquidity pooling, yield farming, and loans.
Table of Contents
- What is Decentralized Finance (DeFi) and how is it taxed?
- DeFi lending income taxes
- Liquidity pool taxes
- cToken and aToken tax treatment
- DeFi governance and incentive token taxes
- Taxes for loans, interest paid, collateral liquidations
- Other DeFi assets (TokenSets, tokenized assets, etc)
- The tax advantages of Decentralized Finance
- The tax disadvantages of Decentralized Finance
- How to file DeFi taxes
- How taxes work for your DeFi platform
This article is part of TokenTax's Cryptocurrency Tax Guide. Get help with cryptocurrency tax filing.
Decentralized Finance is a quickly growing field of cryptocurrency that allows people to access financial services, like trading, borrowing, and lending, without delays or extra prices incurred by a middleman like with traditional financial institutions. DeFi also utilizes automated market making (AMM) and liquidity pools in order to provide decentralized trading.
Ethereum is currently the most popular ecosystem for DeFi, with a number of platforms rapidly gaining popularity amongst crypto investors. This article will focus on ETH-based DeFi platforms, but the concepts we explain can also apply to similar platforms on other blockchains.
Like with any cryptocurrency activity, it’s important that you understand the tax implications of Decentralized Finance activities. In this guide, we’ll cover the specific tax treatment of various DeFi transactions.
Note that the IRS and other countries’ tax authorities have not given specific guidance for DeFI taxes, so this article bases DeFi tax treatment off of existing crypto tax guidance. Existing guidance dictates that you recognize 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. Many DeFi activities explained below fall within these situations and guidelines.
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.
- If you lend your crypto or contribute it to a platform that supplies loans of crypto, you will be liable for taxation on whatever you earn from lending your crypto.
- Whether this lending income is treated as ordinary income (like income on salary) or as capital gains (gains from trading) depends on your DeFi platform.
- Traditionally, lending platforms pay earnings from interest directly to your crypto balances; i.e. for lending ETH, you’d earn ETH and see your wallet balance increase accordingly.
- If you earn crypto tokens for lending (i.e. your balance increases when you earn interest income), then you recognize this as ordinary income (like income earned as payment / salary).
- Newer DeFi platforms, however, have issued their own tokens, also known as Liquidity Pool Tokens (LPTs), where you may recognize this income as capital gains.
- This is because adding/removing liquidity is structured like a trade or token swap. In these cases, such as with cTokens, the value of your LPTs increases — but the quantity shown in your ETH wallet remains the same.
- When you convert your cTokens back to the original asset, the cost basis of your cTokens is compared to the amount of the original asset you receive in return to calculate your gain from interest accrued by the pool.
Consult the list of DeFi platforms and their tax treatments at the end of this article to learn more.
There are advantages to lending income being treated as capital gains rather than as ordinary income, which we explain in the “tax advantages of Decentralized Finance” section of this article.
- In DeFi, anyone can supply liquidity via liquidity pools to decentralized markets like Uniswap and Balancer.
- In exchange for supplying crypto to a liquidity pool, suppliers receive Liquidity Pool Tokens (LPTs) that represent their shares in the pool.
Your income via liquidity pools is typically taxed in one of two ways:
- As ordinary income taxes, if you are receiving interest on the underlying asset directly and seeing the balance increase in your wallet.
- As capital gains, if your balance of liquidity pool tokens stays constant but increases in value as the pool accrues interest due to demand / fee collection.
- You receive LPTs in exchange for supplying crypto to a Uniswap or Balancer liquidity pool.
- If you profit from supplying liquidity to this pool, these tokens representing your share in the pool increase in value.
- From this increase in value, you recognize capital gains when you withdraw the underlying assets from the pool in exchange for your LPTs.
- As discussed above, many DeFi platforms have their own tokens that represent balances in their protocol.
- Platforms with these tokens include Compound (cTokens), yearn.finance (yTokens), and Aave (aTokens).
- As we discussed in the above sections, you may have income tax or capital gains tax liability for earnings from these protocols.
- Per Compound, “"As a market earns interest, its cToken becomes convertible into an increasing quantity of the underlying asset."
- That means that as you earn interest with cTokens, you aren’t actually receiving more cTokens, but rather, your balance of cTokens — which represents your share in the protocol — increases in value.
- From a tax perspective, this means that when you exchange your cTokens back to the underlying cryptocurrencies, you recognize your income as capital gains, rather than as direct ordinary income like you would for more traditional interest earned.
Also keep in mind that you recognize any capital gain or loss on assets that you exchange for their cToken equivalents. So if you send ETH to receive cETH, you recognize any capital gains or losses for that ETH based on its original cost basis.
- Aave’s aTokens, like aDAI, are minted at a 1:1 ratio to the underlying asset.
- Whereas with cTokens and yTokens your DeFi token balance remains the same but increases in value, representing your share in the pool, with aTokens you recognize income tax when your aToken balance increases.
Here are the methods by which you would owe taxes with aTokens:
- You recognize any capital gain or loss on the crypto asset you exchange away for minting the aToken.
- When you earn interest for lending out your crypto on Aave, you receive more of that asset’s aToken. The aTokens you receive are taxed as income. So if you earn 50 aDAI and each aDAI is $1.00, you are liable for income tax on that $50 of aDAI.
- You realize capital gains or losses when you burn / trade out of your aTokens. When doing so, you may realize capital gain or loss if the price of the underlying asset increases or decreases.
Let’s run through an example.
- You buy 1 ETH at $200. Later, when 1 ETH is $350, you use that 1 ETH to mint 1 aETH. You realize a capital gain of $150 here and will owe tax according to your capital gains tax rates.
- Over the next month, you lend via your aETH, earning an equivalent of $10 in aETH. You owe tax on this $10 of income per your income tax rates.
- ETH drops to $300, and you decide to convert your aETH back to ETH. Because the price of your aETH is matched to the price of ETH, you’d recognize a capital loss here. However, this capital loss would only subtract from any capital gains you have, not from the income you recognized on the aTokens received for lending.
- Many DeFi platforms are now distributing governance and/or incentive tokens in exchange for activity on their platform.
- A large component of yield farming is pursuing platforms that offer these tokens, to earn income.
- When you are distributed these tokens, the tokens are taxed as income per their current market value.
- When you sell these tokens, you recognize any capital gain or loss your crypto has accrued since you acquired it.
- If you earn 1 COMP when COMP is $140, you owe income tax on that $140 of income per your income tax rates.
- If you sell that 1 COMP when it reaches $170, you will then owe taxes on that $30 of capital gains.
- However, if you sell the 1 COMP at $100, you’ll have a capital loss of $40 which will not directly offset the COMP income.
Tokens you may receive include:
- Compound’s governance token COMP is distributed to anyone who supplies or borrows crypto to/from Compound.
- You realize income tax on the COMP received and are liable for tax of your income tax rate times the market value of COMP received.
- BAL tokens are distributed to those who provide liquidity to Balancer pools. Balancer refers to this as liquidity mining.
- You are liable for income tax on BAL received, for the market value of the BAL you receive.
- YFI is the governance token for Yearn.finance. While its creator originally stated that the coin had no value, its price quickly soared upon release.
- If you earn YFI, you are liable for income tax on the market value of YFI earned.
Crypto loans have noteworthy tax advantages.
If you borrow using crypto as collateral, like putting ETH up for collateral to borrow stablecoins, you don’t realize any tax on that crypto set as collateral. You can borrow crypto or stablecoins and even convert that crypto into fiat.
- As long as your collateral is not sold or exchanged, then no taxes will be triggered.
- This is useful for things like making tax payments without triggering more taxes by selling your crypto.
- If the value of your collateral crypto goes down too far, or if the value of assets borrowed increases too much compared to your collateral, then you’ll trigger a margin call / liquidation.
- This is treated as if you had sold that crypto for fiat, meaning that you realize any capital gain or loss on those assets.
- Putting crypto up for collateral is normally not taxable unless you receive a different cryptocurrency back.
- But, if you give ETH as collateral, but receive back DAI when you close out your loan, that may be a taxable event because there was an exchange of ETHfor DAI.
Other tokenized assets, like tokens that represent your investment in a TokenSet, or tokens that represent a real-world asset like gold, are taxed as per normal cryptocurrency capital gain/loss treatment.
If you’ve been reading through this article, you’ve probably noticed a few mentions of advantageous tax treatment with DeFi. You can indeed potentially save on your taxes via DeFi: here’s how.
Traditionally, when you earn income for lending your crypto, you receive that income directly in the form of tokens received. When you are paid in tokens, you recognize said tokens’ market value at time of receipt as income.
This means you owe tax up front, even if you later sell those tokens at a loss — capital losses don’t directly offset direct ordinary income.
- With Compound’s cTokens, however, you earn lending income not via direct token payments, but rather via your cTokens gaining in value as you earn.
- This means that you recognize this lending income as capital gains, not ordinary income.
- Thus, you can offset these capital gains with capital losses, and if you hold the cTokens for a year or more, in the U.S. and in other countries you may be able to get lower long term capital gains tax rates.
With TokenSets, a token represents your investment in a periodically rebalanced portfolio. You do not rebalance assets yourself.
- Normally if you rebalance your portfolio, you buy, sell, and trade crypto in order to have your holdings adhere to the new portfolio rebalancing. This triggers taxes on your investments, and you may also lose out on long term capital gains treatment (holding an asset for over a year).
- If you are invested in a rebalancing portfolio with TokenSets, your investment in the token remains unchanged.
- That means that you only trigger capital gains and tax liability once you sell or trade away your TokenSets token.
- Because it makes it easier to handle your capital gains, and if you hold for a year or more, you’ll be able to more cleanly access lower long term capital gains rates.
Recall that long term holdings in the U.S. and in other countries are taxed at a lower rate. You may want to preserve holdings so their holding time is not reset.
- Let’s say you are holding some ETH, but want some stablecoins in order to make use of DeFi protocols. You don’t want to trade away the ETH for stablecoins, because then you’ll trigger taxes on them and reset the holding period.
- If you take out a loan on your ETH, you don’t trigger taxes on this ETH and the holding period continues to count towards long term holdings. You can then use whatever asset you borrowed as you see fit!
When you mint tokens, like converting ETH to wrapped ETH (WETH) or converting coins to cTokens or yTokens, you are exchanging your tokens for another token.
- This exchange is a taxable event, so be aware that you are triggering any capital gains on that crypto you are exchanging away.
- Some platforms may even offer to automatically swap your coins to mint DeFi tokens, so be sure that you’re aware of what actions these platforms will take with your coins.
- Note that this does not apply if you are minting tokens in a loan, using your holdings as collateral.
Many DeFi platforms are distributing their own tokens, like Compound and COMP. While these distributions may certainly be possible, it’s good to keep in mind that these distributions are taxed as income, for the market value of the tokens at time of receipt.
- Thus if you are distributed $100 equivalent of COMP, you owe taxes on that $100 of income per your income tax rates.
- Your cost basis is also set to $100 for this COMP, so you’ll only pay capital gains tax on however much the coin gains in value by the time you sell or trade it away.
- However, if you sell or trade away the COMP at a loss, then these capital losses do not subtract from the income tax liability for the COMP earned.
With TokenTax's tax software for cryptocurrency, you can import data from Decentralized Finance platforms to calculate your interest / lending income as well as to account for capital gains and losses, like collateral sell offs and exchanges between crypto and cTokens.
Just enter in your ETH address(es) into TokenTax, and the platform will automatically import your activity from all supported DeFi platforms. See below for a list of how activities on each DeFi platform are treated.
With Maker and their Oasis platform, you can trade between assets as well as earn DAI by either by locking ETH / other supported currencies as collateral in a CDP or by depositing DAI and earning interest on it via the DAI savings rate.
Maker and Oasis tax treatment
- Trades are taxed like normal cryptocurrency trades, where you trigger capital gain or loss on assets you trade away.
- DAI earned via savings is treated as income taxed per your income tax rates.
Compound taxation largely has to do with this article’s explanation of cTokens and governance tokens (COMP).
Compound tax treatment:
- Exchanging crypto like ETH to their cToken equivalent (in this case, cETH), is a taxable trade.
- As you lend, your cTokens increase in value. You realize capital gains when you trade back these cTokens.
- Any COMP earned is taxed as income.
1inch Exchange is a DEX aggregator, meaning it automatically finds you the best rates with lowest price slippage across many decentralized exchanges.
1inch Exchange tax treatment:
- Trades made on 1inch are taxed like any other crypto trade, where you realize a capital gain or loss on the asset you trade away.
- Liquidity and lending pools are taxed according to which DeFi service you pick, as per the taxation structure of lending and liquidity pooling described earlier in this article.
Balancer allows you to swap tokens as well as to contribute to liquidity pools. Balancer liquidity pools are composed of different weightings of crypto assets depending on the chosen pool, with up to 8 different assets in a pool.
Fees are earned each time the pool is used to facilitate a swap on Balancer, with payouts to liquidity providers proportional to the share of total liquidity deposited. Each pool on Balancer has a different swap fee.
Balancer tax treatment:
- Swaps / trades made in Balancer are treated as per normal crypto trade tax treatment.
- Profits made from liquidity pooling are capital gains, because BPTs (Balancer Pool Tokens) representing your shares in the pool increase in value. When you cash out of the pool, you trade the BPTs back for your assets, recognizing capital gains.
- BAL is distributed to all liquidity providers via disperse.app on a regular basis. These rewards are taxed as income based on the value of BAL on the date it was received.
Wrapped ETH is an ERC-20 equivalent of ETH, where one WETH is equal to one ETH.
Wrapped ETH tax treatment:
- When you convert ETH to WETH or vice versa, this is treated as a taxable trade per normal crypto tax treatment. You realize any capital gain or loss on the asset you are trading away.
Uniswap lets you either swap between tokens or contribute tokens to liquidity pools to earn income.
Uniswap tax treatment:
- Token swaps are taxed like typical cryptocurrency trades, where you realize any capital gain or loss on the asset you are trading away.
- When you contribute to a liquidity pool, you receive UNI tokens that represent your share in the pool. Your UNI tokens increase in value to represent your earnings from the liquidity pool. When you divest from the liquidity pool, you give back the UNI tokens and realize any capital gains on those UNI tokens.
Set Protocol’s TokenSets allow you to make a tokenized investment in a portfolio, trading algorithm, or individual trader.
Set Protocol tax treatment:
- Set tokens increase or decrease in price, like an ETF. You realize any gains via capital gains when you trade your Set tokens back to another cryptocurrency.
- As mentioned earlier in this article, this can be advantageous because you only recognize tax when you cash out, not while you are trading or rebalancing your portfolio.
We're always adding tax information for more Decentralized Finance platforms. Don't see your DeFi platform here? Ask us on our live chat (click the icon at the lower right of the page) — we probably know how tax works for it!