Tesla's second quarter of 2022 ended on a rocky note, as the electric vehicle manufacturer announced a decline in profit due to its inability to meet demand because of the shutdown of its Shanghai factory and manufacturing difficulties at new facilities.

The electric vehicle manufacturer also liquidated 75% of its Bitcoin (BTC) holdings, valued at around $936 million, resulting in a price decline for the cryptocurrency.

Early last year, Tesla invested $1.5 billion in bitcoin, betting on the digital currency's "long-term potential," as described by the electric vehicle manufacturer.

In its after-market earnings statement, the Elon Musk-founded electric car maker stated in a shareholder presentation that "Bitcoin impairment" had a negative impact on the company's profitability in the second quarter, when it earned $2.5 billion in operational profits.

Tesla has not been immune to economic difficulties. This quarter, Tesla was obliged to temporarily shut down its Shanghai Gigafactory in order to comply with pandemic lockdown requirements, resulting in an unusual decline in delivery numbers.

In the second half of the year, the company supplied 254,000 automobiles, 18 percent less than the previous quarter. This month, Tesla also issued a hiring moratorium and began laying off employees, including 229 people that worked on the Autopilot driver assistance system.

It's a swift turnaround for Tesla and CEO Elon Musk, who frequently tweeted about various digital currencies during last year's cryptocurrency boom. In the previous four months, the price of bitcoin has lost half of its value, resulting in a "crypto winter."

The price of Bitcoin, which surpassed $24,000 on Wednesday, fell dramatically after markets closed at 4 p.m. Eastern Time. According to Coingecko, it was trading at $23,069.18 at the time of writing, down 2.4% in the previous hour.

The company reported its quarterly earnings against the backdrop of Musk's ongoing dispute with Twitter, which sued the billionaire for breaching his agreement to acquire the social media platform. The trial will begin in October.

The fair market value of Tesla's bitcoin holdings hit $2.48 billion in the first quarter of 2021 and was approximately $2 billion by the end of the year. The firm did not disclose the selling price or the magnitude of its impairment.

Musk stated that Tesla sold 75% of its bitcoin holdings to maximize its cash position because it was unsure when the lockout in Shanghai would be lifted.

On Wednesday's results call, Musk stated, "This should not be interpreted as a verdict on bitcoin... We have not yet sold any dogecoin."