File your state and federal taxes for only $30! Get Started

DeFi Crypto Tax Guide: Yield Farming, Lending, Liquidity Pools, and More

DeFi Crypto Tax Guide: Yield Farming, Lending, Liquidity Pools, and More

Learn about decentralized finance and how your interactions with DeFi protocols are taxed. This guide covers several aspects of DeFi, including yield farming, the tax treatment of lending and borrowing, providing liquidity to a pool, staking, and more.

Decentralized Finance: What Is DeFi in Crypto?

Decentralized Finance, or DeFi, allows traders to access services like trading, borrowing, lending, and earning interest without using financial institutions or intermediaries (such as a centralized exchange like Coinbase, Binance, or Gemini). Decentralized exchanges (DEXs) such as Uniswap utilize automated market-making – which means that rather than depending on an exchange’s order book, ordinary traders will fill trades using liquidity provided by pooling their holdings together with other traders in what is called a liquidity pool.

By eliminating middlemen from transactions, decentralized finance (DeFi) applications aim to provide traditionally centralized services, like loans and currency exchanges, through a more efficient, free, and decentralized platform.

Decentralized Finance: What Is DeFi in Crypto?
Source: via DefiLlama

Protocols like Compound, Aave, and MakerDAO allow users to lend money, earn interest and take out collateralized loans. Exchanges like Uniswap and dYdX enable users to trade crypto assets without using a centralized cryptocurrency exchange.

Crypto investors are currently profiting in the DeFi ecosystem in three important ways:

  • Yield Farming + Staking
  • Liquidity Pools
  • Loan Collateralization

Crypto investors also enjoy obtaining DeFi tokens without using the regular US or foreign exchange. Decentralized exchanges do not require traders to go through cumbersome identity checks or open accounts in other countries to obtain rare currencies; they just need to find an exchange with liquidity in the trading pair they are interested in using.

Did You Know: Coinbase proposes fix for DeFi tax reporting

Coinbase proposes a solution to streamline tax reporting for decentralized finance (DeFi), where transactions lack traditional intermediaries. By creating a token linking users’ real identities to their blockchain addresses, off-chain reporting can be facilitated without compromising privacy. This addresses the challenge tax agencies face in tracking DeFi transactions in a rapidly evolving financial landscape.

What is Yield Farming?

Yield farming in crypto, also known as liquidity mining, is an effort to put your crypto assets to work and generate the most returns possible on those assets. At the simplest level, yield farmers, via yield farming strategies, might move assets around within several different DeFi protocols, constantly working to find the pool offering the best yield from week to week.

Several decentralized money markets exist, such as Aave, Compound, Uniswap, and others. These protocols allow you to pool crypto assets in smart contracts, which are used as trading liquidity or for lending to borrowers, depending on the platform. If you provide liquidity in a trading pair (ex. ETH-USDC on Uniswap) or for lending purposes (ex. DAI on AAVE), you are rewarded the fees from users who use this liquidity for token swaps and loans. The return on liquidity provision varies depending on demand, so yield farmers are constantly looking to move to where they can get the best rate of return.

What is Staking?

Another similar but slightly different way to earn interest on your crypto assets is via staking. With staking, you also lock up your crypto assets in a smart contract but don’t use the assets for financial liquidity. Instead, you use the assets to secure the network with blockchains with a Proof of Stake (PoS) consensus mechanism. As a reward for securing the network, you earn interest from block rewards on the network.

What is Crypto Exchange Liquidity?

Liquidity is the lifeblood of DeFi, and finance in general. In crypto, liquidity is assets available for immediate deployment (swaps).

The easiest way to understand why liquidity pools exist and how they work is by drilling into one of the major use cases of liquidity pools: a decentralized exchange. We’ll take the example of Uniswap to explain one of the largest decentralized exchanges on Ethereum.

Decentralized exchanges and protocols still need liquidity to execute trades, but using traditional methods to provide this supply would defeat the whole premise of being decentralized. The solution to the problem is creating liquidity pools governed by smart contracts. Liquidity pools are in place to provide liquidity to DeFi platforms (exchanges, lenders, borrowers, insurance, etc.) in a peer-to-peer fashion without using centralized exchange pools held by a custodian.

What is a Liquidity Pool?

