Last month the IRS issued a serious warning through a press release to anyone that does not pay taxes on their cryptocurrency profits. The statement says that “taxpayers could be subject to criminal prosecution…Anyone convicted of tax evasion is subject to a prison term of up to five years and a fine of up to $250,000.”

Unfortunately, few people understand how to account for cryptocurrency gains on their tax returns.

Why do I need to pay taxes on my crypto profits?

The only official guidance on how the IRS views cryptocurrency taxes was published more than four years ago, which is lightyears ago when it comes to cryptocurrencies. At that time, the IRS stated that “For federal tax purposes, virtual currency is treated as property [and not as a currency].” This means that we need to think of cryptocurrency transactions just as we think of stocks: We pay taxes anytime we sell a cryptocurrency and make a profit.

The IRS views any transaction with cryptocurrency as two separate transactions: a sell and a buy transaction. For example, if we used a cryptocurrency to buy any service or product, then the IRS views that transaction as a sale of the cryptocurrency and then the purchase of another asset, which could be a cup of coffee or a different cryptocurrency.

Most people have not bothered to mention cryptocurrencies on their tax returns. In 2015, which was one year after the IRS created the cryptocurrency tax rules, only 802 people mentioned cryptocurrencies at all on their tax returns; cryptocurrency company Coinbase now has more than 10 million customers. That’s more customers than Charles Schwab! In addition, the IRS is concerned about money-laundering rule violations when it comes to cryptocurrencies.

Although the IRS tax rules on cryptocurrencies seem somewhat cryptic, it’s important that cryptocurrency investors speak with their accountants and/or tax attorneys. They should not only pay taxes on the past year’s cryptocurrency profits, but in all previous years, regardless of how small the profits might have been. (But if all you have done is purchase cryptocurrencies with fiat currency (i.e., US dollars), then you don’t owe any taxes, unless you sell the cryptocurrencies at a profit.)

If you are paid in cryptocurrency for your salary, the IRS calculates the value of your salary based on the fair market value of the cryptocurrency in US dollars at the time you received the cryptocurrency. (Similar rules apply for cryptocurrency miners.) If your compensation in cryptocurrency is not documented on a W2 or a 1099, then you’ll have to speak with your accountant and/or a tax attorney on how to report this when you file taxes. (And note that if you were paid less than $600 in cryptocurrencies, the company that compensated you is not required to send you a 1099, but you still need to claim this amount on your taxes.)

Will the IRS know if you don’t declare your cryptocurrency taxes? There is a precedent from 2009 when the IRS started to collect over $10 billion in taxes from UBS account holders in Switzerland. The IRS is so serious about this issue that it recently demanded that Coinbase give the IRS transaction data on more than 10,000 Coinbase customers. This is a signal that the IRS will find a way to get customer data from many cryptocurrency wallet and exchange companies, so the best plan of action is to file and back file (if applicable) all cryptocurrency taxes.

Reducing your crypto tax bill

Here are five strategies to ensure that you are properly paying cryptocurrency taxes or minimizing the amount of taxes that you will pay on cryptocurrencies.

1: Be a long-term investor. Taxes are much lower if you own cryptocurrencies for more than one year; the IRS rewards patience. Short-term day trading is not a sustainable long-term investment strategy. Warren Buffett famously said, “The longer the view, the wiser the intention.” When Warren Buffett invests in a company, he assumes that the market will be closed for 10 years. Thinking long-term when investors do their due diligence on cryptocurrencies is a prudent strategy in most situations, as capital-gains taxes on investments held for more than one year are much lower than capital-gains taxes on investments held for less than one year.

Cryptocurrency investors should always do their own thorough research so that they won’t be tempted to sell on weakness. Another great Warren Buffett quote is that “The New York Stock Exchange is the only store in the world where consumers sell stuff when it goes on sale… Investors should be greedy when others are fearful and fearful when others are greedy.” Rather than being a “renter” when it comes to cryptocurrency investment, thinking as an “owner” usually pays off in the long-run.

2: Immediately put money aside in dollars whenever you sell a cryptocurrency and make a profit (and not in another cryptocurrency). In terms of how much money in dollars to put aside when you realize a profit, it depends on two things: 1) how long you owned the cryptocurrency for, and 2) your tax bracket. In terms of how long you owned the cryptocurrency for, if you owned it for more than one year, then you pay long-term capital-gains taxes, which are either 0%, 15%, or 20%, depending on what your tax bracket is. If you owned the cryptocurrency for less than one year, then your taxes are likely much higher and potentially close to 40% depending on your tax bracket.

