DeFi refers to a broad range of financial activities that aim to make transactions cheaper, faster, and more efficient.
March 15, 2024 · 14 min read
DeFi stands for decentralized finance. One of the biggest problems in the centralized financial system we have today is the involvement of intermediaries and the high cost and inefficiencies associated with processing transactions. For example, in order to process a mortgage, a bank would charge many different fees and take weeks to process the transaction!
DeFi refers to a broad range of financial activities (staking, providing liquidity, lending, and borrowing). These activities are conducted peer-to-peer (for example, on the Ethereum blockchain) without going through an intermediary like a bank. DeFi aims to make transactions cheaper, faster, and more efficient by eliminating intermediaries from transactions. For example, protocols like Compound and Aave allow users to lend money and earn interest. Exchanges like Uniswap and dYdX enable users to trade crypto assets without using a centralized cryptocurrency exchange like Coinbase or Binance.
Staking is the process of locking up cryptocurrency to secure a Proof of Stake (PoS) blockchain network. In return for locking up your cryptocurrency, you will receive staking rewards. The rewards are determined by randomly assigning the right to validate the next block to participants in the PoS blockchain. The more you stake, the better your odds are of being chosen to validate the next block and the resulting reward. Some examples of PoS networks are Ethereum (officially as of September 15, 2022), Cardano, and Solana.
Self-staking involves operating your own validator node, which secures the PoS network. This process is complex; you may need to be tech-savvy to maintain your node. One of the risks with self-staking is the node going offline. The node may incur a penalty if it goes offline for whatever reason.
Delegated staking is the most convenient way to stake cryptocurrency and earn staking rewards. This method involves handing over your coins to an intermediary (an exchange, wallet, or another platform) that manages the staking process on your behalf and distributes staking rewards periodically. These intermediaries will keep a percentage of the staking rewards in return for providing you with this service. You can stake your cryptocurrency in popular exchanges & platforms like Coinbase, Kraken, Exodus, and Lido.
Although delegated staking is user-friendly, it is not entirely risk-free. You could lose your funds if the intermediary files for bankruptcy or operates a fraudulent staking operation. Self-staking and delegated staking can come in two forms: illiquid and liquid staking.
Most platforms don’t allow you to use the tokens while they are staked; they are locked and unusable until you unstake them. This form of staking is called illiquid staking.
For example, if Jim stakes 10 Solana (SOL) on Exodus, he won’t be able to transfer SOL to another wallet or sell it while staked. He will need to unstake his SOL to start transacting with it again. He doesn’t receive a different token after staking his assets.
Liquid staking is a relatively new development in the crypto space. This method allows you to access liquidity while your assets are staked.
For example, if Jill stakes 10 ether (ETH) on Lido, she receives 10 staked ether (stETH) tokens in return. The stETH is the tokenized version of the ETH you staked. She can sell or utilize the stETH tokens while the original ETH is staked. The ETH stays staked, collecting rewards, while the issued stETH represents a transferable claim on that staked ETH and the rewards.
Each step of the staking process will have tax complexities. The IRS hasn’t issued any staking-specific tax guidance. Without this tax guidance, we must infer the tax implications of staking by referring to the general tax code.
The act of staking assets is nontaxable in most illiquid staking cases. The reason is that a disposition event has not occurred.
A disposition event occurs when you meet the following criteria (Reg §1.1001-1):
Exchange requirement
The exchange requirement is generally met when the property's “tax ownership” is transferred to a new tax owner. There is no direct definition of tax ownership. That said, according to tax literature, the party with the “benefits and burdens” of a particular piece of property is the tax owner of that property.
Material difference requirement
Again, there’s no clear-cut way to determine if this requirement is met. Questions you can ask are:
Example: Chris stakes 100 Tezos (XTZ). Chris did not receive any new tokens representing the staked assets. Even though an exchange may have occurred, he did not receive new tokens that were materially different. Since the material difference requirement was not met, this event won’t be taxable.
However, there could be situations (especially in the case of liquid staking) where you transfer assets to a platform, and the platform gives you another token representing your stake. Although the tax implications here are open to debate, conservatively speaking, the receipt of a new separate token may be deemed a disposition of the original token.
The IRS could compare liquid staking to Cottage Savings Assn vs. Commissioner. Cottage Savings was allowed to take a tax loss when exchanging participation interests in different mortgage loans. The court deemed that the underlying interests in the loans were materially different enough because they consisted of different debtors and were secured by other homes. This fact pattern was enough for a taxable disposition to have occurred. The IRS cites this case as an example in CCA 202316008's analysis of protocol upgrades and the exchange requirement. The IRS could note this case when they analyze staking.
Example: Chris stakes 1 ETH and receives 1 stETH. Chris purchased this ETH for $1,000 several years ago. When he trades 1 ETH for 1 stETH, stETH is worth $4,000.
The exchange requirement is met because Chris turns over the ownership of ETH. He now owns stETH, not ETH. The material difference requirement is also met. ETH and stETH have different prices in the open market and are entirely separate tokens. In addition, stETH gives you new legal entitlements. It allows you to earn additional rewards by participating in liquidity pools and other yield farms that you can’t do with ETH.
If you follow the conservative approach, converting ETH to stETH is a taxable disposition event where Chris has to report $3,000 ($4,000 - $1,000) of capital gains. The cost basis of the stETH will be $4,000.
Whether locking up assets in a platform is taxable is based on the facts and circumstances of each case. We highly recommend consulting a qualified tax advisor regarding your specific situation.
The act of unstaking is not taxable if a disposition fails to occur when you withdraw the asset.
Example: Chris unstakes 100 XTZ and does not trade a different token to receive the XTZ. This step was not a taxable transaction and is not a disposition since the material difference requirement is unmet.
Some unstaking transactions can lead to a taxable event if considered a disposition.
Example: Continuing with the Lido staking example, Chris returns 1 stETH and redeems the original 1 ETH he staked. When he sends his stETH back, ETH is worth $3,900. Assuming this is a disposition event (conservative approach), Chris will have a loss of $100 ($3,900 - $4,000 (cost basis from staking example)) capital gain from unstaking the assets.
It is important to take the same approach when entering and exiting staking positions. If you don’t follow the same approach, it could lead to inaccurate tax filings.
Conservatively speaking, staking rewards are taxed when you “constructively” receive income. Based on Reg § 1.451-2, constructive receipt of income occurs when “it is credited to your account, set apart, or otherwise made available so that you may draw upon it at any time, and there are no substantial limitations or restrictions” If there are no restrictions, you can have total dominion & control (D&C) over the rewards. D&C is established when you have the ability to sell or transfer the asset without any restrictions.
For example, Chris stakes 100 XTZ on Coinbase and receives a reward of 0.5 XTZ (worth $10 at the time of receipt). Chris has instant access to these rewards with no restrictions. Here, he has to report $10 as ordinary income. The reported income will be the cost basis when he sells the reward in the future.
Liquidity is the lifeblood of DeFi. But what is it? In textbook terms, liquidity is how quickly you can convert an asset into cash. For example, stock in your portfolio is more liquid than a rental property because many buyers are available for the stock, and only a few for your rental property. Cash is the most liquid asset you can have. In the cryptocurrency exchange world, liquidity means every time you place an order to buy or sell a crypto, there is a counterparty for that transaction.
In centralized finance (CeFi), crypto exchanges like Coinbase or Binance, the liquidity is provided by market makers. Market makers can be crypto whales or big institutions that deposit their assets on the exchange.
Suppose Coinbase lists a new token: ABC. At launch, 1 million ABC tokens will be listed. At this point, market makers would come into the picture and offer to buy 1 million ABC tokens at $10 (ask price) AND offer to sell 1 million ABC tokens at $12 (bid price). Note how they are participating in both sides of the trade, or in other words, literally making the market. This creates liquidity for the token, and other retail users would place trades based on the initial ask and bid price set by the market makers. This would ultimately form an order book like you’d see on any major exchange.
Think of market makers as wholesalers. Without these wholesalers, your trades won’t be executed instantly and you will have to wait until there is a readily available buyer at your price. During this process, these market makers pocket an enormous profit from the spread between ask and bid price. If you are a small investor, you never get to be a market maker in the centralized world!
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.
Decentralized exchanges and protocols still need liquidity, but using traditional market makers 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 traditional market makers (for example, large financial institutions).
A liquidity pool is a smart contract where crypto users’ funds are grouped together to provide liquidity for the market as a whole. Crypto holders who provide crypto assets into liquidity pools are called Liquidity Providers (LPs).
So why provide your hard-earned cryptocurrency tokens to a liquidity pool? Because LPs are rewarded with interest for locking in their tokens. Liquidity pools are used in various DeFi applications, from lending/borrowing platforms to cryptocurrency exchanges.
The process is relatively straightforward. First, many retail crypto holders (liquidity providers, aka LPs) collectively lock their funds in a pool administered by a smart contract. LPs get rewarded for providing liquidity. The greater the amount of locked funds in these pools, the greater the liquidity the exchange has. Liquidity pools facilitate cryptocurrency trades (trading one cryptocurrency to another) and cryptocurrency loans backed by collateral.
For example, let’s say someone starts a Uniswap (decentralized exchange) liquidity pool for DAI/USDC. They could start the pool by putting in 5 DAI and 5 USDC — equal parts of both because they are both dollar stablecoins that are closely pegged to $1. Why would they do that? Because they will earn interest in the form of pool fees for users who use the pool. Let’s say someone now puts in 1 DAI and withdraws 1 USDC; then the balance will be skewed in the remaining pool: 6 DAI and 4 USDC. The following user to put in 1 USDC will get 1.2 DAI out and make a profit in arbitrage. The open pool market makes it possible to have a trading pair between any Ethereum pairs on Uniswap. It is also highly liquid due to the clear arbitrage opportunities.
On top of this, each time someone trades in the pool, Uniswap charges a small fee that goes back into the pool. Let’s say, in this case, instead of getting back 1.2 DAI, the user would actually get back 1.197 DAI. The remaining portion goes back into the pool and is available for the liquidity providers in the pool to earn a profit. So you can see how the incentive mechanisms work to create lots of trading pairs with the transparency of DeFi, in addition to supporting high liquidity and maintaining price ratios of token pairs.
Since LPs generally receive a new crypto, Reg §1.1001-1 (exchange and material difference requirement) applies. When you deposit your crypto assets into the liquidity pool, you have a capital gain or loss; when you withdraw them from the pool, you have a capital gain or loss.
For example, Cathy (LP) deposits 1 ETH (worth $3,000) and 3,000 USDC (worth $3,000) into a liquidity pool. In exchange, she receives 20 liquidity pool tokens (worth $6,000) representing her share in the liquidity pool. Cathy acquired the 1 ETH two years ago for $1,000 and the USDC for $3,000. The deposit of 1 ETH and 3,000 USDC into the liquidity pool creates a capital gain event. Cathy has a capital gain of $2,000 ($3,000 - $1,000) on her ETH and no capital gain on her USDC ($3,000 - $3,000).
When Cathy returns the 20 liquidity pool tokens to the liquidity pool to redeem her ETH and USDC, there will be another capital gain event. For example, after six months, Cathy returns the 20 liquidity pool tokens and receives 1 ETH and 3,100 USDC. The combined FMV of ETH and USDC is $6,100 when she returns the liquidity pool tokens. This results in a capital gain of $100 ($6,100 - $6,000).
Platforms often offer rewards for deposited assets, akin to interest income. These rewards are generally taxable and must be reported as assessable income based on the FMV of the received assets at the time of acquisition. These assets will be subject to capital gains tax when they are disposed of in the future.
For example, Dale lends stablecoins to a platform to earn a rate of return. He periodically receives additional stablecoins as a reward throughout the year. These rewards add up to $50 based on their market value when received. The $50 of rewards is considered taxable income. If Dale sells the rewards for $110 a month later, he will have a capital gain of $60 ($110 - $50).
The terminology in DeFi, such as “lending”, doesn’t always align with the traditional definitions for tax purposes. Still, generally, we can continue to look to Reg §1.1001-1 (exchange and material difference requirement) to determine if there is a capital gain or loss when lending crypto. Like staking, receiving a different crypto in exchange for the lent token will be a capital gain or loss event. Typically when you lend your tokens using a protocol like Aave, you receive aTokens representing your position.
For example, Bruce lends 1 ETH he purchased several years ago for $1,400. When he lends it to Aave, the ETH is worth $3,900. Bruce receives 1aETH representing the ETH he lent to the protocol. The conservative approach would be to treat this as a capital gain event because the exchange requirement is met, and the IRS could argue that the aETH is materially different. That means Bruce has a gain of $2,500.
Let’s assume that when he returns the aETH, ETH is valued at $4,000. Bruce would have another capital gain of $100 ($4,000 - $3,900).
Typically, when you put up your assets as collateral and receive a loan, it is not a taxable event. This is similar to getting a home equity line of credit, where you collateralize your home with the bank and get cash against your equity.
Let’s say David purchased 1 BTC in 2017 for $1,000. It is now worth $70,000. David decides to deposit his BTC as collateral and gets a USDC loan. The protocol offers him a $40,000 loan. This $40,000 is not taxable to David; he doesn’t have to report this amount on any tax forms.
Generally speaking, paying back a loan and unlocking your cryptocurrency collateral is not a taxable event. Say David pays back the 40,000 USDC and receives back the 1 BTC. This is not a taxable event for David, even if the price of BTC changes while it is locked as collateral.
There are a few situations where BTC loans generate a tax obligation.
First, if a loan is not paid back, the lending platform can liquidate your collateral to cover your losses. This liquidation event can create a realized capital gain or loss event for you.
Say David bought a boat with his loan and decided not to repay the $40,000 loan. On this day, BTC is trading at $65,000. In this case, the lending platform can liquidate his 1 BTC, subjecting David to a capital gain of $64,000 ($65,000 - $1,000). Thus, defaulting on a cryptocurrency-backed loan is not a path to cash out without paying capital gains taxes.
Second, price volatility can also lead to liquidation. For example, suppose the price of the collateralized bitcoin falls below a certain threshold set by the lending platform. In that case, they reserve the right to liquidate the collateral to protect themselves from losses. Users must supply additional collateral or pay off the loan to avoid liquidation and the resulting taxes.
When handled correctly, cryptocurrency loans do not result in any taxes. That said, the IRS could technically argue that cryptocurrency loans are taxable because cryptocurrencies like BTC may not be considered completely fungible like fiat. However, the chances of crypto-backed loans being treated this way are remote.
When you borrow funds from a DeFi protocol, you have to pay interest to the platform for the risk assumed by the liquidity providers. 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 car or other personal asset, that interest expense is considered personal so it is not deductible.
If you use the borrowed funds for investment purposes (yield farming, for example), your interest expense is classified as investment interest expense. Investment 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 important to track these separately. The amount you can deduct each year is calculated on IRS Form 4952. Once calculated, this amount will flow to Schedule A, Line 9. Make sure to itemize these expenses to take advantage of their benefit.
CoinTracker supports 23,000+ smart contracts and the top 85 dApps. It accurately accounts for wrapping/unwrapping, staking, lending, and liquidity pools, gas fees and has ERC-1155 and ERC-721 token support. It detects the most advanced EVM DeFi activity and automatically tags those transactions. Users can also set rules to treat wrapping, staking, liquidity, and lending as non-taxable.
Let us know if you have any questions or comments on X @CoinTracker.
CoinTracker delivers integrations for 500+ exchanges, wallets, and NFTs, and 23,000+ DeFi smart contracts. Generate accurate reports and file in minutes with the only solution that integrates directly with TurboTax, H&R Block, or your own CPA.
Disclaimer: This post is informational only and is not intended as tax advice. For tax advice, please consult a tax professional.