Learn what decentralized finance is and how your interactions with DeFi protocols are taxed. In this guide, we cover several aspects of DeFi taxes including yield farming, the tax treatment of lending and borrowing, providing liquidity to a pool, staking, and more.
What is Decentralized Finance (DeFi) in Crypto?
Decentralized Finance, popularly known as the DeFi, allows traders to access services like lending, trading, borrowing and earning interest without the need to use middlemen or financial institutions (centralized exchanges, such as Coinbase, Gemini, or Binance). Decentralized exchanges (DEXs) like Uniswap utilize automated market-making - that means they rather depend on an exchange’s order trades or books, filled using liquidity provided by ordinary traders who pool 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 services that are traditionally centralized, like loans and currency exchanges, through a more efficient, free, and decentralized platform.
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 obtain DeFi tokens without using 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 that has liquidity in the trading pair they are interested in using.
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 move assets around different DeFi protocols through their yield farming strategies, and work to find the best pool that is 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 lock up your crypto assets in a smart contract, but the assets are not used for financial liquidity. Instead, the assets are used to secure the network by blockchains that have a Proof of Stake (PoS) consensus mechanism. As a reward for securing the network, you earn interest from block rewards on the said network.
What is Liquidity?
Liquidity is the lifeblood of DeFi taxes, and finance in general. In the crypto space, liquidity is known as assets that are available for immediate deployment (called swaps).
To understand the existence of a liquidity pool and its use, one must drill into the functionings of decentralized exchanges. Let’s take Uniswap for example, 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 is to create liquidity pools that abide by smart contracts. This liquidity pool is in place, providing liquidity to DeFi platforms (exchanges, lenders, borrowers, insurance, etc.) in a peer-to-peer fashion without the use of centralized exchange pools that are held by a custodian.
What is a Liquidity Pool?
A liquidity pool is a smart contract where the funds from crypto users are grouped together to provide liquidity for executing trades. Crypto holders who invest their crypto tokens into liquidity pools are known as Liquidity Providers (LPs). Uniswap uses a smart contract to provide this liquidity using deposits made by a yield farmer, who is 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 the tokens can be swapped between one another.
In exchange for providing liquidity, these liquidity providers earn rewards from the fees users pay to use the pool. The rewards are based on their share of the liquidity pool and the swap fee. The liquidity pools trade the cryptocurrencies (which means trading a cryptocurrency with another) and crypto loans backed by collateral, in the nature of decentralization.
An Example of a Liquidity Pool
Uniswap is a decentralized exchange that uses automated market-making and users' 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). BOTH assets in the pair must always be EQUAL to keep the liquidity balanced.
- 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 are charged a 0.3% fee.
- This fee is distributed to liquidity providers, based on their share of the pool, as a reward for providing liquidity!
The market of the open pool makes it possible for a trading pair between Ethereum coins on Uniswap and is also highly liquid due to its clear arbitrage opportunities.
Liquidity Pool Taxes
There are many other advantages to providing liquidity, but for the purpose of 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.
How Are DeFi Transactions Taxed: DeFi Tax Guidelines
At a high level, cryptocurrencies are treated as property by the IRS and all the general rules applicable to property apply to cryptocurrency transactions. Every time you sell, spend, or exchange cryptocurrency, there is a taxable event.
As for now, all the guidance that is issued by the IRS (Notice 2014-21, Rev. Rule 2019-24, 45 FAQs) has been quite generic and doesn’t address DeFi taxes. Nevertheless, this does not account for an excuse to not report any of the DeFi-related taxes. There is enough guidance in place to infer the yield farming transactions and tax implications of DeFi.
The process of yield farming and DeFi generally includes several transactions. In the following sections, we will be breaking down these transaction types. Some of the DeFi transactions do not have any kind of direct or ancillary tax guidance. In addition to that, we will also present various tax positions you can take based on your risk tolerance.
The more aggressive the tax position, the higher its exposure. This means a greater risk of under-reporting and getting audited.
On the upside, considering the aggressive tax positions would result in lower taxes, tax deferment, and lower upfront tax payments. This means, the lower the aggressiveness level, the lesser the risk of falling into trouble with the IRS. Anyhow, you must report your income sooner and also pay more taxes in the process.
Below, we cover the types of DeFi transactions we commonly see, and how we treat each one for tax purposes.
DeFi Tax on Lending Crypto
1 ETH is locked into Compound, which Jim purchased a few years ago for $50. At the time of depositing, 1 ETH is about worth $100. Bruce also receives about 50 cETH, a protocol token that represents the contribution to the liquidity pool. Adding to this, the cETH is tradable at other exchanges at worth $1 per coin.
Our take: This is a taxable event. Jim is getting rid of his original ETH and receiving cETH, a new crypto token in a 1:1 trade. All crypto-to-crypto trades are taxable as per the IRS (A15). Additionally, Jim gets back his collateral later on but it's not the ETH coin he deposited. This means his original ETH has been sold in the IRS’s eyes. As a result, Jim would report $80 ($100 – $20) worth of capital gains from the transactions.
It can be argued that this is not taxable. Bruce is not actually selling his ETH. He is only depositing assets as collateral. He wants to borrow funds against ETH and NOT to sell the protocol token, cETH.
DeFi Taxes on Wrapping Crypto Coins
Sometimes protocols require you to "wrap" coins before they can be deposited into a specific blockchain’s smart contract. For example, the operation of BTC is not on Ethereum but on Bitcoin. Therefore, in order to use Bitcoin with DeFi-based Ethereum platforms, you need to “wrap” BTC by using the Ren protocol. This essentially locks the BTC in escrow for an exchange of the ERC-20 token version of BTC, called the wBTC (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. It could be argued that the wrapped version of the original coin is a new coin resulting in a sale of the original. As we said before, any crypto-to-crypto trades are taxable.
It can also be argued that this is not a taxable sale of the BTC to receive wBTC. The intention of wrapping a coin is to add additional functionality to use BTC on the ETH blockchain. You should be prepared to defend this intent to the IRS, however.
DeFi Tax on Borrowing Crypto Coins
Let’s say Sara borrows 50 DAI that is worth $50 ($1 x $50)
This is likely not taxable. Otherwise, generally funds received via a loan are not taxable as they are not an income to the borrower.
DeFi Taxes on Interest Payments on Borrowed Funds
When you borrow funds from a DeFi protocol, you have to pay interest to the platform. Interest expense charged on loans is one of the main sources of income for DeFi platforms. The deductibility of this interest expense depends entirely on the purpose of the loan proceeds. Here are two plausible scenarios:
- If the funds borrowed are used to purchase a personal asset such as a new vehicle, then the interest expense is considered private which is why it is not deductible.
- If you use the funds for investing in a pool (say, for yield farming) the interest expense you incur in the process is categorized as investment interest expense. These come under special tax rules and are deductible only up to your net investment earnings.
Note: Since special rules apply to investment interest expenses so it is important to track these separately. The amount you can deduct each year is calculated on IRS Form 4952. Your tax professional will be able to advise you on how to work with this situation to be accurate.
DeFi Tax on Earned Interests
Chris receives 0.1 ETH as interest for providing liquidity on Uniswap. At the time of the receipt, 1 ETH is worth $200.
This is taxable. Receiving interest as a reward is a taxable event where the taxes are based on the token’s current market value. 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).
DeFi Taxes on Governance Tokens
In addition to receiving more ETH interest income, Chris also gets an airdrop of 200 Uniswap tokens. This is a taxable event and the raxes are based on the current value of the token during the airdrop. Now, if Chris sells these 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.
DeFi Taxes in Case of a Liquidation
Let’s say that the price of Ethereum coins dropped and Chris’s DeFi platform liquidated his collateral at $50.
We see this as a taxable event. The liquidation of the collateral here is a disposition event, which is similar to a sale. In this case, Chris 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.
DeFi Taxes on Exiting The Liquidity Pool and Taking Back Your Collateral
This is not taxable. Paying off a loan and getting your collateral back is not a taxable event. In the yield farming scenario, there is no taxable event at the time you exit the pool as long as you recognize interest and governance token income along the way.
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. Refer to the section on wrapping.
DeFi Taxes on Gas Fees
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).
The Bottom Line on DeFi Guide on Taxes
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!