The worst thing a cryptocurrency investor could do is to convert from one cryptocurrency to another if the investor has made a huge profit on the initial cryptocurrency. For example, if an investor bought $1 worth of Cryptocurrency A on Jan. 1 and then converted it into Cryptocurrency B once it reached a value of $101, then the investor would be taxed on the $100 gain, as the IRS views the conversion from one cryptocurrency to another as a sale and a purchase.

Then, if we assume that the same investor’s investment in Cryptocurrency B went from a value of $101 when Cryptocurrency B was purchased in year one to a value of $1 when they sold Cryptocurrency B in year two, then the tax implications are horrific. In this example, the investor would have to pay taxes on the $100 in realized profits in year one, even though the investor lost $100 on Cryptocurrency B in year two.

If an investor lost money on the sum of all transactions in a given year, then the investor can claim a tax loss of a maximum of $3,000 per year. If the amount of the loss in a given year is more than $3,000, then the investor can recognize the additional loss in the next tax year (as long as the value of the loss it not higher than $3,000 in each year).

Similar to how taxes must be paid on dividends of publicly traded companies, if you receive additional cryptocurrencies through a “fork,” then you must pay taxes on the amount that you received. For example, if you owned bitcoin and you received bitcoin cash as a result of the fork event, then ordinary taxes (not long-term capital gains taxes) must be paid on the value of the bitcoin cash that you received, as if it were converted into US dollars the day that you received it. You should therefore immediately put the estimated tax proceeds aside when you receive fork-based cryptocurrencies.

3: Keep a detailed record of all your cryptocurrency transactions. Document all your buy and sell dates and amounts in a spreadsheet. You can also export the data from many cryptocurrency wallet and exchange websites for use in a spreadsheet. (Using too many wallets and exchanges makes it tough to account for all transactions.) Unlike financial-services companies that often send you year-end tax statements, most cryptocurrency companies don’t do this, which further complicates the tax filing process. Some companies have started to issue 1099-K tax forms, like Coinbase, who issues them to customers that transact more than 200 times per year in more than $20,000 worth of cryptocurrencies.

4: Hire a tax attorney and/or an accountant to help you file taxes. This is especially true if you think you owe back taxes, which you should definitely pay or risk paying potential massive fines and serving potential prison time too. A lot of famous people went to jail for tax reasons, like Sophia Lauren, Wesley Snipes, and the infamous Al Capone. If you think you might need more time to file your taxes past the April 17 deadline, then speak with an accountant and/or a tax attorney. Although companies like Coinbase have started to provide guidance on how much customers might owe in taxes, it is prudent to still hire an accountant and/or a tax attorney.

5: You can gift or donate your cryptocurrency and not pay taxes, if you have not sold the cryptocurrency. The process is similar to how the gifting of stocks process works. According to Schwab, when you gift a stock, the value of the gift is the fair market value when the stock has been gifted and, according to IRS guidelines, the maximum gift size for 2017 tax purposes is $14,000 per gift.

The future of crypto taxes

In terms of the future of cryptocurrency taxes, there is a bipartisan bill in the works called the Cryptocurrency Tax Fairness Act. This bill was introduced last September and might reclassify cryptocurrency as a currency, allowing Americans to not report any transactions that are under $600.

At this point, other countries are taking advantage of the strict US cryptocurrency tax rules by offering no long-term taxes in countries like Germany, and no taxes at all in countries like Denmark, Serbia, and Slovenia. It’s therefore beneficial for startups to create cryptocurrency jobs created in the aforementioned countries; this is now a jobs issue for US-based politicians.

Expect the IRS to demand a list of cryptocurrency customers and transactions from many more cryptocurrency companies in the next few years, and to use sophisticated software products to find and fine those who have not paid taxes on crypto currency gains. The US government has a decent track record of investing in artificial intelligence-based software companies that can uncover data-based patterns. For example, the US government owns a venture-capital firm called In-Q-Tel (the “Q” is literally derived from the James Bond character Q) that makes many AI-based software investments, and partners with top US venture-capital firms.

In-Q-Tel has a successful track record in investing in promising software companies like Palantir, which solves many of the world’s largest problems, like identifying security vulnerabilities and tracking down terrorists and human traffickers. Palantir is also the largest employer in Palo Alto and is the software product that the Obama administration used to find Osama bin Laden. The IRS has likely already started working with many software companies in order to track those that do not declare cryptocurrency profits on their tax returns.

The bottom line: Seek professional assistance from an accountant and/or tax attorney if you are having issues understanding how to file taxes for your cryptocurrency investments.