Eight years ago, entrepreneurs Ed Fenster and Lynn Jurich founded residential solar installer Sunrun in San Francisco with backing by some of the most well known firms in Silicon Valley. Fast forward to Thursday, and the company revealed plans to raise $100 million (or probably more) by going public on Nasdaq.

Over the course of the past eight years, the solar industry, and the venture capitalists of Silicon Valley, have faced some dramatic changes. Sunrun’s IPO plans, and its accompanying financial documents, highlight both the evolution of an early solar startup, as well as the increasingly competitive, cash-hungry, and maturing solar market that the company must compete in.

Then

But let’s start at the beginning. In 2007 solar panels were relatively expensive, and the cost to install them on roof tops was still pretty high. The average price to install solar panels (blended across type of project) in 2007 was around $8 per watt, according to the Solar Energy Industry Association. With the solar industry in its infancy, only 160 megawatts of solar panels were installed that year across the U.S.

Fast track to today, and a whopping 8,100 megawatts of solar panels are expected to be installed in the U.S. by the end of the year (1,000 megawatts is the equivalent to a large gas, coal or nuclear power plant). Last year about a third of all the new electricity generation that came online in the U.S. was from solar, and the average price to install solar panels was a little over $2.50 per watt.

One of the reasons solar became so much cheaper was because of the simple business model innovation. Sunrun was one of the early players involved in this trend.

In the nascent days of solar, it was far too expensive for the average home owner to buy the solar panels upfront because it could cost tens of thousands of dollars. A much easier sell was for companies to install the solar panels for free or little cost, and then over the course of many years, charge a monthly fee based on the energy produced. Companies like SunEdison (created by Jigar Shah), SolarCity, Sungevity, Vivint Solar, Clean Power Finance and of course Sunrun led this revolutionary business model.

Over the course of the past eight years, Sunrun has used this strategy to attract 80,000 solar customers (at least half are in California). The company lays claim to having the “second largest fleet of residential solar solar energy systems” in the U.S.

Back in 2007, Silicon Valley and tech investing was also a very different place. This was the year that Kleiner Perkins investor John Doerr gave a teary-eyed TED talk about green technology. Fellow venture capitalists at rival firms made their own bets on cleantech startups.

Sunrun was one of those. Over the course of its lifetime Sunrun raised $265 million in funding from investors including Sequoia Capital, Foundation Capital, Accel Partners and Madrone Partners, a firm affiliated with the Walmart family.

Sequoia Capital, one of the top investment firms, had made a big name for itself years ago by getting in early on tech companies like Google, Apple, and Cisco. Unlike some of its peers, Sequoia put comparatively little money into the cleantech wave. That turned out to be a pretty good call. Many fellow venture capitalists ended up losing big after capital-intensive technologies like next-gen solar manufacturing, electric cars, and biofuels failed to pan out.

Sunrun investor Madrone Capital learned the hard way by backing Solyndra, the now defunct solar maker, early on and lost millions of dollars. Most venture capitalists stopped funding cleantech.

A SolarCity employee installs a solar panel on the roof of a home in Los Angeles in May 2014.Photograph by Patrick T. Fallon — Bloomberg/Getty Images

Photograph by Patrick T. Fallon — Bloomberg/Getty Images

But it turns out that backing “cleantech” in general was not an entirely bad deal for VCs. It was just the type of companies they invested in.

Sunrun and its solar service provider peers have turned out to be some of the better investments of that era. SolarCity, which was backed by entrepreneur Elon Musk, went public in 2012. SunEdison (founded in 2003) was sold to semiconductor company MEMC Electronic Materials in 2009 for $200 million. Meanwhile, Vivint Solar went public late last year.

In fact these solar financing and developer companies proved to have such untapped growth potential that over the years executives of GE and NRG Energy have lamented how they missed out on the earliest wave of this solar service market. Since then, NRG jumped in and now has a growing home solar business.

It turns out that for the last several years, investing in what energy geeks call the “downstream” part of the solar sector — the installation, financing, and marketing — has been highly lucrative, at least in terms of revenue. It was just investing in the “upstream” part of the market — the manufacturing and developing new solar cells and panels — that was difficult.

Now

But in 2015 the solar industry itself has evolved to become more mature and competitive. You can see that in Sunrun’s IPO filing. On one hand the industry’s top companies are getting much bigger. Sunrun’s revenues more than tripled to $198.6 million in 2014, up from $54.7 million in 2013.

But the solar service business has also become a cash-hungry business. Sunrun posted a loss of $162.6 million in 2014, up from a $68.6 million loss in 2013.

Companies are now forced to compete through marketing and sales. Big companies like NRG, which entered the market later on, can use its sizable brand, industry partnerships and distribution to its advantage.

Sunrun revealed in its filing that it has debt and lease payment obligations of $248.97 million. The company has accumulated deficit of $76.8 million as of the end of March. Sunrun is also borrowing heavily. As of early April, the company had drawn down $80 million from its credit lines, with another $107 million available to tap into.

Sun also just has about $105.5 million cash on hand. As Dan Primack explained it, this means with its current burn rate of $52 million in the first quarter, the company either needs to go public by the end of the third quarter or find some other source of financing.

A SolarCity employee carries a solar panel being installed on the roof of a home in the Eagle Rock neighborhood of Los Angeles, Calif. in May 2014.Patrick T. Fallon/Bloomberg—Getty Images

Photograph by Patrick T. Fallon — Bloomberg/Getty Images

In this highly competitive market, the solar installers have been acquiring companies that can market solar, or help sales people with finding valuable leads. The companies have also been trying to move more “upstream” in the market, or basically control some of the manufacturing or hardware.

SolarCity made a series of marketing and hardware focused acquisitions over the years and is now even building its own solar cell manufacturing plant in New York. Last year Sunrun acquired Mainstream Energy Corporation, and its business that supplies solar components, and this year bought startup Clean Energy Experts, a company that delivers leads to sales people trying to sell solar systems.

The core issue with the solar installation business in its mature years is that companies must be big and have a lot of customers to make decent money. Sunrun’s primary source of cash is from payments by its solar customers. As the company put it in one of its risk statements:

Our business may not continue to generate cash flow from operations in the future sufficient to service our debt and make necessary capital expenditures to operate our business. If we are unable to generate such cash flow, we may be required to adopt one or more alternatives, such as selling assets, restructuring debt or obtaining additional equity capital on terms that may be onerous or highly dilutive.

Yes, that’s a standard IPO risk notification, but it’s also math.

The other issue facing solar installers this year is subsidies. As the solar sector has matured, the incentives from state and federal governments to support the industry have started to end.

Solar project developers in the U.S. have been able to take advantage of the solar investment tax credit (ITC) that provides a 30% tax credit per installation. But that incentive is supposed to fall to 10% by the end of 2016. This will be one of the biggest financial changes for the solar industry in the U.S. in recent years.

How Sunrun faces these economic and industry headwinds remains to be seen. The solar market itself is exploding, it’s just no longer a secret. Maybe the industry will end up being big enough for all of the players to survive. Or maybe not.

For Sunrun’s investors and founders — many of which backed the company years ago — the IPO will provide a long- awaited opportunity to cash out. Foundation Capital owns almost 20% of Sunrun, Accel Partners owns 13.2%, Canyon Partners owns 9.1%, Sequoia owns 9%, and Madrone Partners owns 7.5%. Founders Jurich and Fenster own 3.8% and 3.4% respectively.

If Sunrun does go through with its IPO plans, it’ll be another lesson in how Silicon Valley can invest successfully in clean energy.