Back in 2016, Tesla acquired solar panel manufacturer SolarCity, billing the $2.6 billion deal as an opportunity to create "the world's only vertically integrated sustainable energy company." From a SolarCity solar panel to a Tesla battery, the company promised, the in-house supply chain would scale up clean energy for all and provide cost synergies to the businesses and shareholders.

But SolarCity, of which Tesla CEO Elon Musk was chairman, was deeply in debt at the time. Now, newly unsealed documents in an investor lawsuit say the situation was far worse than that. They allege that SolarCity wasn't just carrying a heavy debt load: it was completely insolvent.

The upshot of reams of law surrounding mergers and acquisitions is that C-suite executives and company boards of directors are supposed to make sure shareholders get the most money possible out of their investment. If they're going to sell the company, they have to make sure they're accepting the most valuable reasonable offer. Companies doing the acquiring, meanwhile, are supposed to do their homework to make sure they're not wasting their resources on a bad deal—and Tesla shareholders say the SolarCity acquisition was exactly that.

"Almost immediately after the acquisition closed, SolarCity's auditors [Ernst & Young] confirmed that SolarCity was, in fact, insolvent," attorneys for the investors argue in their latest filing (PDF). E&Y's year-end audit, conducted in January 2017, determined that SolarCity did not have sufficient cash to meet its obligations and could not operate on its own as a going concern.

SolarCity only continued to function because of SpaceX money, the suit alleges:

As SpaceX's chairman, CEO, CTO, and majority stockholder, Musk caused SpaceX to purchase $90 million in SolarCity bonds in March 2015, $75 million in June 2015, and another $90 million in March 2016. These bond purchases violated SpaceX's own internal policy, and SolarCity was the only public company in which SpaceX made any investments.

Hands in three pockets

SolarCity was founded in 2006 by brothers Lyndon and Peter Rive. The Rive brothers are cousins of Elon Musk, who became chairman of their company. Both Rives left the company less than a year after the Tesla acquisition closed.

At the time of the acquisition, Musk was Tesla's largest shareholder, owning about 22% of its stock, as well as the company's chairman and CEO. He was also SolarCity's largest shareholder at the time, holding approximately 22% of that company's shares. Musk's personal SolarCity investments were converted to about $500 million in Tesla stock as a result of the transaction.

Tesla shareholders filed suit in the Delaware Court of Chancery, where most complex corporate merger-related litigation happens, in 2017. The investor suit (PDF) argues that Musk basically used his influence as director and controlling stockholder to push the Tesla board to pursue the transaction using faulty data and without doing sufficient due diligence, in violation of his fiduciary duty to shareholders and the firm.

Musk moved to have the suit dismissed, but the judge in the case refused to do so. The case was then granted class-action status, and Musk was deposed in the matter earlier this month.

A Tesla spokesperson said the allegations in the lawsuit are "claims of plaintiff’s lawyers looking for a payday," adding, "The accusations made in the plaintiff’s brief are false and misleading, as Tesla and SolarCity published all material information in its proxy and other public filings for all shareholders to consider before deciding on the transaction."