A liquidity pool is a smart contract where crypto users’ funds group together to provide liquidity for executing trades. Crypto holders who provide cryptocurrency tokens into liquidity pools are called Liquidity Providers (LPs). Uniswap uses a smart contract to provide this liquidity using deposits made by a yield farmer looking for a high rate of return in interest rates and a share of transaction fees. Assets are provided to liquidity pools in pairs so that users can swap the tokens between one another.

In exchange for liquidity, these providers earn rewards from the fees users pay to use the pool based on their share of the liquidity pool and a swap fee. Liquidity pools facilitate cryptocurrency trades (trading one cryptocurrency to another) and cryptocurrency loans backed by collateral in a decentralized nature.

Liquidity Pool Example

Liquidity Pool Example
Source: Uniswap

Uniswap is a decentralized exchange that uses automated market-making and user-pooled assets to execute trades. Pictured above are the three most popular liquidity pools on Uniswap.

Say someone wants to deposit $500 into the USDC/ETH pool. They would start by depositing $500 worth of USDC and $500 worth of ETH (approximately). Users must consistently provide the equal value of BOTH assets in the pair to ensure balanced liquidity. Once those assets are in the liquidity pool, the user receives an LP token, which acts as a receipt for their deposit. As other users exchange their USDC for ETH, or vice versa, they incur a 0.3% fee. This fee is distributed to liquidity providers, based on their pool share, as a reward for providing liquidity!

The open pool market makes it possible for a trading pair between any Ethereum pairs on Uniswap, and it is also highly liquid due to the clear arbitrage opportunities.

Liquidity Pool Taxes

There are many other advantages to providing liquidity, but for this guide, it’s important to note that there are taxable consequences for both being an LP and using a DeFi platform for trades.

It is also important to note that the IRS has not issued specific guidance for DeFi taxes, so this article bases DeFi tax treatment on existing crypto tax guidance. We will update this article as we learn more. The treatments below represent the most conservative approach based on current IRS guidelines regarding similar transactions.

DeFi Crypto Tax: How Are DeFi Transactions Taxed?

At a high level, the IRS treats cryptocurrencies as property, and all the general rules applicable to property apply to cryptocurrency transactions. Every time you spend, sell, or exchange cryptocurrency, there is a taxable event.

The IRS’ initial guidance (Notice 2014-21, Rev. Rule 2019-24, 45 FAQs) was generic and did not address DeFi. But in August 2023, the agency provided additional guidance for certain DeFi transactions (Revenue Ruling 2023-14).

The new ruling says that a cash-method taxpayer “staking” cryptocurrency in connection with validating blockchain transactions must include rewards received in taxpayers’ taxable income for the year they gain control over the staking rewards.

Furthermore, the ruling reiterated the agency’s position that cryptocurrency is “property” and, generally, receiving property gives rise to gross income when it is “reduced to undisputed possession.” Typically, that happens when you can sell, exchange, or dispose of it.

Unfortunately, the new guidance doesn’t address other DeFi ambiguities. However, this is not an excuse not to report your DeFi-related taxes. Enough guidance is in place to infer the tax implications of DeFi and yield farming transactions.

The process of DeFi and yield farming generally consists of several transactions. In the following sections, we will break down these different transaction types. Some DeFi transactions do not have any direct or ancillary tax guidance. In these situations, we will present various tax positions you can take based on your risk tolerance.

The more aggressive the tax position, the higher the tax exposure and the risk of under-reporting and getting audited.

On the upside, more aggressive tax positions will generally result in lower taxes, more tax deferment, and lower upfront tax payments. The lower the aggressiveness level, the lesser the risk of getting into trouble with the IRS. However, you will report income sooner and likely pay more taxes.

Below, we cover the types of DeFi transactions we commonly see and how we treat each for tax purposes.

DeFi Lending Taxes

1 ETH is locked into Compound, which Jim purchased a few years ago for $50. At the time of the deposit, 1 ETH is worth $100. Bruce receives 50 cETH, a protocol token, representing his contribution to the liquidity pool. cETH is tradable at other exchanges and is worth $1 per coin.

Our take: This is a taxable event. Jim is disposing of his original ETH and receiving a new crypto token called cETH in a 1:1 trade. Crypto-to-crypto trades are taxable according to the IRS (A15). Also, when Jim gets his collateral back later, he does not receive the same ETH coin he deposited. This transaction could mean a sale of Jim’s original ETH in the eyes of the IRS. As a result, Jim would report $80 ($100 – $20) worth of capital gains from the transactions.

You could argue that this is not taxable. Bruce is not actually selling his ETH. He is only depositing assets as collateral. His intention is to borrow funds against ETH. His intention is NOT to sell the protocol token, cETH.

