In the U.S., gains from cryptocurrency trading are taxed just like trading stocks: as capital gains.
Capital gains are only taxed when they are realized. At this time, you have realized a $40,000 gain, but you have not realized a loss. If you do not sell your new position before the end of the year, you will be taxed on the $40,000 gain. (Note: your gain is $40,000, not $50,000, because you had a cost basis of $10,000 on your investment, so your gain is $50k - $10k.) Because you only held the asset for less than a year, this is a short-term gain, which means it is taxed at your regular income tax rate. (If you had waited at least a year before you sold, any gain would be a long-term gain and taxed at a lower rate.)
If you were to sell your position today for $12,000, the second trade would have a capital loss of $38,000 ($50k - $12k). When you do your 2021 taxes, assuming you have no other investment gains/losses, you would be taxed on a net gain of $2,000 ($40k - $38k).
A note about the wash sale rule:
If we were talking about securities, you cannot sell your position now and then immediately buy back in and still take that capital loss on your taxes, due to the wash sale rule. If you sell at a loss and wish to claim that loss on your taxes, you must wait a minimum of 30 days before you buy back in.
However, according to CPA Jeffery Levine, the wash sale rule does not apply to cryptocurrency transactions. That means if you want to continue to hold your position, you could sell now at a loss, buy back in shortly thereafter, and still take that loss on your 2021 taxes.