How Cryptocurrency Margin Trading Works

This post explains how cryptocurrency margin trading works and how it is taxed. Before we jump into the details, it’s important to understand a few definitions.


A derivative is a financial security with a value that is reliant upon or derived from, an underlying asset or group of assets. The derivative itself is a contract between two or more parties, and the derivative gets its price from fluctuations in the underlying asset. A futures contract is a type of financial derivative. Futures are a financial bet that a stock or other investment like cryptocurrency is going to go up or down in value at a “future” date (hence the name).

There are no general principles governing the taxation of derivative contracts in the US. Instead what we have is a complex set of tax rules and regulations that have evolved in piecemeal fashion over time. Due to its complexity, these rules are often exploited to make financial bets relatively risk-free by delaying, minimizing, or even avoiding taxes. Tax rules applicable to futures and other derivatives are complex and riddled with loopholes. Moreover, none of these rules are clearly laid out in the cryptocurrency space, leaving significant grey area in how cryptocurrency derivatives are taxed.

Derivatives Complexity

Existing tax rules provide differential treatment for derivative transactions based on many factors, including: character of tax attribute (ordinary vs. capital), timing of recognition (short-term versus long-term), type of derivative instrument (option, future, forward, or swap, and whether over-the-counter or exchange-traded), disposition of the contract (terminated, exercised, or lapsed), type of settlement (cash vs. physical delivery), intended use of the instrument (investment vs. business hedge), nature of the taxpayer (dealer, trader, or investor; corporation or individual), source of the transaction (US or foreign), and more.

Furthermore, taxpayers must consider numerous anti-abuse rules (e.g. straddle and wash sales rules) when they engage in certain derivative transactions. Moreover, these tax rules prescribe federal tax treatment of derivative instruments without regard to their treatment under accounting rules.

Cryptocurrency Derivatives

Crypto derivatives have an added layer of complexity to this already complex subject. This is primarily for three reasons:

  1. The IRS has issued guidance stating that cryptocurrency is taxed as “property”
  2. Cryptocurrency platforms have created innovative crypto derivatives which do not resemble any traditional derivatives instruments
  3. There is no IRS guidance on cryptocurrency derivatives

In the absence of direct guidance aimed at cryptocurrency derivatives and due to the complexity of the tax code surrounding this subject area, we encourage following a conservative, practical, and simple approach to calculate taxes arising from crypto derivatives.

BitMEX Futures

BitMEX calculates realized profits and losses (PnL) on every settled futures contract and displays them on the exchange dashboard. CoinTracker converts these realized PnL cryptocurrency amounts (as defined and calculated by BitMEX) into USD at the time of contract settlement and displays them in CoinTracker. See more details on how BitMEX margin tracking works.

The way you file your BitMEX taxes depends on a variety of factors mentioned in the “Derivatives Complexity” section above. We recommend consulting a tax professional if you are not sure how to deal with this (or fill out this form and we will connect you with a tax professional).

BitMEX Example

David has 1 bitcoin (XBT) of realized profit on Contract A on January 1, 2020 and 2 XBT realized profit on February 1, 2020 on Contract B. The USD price of 1 XBT is $1,000 (on January 1, 2020) and $1,500 (on February 1, 2020).

In this case, CoinTracker will show the net futures gain of $4,000 ($1,000 + (2*$1,500)) on the tax page. The tax treatment for these amounts on your tax forms will vary based on the taxpayer’s case as mentioned above (see “Derivatives Complexity”).

The amount recognized as income on the above step will be the cost basis for those bitcoin going forward. Continuing the example, if David were to sell 1 XBT received from settling the Contract A for $5,000 on July 1, 2020, that would trigger a short-term capital gain of $4,000 ($5,000 – $1,000). This would be included on his Form 8949 and Schedule D tax reports just like any other bitcoin sale.

Finally, sophisticated taxpayers may be able to treat these cryptocurrency futures as Section 1256 futures (an aggressive approach) which are eligible for more favorable tax treatment.

Kraken Margin Trading

CoinTracker handles Kraken futures the same way as BitMEX with two notable differences. First, the PnL on each contract is converted into USD (if they are not shown in USD) at the time they are settled.

Second, we track margin fees (see below) on a separate line item so your accountant has the information needed to follow the tax rules (BitMEX doesn’t break out fees separately from the PnL).

Margin Interest

When you borrow funds to trade cryptocurrency, you typically have to pay a fee. This fee is called an investment interest expense. Investment interest expenses are subject to special tax rules and are deductible only up to your net investment income amount.

For example, let’s say during 2020, you generate $3,000 worth of net investment income. You also incur $4,000 worth of margin fees (investment interest expenses) to generate these gains. When you file your 2020 tax return, you can only deduct $3,000 worth of investment interest expense. The remaining $1,000 will be carried forward to future years. You can deduct this $1,000 when you have net investment income in future years.

Since special rules are applicable to investment interest expenses, it is important that you track these separately. The amount you can deduct on each year is calculated on 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!

If you have any questions or comments, please reach out to us on the CoinTracker forum.

Disclaimer: this post is informational only and is not intended as tax advice. For tax advice, please consult a tax professional.