Learn what decentralized finance is and how your interactions with DeFi protocols are taxed. In this guide, we cover 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 the use of financial institutions or middlemen (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, trades are 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 also enjoy being able to obtain 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 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 via yield farming strategies might move assets around within several different DeFi protocols, constantly working to find the 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 are also locking 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 network.
What is Crypto Exchange Liquidity?
Liquidity is the lifeblood of DeFi, and finance in general. In the crypto space, liquidity is known as assets that are 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 are grouped 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 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. Liquidity pools facilitate cryptocurrency trades (trading one cryptocurrency to another) and cryptocurrency loans backed by collateral, in a decentralized nature.
Liquidity Pool Example
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). The equal value of BOTH assets in the pair must always be provided 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 open pool market makes it possible for there to be a trading pair between any Ethereum pairs on Uniswap, and also highly liquid due to the 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 off of 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, cryptocurrencies are treated as property by the IRS 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.
So far, all the guidance issued by the IRS (Notice 2014-21, Rev. Rule 2019-24, 45 FAQs) has been generic and does not address DeFi at all. However, this is not an excuse not to report any of your DeFi related taxes. There is enough guidance 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 nor 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. This means a greater 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 in the process.
Below, we cover the types of DeFi transactions we commonly see, and how we treat each one 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). Additionally, when Jim receives his collateral back later, he does not receive the same exact ETH coin he deposited. This 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.
It can be argued 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 they can be deposited 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. It could be argued that the wrapped version of the original coin is a new coin resulting in a sale of the original. 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 the BTC on the ETH blockchain. You should be prepared to defend this intent to the IRS, however.
DeFi Borrowing Taxes
Let’s say Sara borrows 50 DAI which is worth $50 ($1 x $50)
This 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 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 on the use case of the loan proceeds. If the borrowed funds are used to buy a personal asset such as a new vehicle, that interest expense is considered personal so it is not deductible.
If you use the borrowed funds for investment purposes (yield farming for example) the interest expense you incur is classified as investment interest expense. Investment interest expenses are subject to special tax rules and are deductible only up to your net investment income.
Since special rules apply to investment interest expenses, 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.
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 is taxable. Receiving interest rewards is a taxable event where you have to 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.
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 his 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 is not taxable. Paying off a loan and getting your collateral back is not a taxable event. In the yield farming world, as long as you recognize interest and governance token income along the way, there is no taxable event at the time 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).
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 easily 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.