DeFi Wrapping Taxes

Sometimes, protocols require you to wrap coins before depositing them into a specific blockchain’s smart contract. For example, BTC operates on the Bitcoin blockchain technology, not on Ethereum. Therefore, to use Bitcoin with Ethereum-based DeFi platforms, you can “wrap” BTC using a protocol like Ren, which essentially locks your BTC in escrow in exchange for an ERC-20 token version of your BTC called wBTC, or Wrapped Bitcoin.

An analogy to wrapping in the non-crypto world is a cashier’s check. It represents the value of dollars in your bank, and whoever gets their hands on your cashier’s check owns the right to the underlying money in the bank.

Our take: wrapping is taxable. The wrapped version of the original coin is a new coin, resulting in a sale of the original. Crypto-to-crypto trades are taxable.

However, this sale is not taxable for the BTC to receive wBTC. The intention of wrapping a coin is to add additional functionality to use the BTC on the ETH blockchain. You should prepare to defend this intent to the IRS, however.

DeFi Borrowing Taxes

DeFi Borrowing Taxes
Source: Aave

Let’s say Sara borrows 50 DAI, which is worth $50 ($1 x $50)

This act is likely not taxable. Generally speaking, funds received from a loan are not taxable because they are not income to the borrower.

Paying Interest Taxes

When you borrow funds from a DeFi protocol, you must pay the platform interest. Interest expense charged on loans is one of the primary sources of income for DeFi platforms.

The deductibility of this interest expense depends on the use case of the loan proceeds. If you use the borrowed funds to buy a personal asset such as a new vehicle, that interest expense is ‘personal,’ so it is not deductible.

If you use the borrowed funds for investment purposes (yield farming, for example), your interest expense is an investment interest expense. Interest interest expenses are subject to special tax rules and are only deductible up to your net investment income.

Since special rules apply to investment interest expenses, it is vital to track these separately. You will calculate the amount you can deduct each year on IRS Form 4952. Your tax professional will be able to advise you on how to work with this situation to be accurate.

Earning Interest Taxes

Chris receives 0.1 ETH as interest for providing liquidity on Uniswap. At the time of the receipt, 1 ETH is worth $200.

This act is taxable. Receiving interest rewards is a taxable event where you must pay taxes based on the token’s market value at the time of the receipt. Chris will pay based on $20 worth of Schedule 1 Misc. Crypto Income for this example.

When he reports this income, the newly received 0.1 ETH will now have a cost basis of $20. If Chris were to later sell this coin on another platform for $30, he would incur a capital gain of $10 ($30 – $20).

Earning Governance Tokens Taxes

In addition to receiving more ETH interest income, Chris also gets an airdrop of 200 Uniswap tokens.

These are taxable on the value at the time Chris claims the airdrop as Schedule 1 Misc. income. Additionally, if Chris sells the Uniswap tokens, he will incur a capital gain or loss based on the difference between the price at the time of the airdrop, and the time of the sale.

Liquidation Taxes

Let’s say that the price of ETH drops and, therefore, Chris’s DeFi platform liquidates his collateral at $50.

We see this as taxable. Liquidation of collateral is a disposition event, similar to a sale of his ETH. In this case, Bruce will have to pay taxes on the difference between how much he originally paid for the ETH vs. the price at which the protocol liquidates it.

What Happens When You Move Your Collateral Back Into Your Wallet And Exit The Liquidity Pool?

This event is not taxable. Paying off a loan and returning your collateral is not taxable. In the yield farming world, as long as you recognize interest and governance token income along the way, there is no taxable event when you exit the pool.

With that said, if you unwrap your coin when you exit the pool, that could trigger a taxable event – the guidance on this from the IRS is less than clear. See the section on wrapping above.

Gas Transaction Fees Taxes

Transaction, or gas, fees on sales are deducted from proceeds. For example, if Joan sells 1 ETH for $400 and spends $10 for gas, her total proceeds on the transaction would be $390 ($400-$10).

Gas Transaction Fees Taxes
Source: Metamask Wallet

DeFi Capital Gains

Profits derived from token appreciation are classified as capital gains. Certain DeFi platforms like Yearn and Compound distribute interest by augmenting the value of a lender’s interest-bearing tokens rather than issuing additional tokens. Consequently, these gains are subject to capital gains tax since the number of tokens in the lender’s wallet remains constant while the value of the existing tokens appreciates.

