Tesla (TSLA  ) shares finished nearly 10% higher following the company's Q2 earnings which showed it beating on the bottom line but missing on the top line. Another notable item from the report was compression in automotive margins due to inflation, supply chain issues, and more competition for EV components. This is expected to continue becoming a major headwind for Tesla as all legacy automakers are betting big on EVs which will lead to rising costs for inputs.

In a surprise move, it also announced that it was selling 75% of its bitcoin holdings to focus on its core business. This is one factor in the stock's bullish reaction. Another is that the report shows that Tesla continues to have strong demand, and its primary objective is to continue scaling up production in order to meet this demand which it's doing better than other automakers given the challenging environment.

Inside the Numbers

In Q2, Tesla reported $2.27 in earnings per share, topping expectations of $1.81 per share. Revenue missed expectations at $16.9 billion, vs. $17.1 billion.

Automotive gross margins declined to 27.9% from 32.9% last quarter and 28.4% last year due to inflation and higher input costs. Automotive revenues contributed $14.6 billion, $1.5 billion came from services and $866 million from Tesla's energy unit.

Production is increasing as its Berlin and Austin facility are expected to produce more than 1,000 cars per week by the end of the year. It also continues to grow its network of Superchargers as it now has 36,165 Supercharger connections in addition to 709 store and service locations.

However, the most headlines were certainly due to its sale of 75% of its bitcoin holding which added $936 million in cash to its balance sheet. The company said it was less due to its opinion of bitcoin and more due to the need to maximize cash given the lockdowns in China. This resulted in multiple suspends of production at its China facility.

It didn't give firm guidance instead choosing a fuzzier forecast of 50% average annual growth in vehicle deliveries over a multi-year time horizon. It's expected to unveil new or updated models of the Roadster, the Cybertruck, and an electric Semi truck.