What happened

Shares of Carvana (CVNA -2.10%) sank as much as 23.7% this week, according to data from S&P Global Market Intelligence. The online used car retailer, famous for its car vending machines, didn't have any company-specific news this week. However, its top competitor, CarMax (KMX -1.82%), reported poor earnings, signaling to investors that the used car market is weakening. As of 12:00 p.m. EST on Friday, Carvana shares are down 18.2% this week.

So what

Carvana operates in the used car market, enabling people to buy and sell used vehicles directly from their phones and have them delivered to their houses. CarMax -- one of Carvana's most prominent competitors -- does so as well but with an omnichannel dealership model. Either way, the companies are competing for the same customers (people interested in buying used cars).

With this in mind, it is no surprise that Carvana's stock tanked when CarMax reported surprisingly bad second-quarter earnings. CarMax's earnings per share (EPS) dropped to $0.79 in the quarter, down 54% year over year. With used car prices still through the roof and interest rates rising, too, making it difficult for consumers to finance purchases, demand has fallen off a cliff. Even though CarMax gained market share in Q2, units sold decreased 6.4% year over year, and vehicles bought from consumers and dealers were down 8.1% from the prior year. Weakening demand indicates that used car prices could fall soon, which would further hurt CarMax's earnings and margins.

Suffice it to say, investors expect the same thing to happen to Carvana when it reports earnings later this year. This is probably the main reason the stock is down so much this week.

Now what

On top of weakening demand, Carvana is in a precarious financial situation. Through just the first half of this year, the company has burned $850 million in free cash flow. With only $1 billion in cash on the balance sheet, Carvana needs to turn around its financial situation -- and fast -- or else it is going to need to raise more funds from investors. CarMax's results indicate things might worsen in the near term, threatening Carvana's financial health even more.

The company could raise some debt, but the problem is that it already has a huge debt load on its balance sheet. As of last quarter, it had $1.1 billion in short-term revolving credit, $212 million in short-term debt, and $6.6 billion in long-term debt. Plus with rising interest rates and no track record of profitability, any new financing Carvana takes on will likely come with high interest rates.

This financial precariousness means investors should avoid the stock right now, even with shares down 90% year to date.