Are Certain DeFi Transactions Exempt from Taxation?

Certain DeFi transactions, such as depositing funds into Aave, wrapping or unwrapping Ethereum (ETH), or providing liquidity to a decentralized exchange, are considered by some individuals and tax professionals as potentially not subject to taxation. These transactions pose a gray area due to their exchange of one token for another, often with similar properties or values. However, tax regulations in various jurisdictions, including the United States, typically treat crypto-to-crypto exchanges as taxable events. Therefore, while there may be differing interpretations, it’s essential to consult with a tax advisor to determine the tax implications of specific DeFi transactions in your jurisdiction.

What’s Next?

The Infrastructure and Jobs Act (IIJA) expanded broker information reporting to include digital asset transactions and mandated IRS rulemaking to implement the statute two years ago. In September 2023, the IRS proposed a rule requiring newly designated brokers to report sales and exchanges of digital assets – although it excluded stakers and miners.

In essence, the new rules require brokers under this scope to collect users’ personal information (e.g., their name, address, and tax ID) and provide them with a Form 1099 to help calculate their gains and losses. If this happens, many DeFi protocols could have difficulty complying with the rules and shutting down.

The remaining DeFi protocols would provide a Form 1099 to simplify tax reporting. Rather than computing taxes by hand, crypto investors could rely on the Form 1099 values, creating a similar tax workflow to conventional stocks.

Best Crypto Tax Software for DeFi

ZenLedger stands out as the best crypto tax software for DeFi because of its comprehensive support for decentralized finance (DeFi) transactions, making it an excellent choice for users heavily involved in the DeFi space. With the rising popularity of DeFi protocols like yield farming, liquidity provision, and staking, accurately tracking and reporting these transactions for tax purposes has become increasingly important. ZenLedger’s intuitive interface and powerful features enable users to seamlessly track and calculate taxes on various DeFi activities, ensuring compliance with tax regulations.

One of ZenLedger’s key strengths as a DeFi tax calculator is its ability to handle complex DeFi transactions across multiple protocols. Whether users are participating in yield farming, providing liquidity to decentralized exchanges, or staking tokens for rewards, ZenLedger can accurately track these activities and calculate the corresponding tax liabilities. This level of support for DeFi transactions sets ZenLedger apart from many other DeFi tax calculators, making it a preferred choice for individuals and businesses engaged in decentralized finance.

In Latest News: ​​Defi’s Total Value Locked Hits $80 Billion

Recent data shows that decentralized finance (DeFi) has surpassed $80 billion in total value locked (TVL), a milestone not seen since May 2022. Leading this surge in 2024 is Lido’s liquid staking platform, with ether-based liquid staking derivatives (LSDs) accounting for a significant $41 billion in TVL.

The Bottom Line

Now that we’ve established what DeFi is, as you can see, paying taxes on DeFi is a bit complicated. Luckily, ZenLedger can help you with your DeFi taxes, as we support over 300+ exchanges, 20+ DeFi Protocols, 3000+ tokens, all wallets, and 30+ blockchains, the most of any crypto tax software!

ZenLedger quickly calculates your crypto taxes and also finds opportunities for you to save money and trade smarter with our portfolio tracker. Get started for free now or learn more about our tax professional-prepared plans!

Disclaimer: This material has been prepared for informational purposes only and is not intended to provide tax, legal, or financial advice. You should consult your own tax, legal, and accounting advisors before engaging in any transaction.

DeFi Tax FAQs

1. Do you pay taxes on DeFi?

Yes, taxes may apply to transactions and activities involving Decentralized Finance (DeFi). Depending on your jurisdiction’s tax laws, various DeFi activities such as trading cryptocurrencies, earning interest through lending protocols, providing liquidity to decentralized exchanges, and receiving DeFi governance tokens may be subject to taxation. It’s essential to consult with a tax professional familiar with DeFi and cryptocurrency taxation in your country to understand your specific tax obligations and ensure compliance with the law.

2. Can the IRS track DeFi?

The IRS can track certain activities in the decentralized finance (DeFi) space, particularly transactions involving cryptocurrencies, through blockchain analysis tools and collaboration with analytics firms. While DeFi transactions offer some degree of anonymity, taxpayers should be aware that the IRS has been issuing guidance and regulations to ensure accurate reporting of income from cryptocurrency and DeFi activities, indicating their interest in monitoring these transactions for tax compliance purposes.