FORTUNE -- Traders have sent shares of Green Mountain Coffee Roasters (GMCR) soaring by 15 percent since opening Monday. The bid-up amounts to a huge sigh of relief: late Friday, the company announced that it would restate nearly three years' worth of earnings downward. But the total amount of the restatement comes to just $5.8 million, and the company blamed accounting errors -- not malfeasance -- for its 11 quarters' worth of erroneous financial statements.
But that doesn't mean Green Mountain's troubles are over - far from it. Some observers, including short sellers, thought the company's shares were overpriced well before Monday's runup, and even before the announcement in September that the Securities and Exchange Commission had opened an investigation into Green Mountain's "revenue-recognition practices with one of its fulfillment vendors."
Just a few months ago, everything was looking great for Green Mountain. Revenues and profits were soaring, as was the stock price, and the company was enjoying a growing reputation as a responsible corporate citizen. But lurking beneath all the good news was the simple fact that Green Mountain was about to face a flurry of competition that could take big chunks out of its industry-leading 36 percent share of the growing single-cup coffee market.
With the restatement, that share is already a tiny bit smaller. But two weeks ago, Starbucks (SBUX, Fortune 500) announced that it would be entering the business with its own machines and coffee packets. More worrisome, however, Green Mountain's patent on its K-Cup coffee packets is set to expire in 2012.
More than 80 percent of Green Mountain's sales come from its popular Keurig machines and K-Cups. It's a classic razor/blades business: the machine is relatively inexpensive; the packets are relatively pricey. You need the machine to use the packets, just like you need Proctor & Gamble's (PG, Fortune 500) cheap Gillette Fusion razor to use the expensive Fusion blades, which you continue to buy for years.
But once Green Mountain's patent runs out, anyone will be able to make K-Cups packets.
That's not necessarily a big problem, but it will force Green Mountain to adjust its whole business model. With the patent, it enjoys wide margins on its K-Cups packets, while it sells the machines with almost no margin at all, or even, perhaps, at a loss. When the patent expires, margins from the packets will no doubt sink, perhaps precipitously so. But if lots of other companies start making the packets, that could allow Green Mountain to raise prices on the Keurig machines. At the same time, though, competition from competitors' machines -- such as Nestle's Nespresso and Kraft Foods' (KFT, Fortune 500) Tassimo, as well as whatever Starbucks comes up with -- will become more meaningful.
Green Mountain's market share will surely fall. But the market is growing fast, both at home and in the workplace. Green Mountain says that only about 7 percent of homes have single cup brewers, leaving lots of room for growth. AC Nielsen Data reports that the single-cup market has grown by about 105 percent over the past year.
Starbucks' entry into the market will muddy things up even more. The company hasn't released many details so far. (It is already in the single-sup market with its highly successful rollout of Via instant coffee. Starbucks sold $135 million worth of Via in the product's first year.)
Further, Starbucks and Kraft are embroiled in a dispute over how to end its distribution relationship. Starbucks wants out, in order to handle the distribution of its grocery products (such as Via and bagged coffee beans) on its own. Kraft says: Fine, but you must pay us many millions of dollars. Negotiations are ongoing.
What's unclear is the impact on Kraft's single-cup business. Starbucks supplies coffee packets for Kraft's Tassimo machine. (Neither company will comment on the dispute). Even before Starbucks' announcement that it would start selling its own machines, observers were wondering about Kraft's future in the market. Some analysts said that the end of Kraft's relationship with Starbucks might lead the food giant to get out of the coffee business altogether -- even divesting itself of its own Maxwell House brand. Kraft is spending about 10 times to market Tassimo in 2010 than it spent in 2009, according to Marketing Magazine.
And there was speculation that Starbucks could sign on with Green Mountain to supply K-Cups. That could conceivably still happen, even if Starbucks becomes a direct rival to Green Mountain with its own machine.