Making money on bitcoin, ethereum, and scores of other cryptoassets has been remarkably easy this year. But in the US, paying taxes on those gains could be a lot more complicated. Transactions that are routine to experienced crypto enthusiasts—like hard forks, or swapping between coins at the tap of a button—are fiendishly complicated when it comes to reporting to the Internal Revenue Service.

And make no mistake: the agency is determined to make sure people pay what they owe. Over the course of bitcoin’s booms and busts, the IRS has noticed that tax returns aren’t lining up with the manic popularity of the cryptocurrency, according to Tech Crunch. Last month, a federal judge in San Francisco ruled that digital-asset exchange Coinbase must give the IRS information about users who made more than $20,000 in annual transactions in recent years.

To help confused crypto investors, accountants like William Brock now specialize in the peculiarities of how the US tax code applies to these burgeoning assets. If you’ve made money on crypto this year, here are some pointers he says you should keep in mind. (Needless to say, this is not legal advice and it’s far from exhaustive—if you have specific questions, it’s best to consult with a tax professional.)

Swapping one cryptocurrency for another

People typically think about paying taxes on an investment after they’ve sold it. But switching from one digital asset to another will trigger capital gains, even if you don’t convert to dollars as an interim step. For example, trading ether for bitcoin and not reporting the gains on the ether will not pass muster with the IRS.

A way around this relies on a “like-kind exchange” as described in Section 1031 of the tax code. (Are we having fun yet?) The rules on this can be “ridiculously strict,” Brock says. You can’t use it for securities or to exchange, say, a bull for a cow. You have to go through a qualified intermediary, an agent who specializes in such transactions, and the transaction must be started by Dec. 31.

Another wrinkle: the Senate’s draft tax bill could make this even thornier. If passed in its current form (a big if, of course), like-kind exchanges of personal property won’t be permitted.

Short-term versus long-term gains

If you’ve sold a digital asset this year and made a gain, the tax rate for short-term transactions (less than one year) can be as high as 39.6% (or 37% if the Republican tax reform goes through). You may also be subject to state taxes of around 3% to 13% .

Long-term gains (for assets held for at least one year plus one day) are taxed at a lower rate. The rules are complicated, but tax rates range from 0% to about 20%. A single person with income of more than $200,000 per year ($250,000 if married and filing jointly) could owe an extra surtax of 3.8% through the NIIT, or net investment income tax.



Foreign asset reporting requirements

The US Treasury wants to know if American residents own foreign assets. Where is your bitcoin account based? Is that where your bitcoins are held? Non-US holdings need to be reported to the Treasury using FinCen form 114, and for the IRS it’s form 8938. That said, US citizens and residents who own less than $10,000 of assets abroad generally don’t need to worry about this.

Hard forks

Hard forks happen when the software for a digital asset is changed for some reason, usually to improve it. This summer, bitcoin cash was created to speed up transactions. Anyone who owned bitcoin before the split ended up owning both afterwards.

Is this like a stock split? A spinoff? A gift? Someone who bought bitcoin before the fork didn’t necessarily ask for bitcoin cash, want it, or even know that they now own it.

The thing is, it probably counts a taxable income, according to Forbes, which points out that the IRS has a “long and successful history of treating ‘free money'” as taxable income. People who owned bitcoin before the hard fork will have to figure out the fair market value of bitcoin cash when it came into being, for cost-basis purposes. Futures markets suggest that it was worth around $275 at the time of the fork on Aug. 1.

When the bill comes due

It may sound basic, but even the most ardent crypto-enthusiast who eschews fiat money needs to have dollars on hand to pay their final tax bill. If, say, the bitcoin bubble pops next year, taxpayers could still owe money to the IRS depending on gains or income achieved through trading during the year, swaps between digital assets, or hard forks. This is basically what happened to tech workers in 2001, who exercised stock options before the dot-com bubble burst. For various arcane reasons, some of these workers owed far more in taxes than their stock was worth when the time came to pay the tax man.

The good news

If thousand-percent gains aren’t already good enough news for crypto investors, turns out that digital assets like bitcoin and ethereum are great for non-cash charitable contributions.

For example, if a person bought $1,000 worth of ether and it appreciated to $10,000, they can give the cryptocurrency to a charity and get a $10,000 deduction on their taxes, as well as avoiding tax on the $9,000 capital gain. However, the ether must be gifted directly to the charity, because selling it first would trigger a tax on the gains.

“It amuses me to no end to think about the neighborhood Baptist church or cat shelter opening accounts on Coinbase,” says Brock, who is also treasurer of the Chicago Chess Center. The non-profit recently started accepting cryptoassets for donations.

