Image source: Getty Images.

Tesla Motors (TSLA -3.14%) is trying to buy SolarCity (SCTY.DL), the No. 1 residential solar installer in the U.S., to create a vertically integrated energy company of the future. But it's not the only company in the past year to try to acquire a big residential solar company in an effort to integrate multiple renewable energy products. And the last deal didn't go very well -- to say the least -- with the acquiring company eventually falling into bankruptcy. What did we learn from that deal?

What happened last time

On July 20, 2015, SunEdison was "the world's largest renewable energy development company," and it decided to buy Vivint Solar (VSLR) -- the No. 2 residential solar installer in the U.S. -- for $2.2 billion in cash, stock, and convertible notes. The deal was supposed to create a vertically integrated renewable energy company with residential, commercial, and utility customers to whom it could offer solar, wind, energy storage, and other energy services.  

Quickly, investors balked at the deal, SunEdison's financing sources for projects shut down, its yieldcos collapsed, and SunEdison ended up in bankruptcy. This is what happened the last time one of the top two residential solar companies in the U.S. was supposed to be acquired. And now Tesla Motors wants to repeat that process.


SUNEQ data by YCharts.

It's not that Tesla Motors and SolarCity don't make sense as a combined company. It's that there are other moving parts keeping the companies afloat that may eventually collapse.

Financing is everything in residential solar

When SolarCity builds a solar system, it doesn't typically charge customers anything up front, instead choosing to sign a long-term contract to sell them energy. Then, it cuts up tax benefits and future customer payments and sells them to investors for immediate cash. When SolarCity says this is "cash flow positive for the solar business," it means the inflows from financing are higher than outflows for building solar systems.  

Here's the problem. The entire model is dependent on financing. And what we saw when SunEdison tried to buy Vivint Solar was that financing dried up for both companies. That's why the deal fell apart and SunEdison is bankrupt.

SolarCity is even bigger than Vivint Solar, so the risks are even bigger. It will require somewhere around $3 billion in financing to build 1.0 GW to 1.1 GW in solar systems this year. If funding dries up, the company will be in trouble quickly, and it could drag Tesla Motors down with it.

Building solar systems requires a lot of money

One of the challenges with SolarCity's business model is that it "owns the trucks." When you have a SolarCity solar system installed, it's SolarCity employees who comes to your home. Other companies use local contractors, so SolarCity's model is capital-intensive and higher risk.

To put a number on the exact risk, SolarCity's operating costs alone last quarter were $226.9 million, or an annualized rate of $907.7 million. These are ongoing costs and don't include the workers directly involved in installing solar systems, which would be part of the capitalized expenses. If SolarCity sees financing for its solar projects dry up, or demand waver, it has well over $1 billion in annual expenses.

These added expenses are one reason investors balked at SunEdison's buyout of Vivint Solar. They didn't see them as a good risk, and that could be the case for Tesla Motors as well.

If the market gives up on's over

If Tesla Motors ends up buying SolarCity, it will be even more reliant on financial markets for debt to fund SolarCity's installations, plus debt and/or equity to fund Tesla Motors' incredible expansion plans. And if markets lose faith in Elon Musk's vision, it could be a downward spiral for both companies.

That's what happened to SunEdison, and the company quickly went from a $10 billion market cap to being worth nothing. There were no profits to fall back on, only plans for growth at all costs.

Of course, Elon Musk hopes his acquisition efforts and growth plans go better than SunEdison's did last year. We'll see if they do.