Bitcoin surged in 2017, turning many early adopters of the cryptocurrency into millionaires. Wherever money's being made, you can count on the IRS to want its cut, and thanks to tax reform efforts, winners in the bitcoin world have now lost a key strategy they had hoped to use to diversify their holdings and avoid the tax man.

Tax reform efforts centered on broad-based changes to the individual and corporate tax system. Along the way, though, lawmakers also sought to clamp down on certain specific niches in which they saw potential for tax abuse. The cryptocurrency market is an obvious place for aggressive tax avoidance attempts from traders. By taking away the benefits from one key provision -- the like-kind exchange -- bitcoin profiteers won't be able to diversify their cryptocurrency holdings in a tax-free manner any longer.

Block wall with Internal Revenue Service carved into it.

Image source: Getty Images.

The basics of cryptocurrency taxation

When bitcoin first became popular, it wasn't clear how the IRS would tax it. The tax agency eventually settled on treating cryptocurrencies like capital assets, and that decision had both positive and negative implications for investors.

On one hand, treating bitcoin as a capital asset gave investors the chance to claim preferential long-term capital gains rates on sales of cryptocurrencies that they had held for longer than a year. Long-term rates of 0% to 20% are still much better than the 10% to 37% rates that apply in 2018 under tax reform laws.

However, treating bitcoin as a capital asset meant that every single time you used bitcoin in a transaction, you created a taxable event. Even spending bitcoin at a store would require you to report the value of the goods you received in exchange for the bitcoin, what you initially paid for that bitcoin, and the difference that would in turn represent taxable capital gains income or loss.

That created a conundrum for bitcoin investors: how to cash in on their profits without having to pay tax. Fortunately at the time, IRS treatment of bitcoin allowed some aggressive taxpayers to argue that a strategy commonly used among real estate investors would apply to cryptocurrencies.

How like-kind exchanges work

Section 1031 of the Internal Revenue Code provides for tax-free treatment of transactions involving an exchange of assets that are of like kind. For instance, if you own an apartment building that you hold out for rent and you sell it for cash, then you'll pay capital gains tax on the difference between the proceeds and the tax basis of the property. However, if you exchange the building for a different apartment building, then no tax is immediately due, and any gain is deferred until you sell the second building.

Many bitcoin investors argued that the IRS should treat cryptocurrencies the same way. Therefore, if one sold bitcoin for U.S. dollars or traded it for a car, then one would definitely have to pay tax on any gains. But if investors traded bitcoin for ethereum, ripple, or any other cryptocurrency, they could at least take the position that it might qualify as a like-kind exchange. If you took that position, you would then pay not tax immediately but rather assert that taking the tax basis for your bitcoin and carrying it over to be your new tax basis for the ethereum or other replacement cryptocurrency was appropriate.

What Congress did

Now, that strategy is explicitly not longer available. Lawmakers changed the like-kind exchange provisions of Section 1031 to limit its application only to real property. Going forward, investors in artwork, collector vehicles, and similar high-priced tangible personal property assets for which like-kind treatment used to be available won't be able to shelter their gains from tax by doing exchanges.

The move also applies to bitcoin and other cryptocurrencies, making it impossible even for aggressive bitcoin owners to take the position that like-kind exchange treatment is appropriate. You'll therefore have to hold onto your specific cryptocurrency to defer gains, and spending it, selling it, or exchanging it for other types of cryptocurrency will all trigger potential taxation.

Bitcoin investors: You're on notice

The IRS has made it clear that with the huge profits that investors have made from holding bitcoin, the agency will be on the lookout for those seeking to evade their legal tax liability. Lawmakers just made things a bit easier for the IRS going forward, and you'll have to be diligent in the way you deal with cryptocurrency holdings to minimize taxes in 2018 and beyond.

Editor's note: A previous version of this article failed to state that the IRS never explicitly authorized taxpayers to use like-kind exchange treatment for exchanges between bitcoin and other cryptocurrencies. The author and the Fool regret the omission.