FORTUNE — Investor demand is high for GrubHub Seamless GRUB , which makes its market debut this morning. Last night the online take-out ordering company priced its IPO at $26 per share, a jump from its initial expected price range of $20 to $22 per share. The price values GrubHub at $1.9 billion.

There’s precedent for this interest: The 2009 IPO of OpenTable, another restaurant software company, was one of the few bright spots in a slow market recession. (The company’s stock took a dive in 2012, however.) Lately, food-related tech has been hot with venture investors; they invested $2.8 billion into the category last year.

Sentiment around GrubHub Seamless is generally positive. The company had $130 million in revenue last year, a 35% increase over the year prior. The company has strong market penetration, with 3.4 million active users and more than 28,000 restaurants.

However, among the 19 pages of risk factors in GrubHub’s S-1 filing, one risk sticks out because of how famously expensive, distracting, and ugly it is for any tech startup to experience: GrubHub is in the middle of a patent lawsuit.

MORE: NYSE expecting IPO window to continue throughout 2014

Alongside OpenTable  OPEN , Papa John’s PZZA , Domino’s DPZ , Starbucks SBUX , Ticketmaster, and Fandango, GrubHub has been sued by Ameranth, a five-person software company based in San Diego, which Microsoft MSFT apparently invested in 14 years ago.

The lawsuit claims GrubHub and the others have violated patents Ameranth owns related to online order-synching technology and online menus. GrubHub outlines this as a risk factor in its S-1 filing, concluding that Ameranth’s assertions lack merit. “We intend to defend ourselves vigorously before the Court and before the PTO,” the filing states. GrubHub declined to comment on the lawsuit.

Ameranth is considered a patent troll among food-tech companies, but unlike the classic definition of a patent troll, the company does actually produce and sell software. “We’re a real innovator,” says Ameranth President Keith McNally. “We’re recognized as the pioneers of the market.”

At one point, Ameranth counted Darden Restaurants DRI  among its software clients, but the company is no longer a client, McNally says. He admitted that Ameranth makes the majority of its income not from software sales, but from patent-related payments. Ameranth licenses its patents to 29 restaurant companies, many of which were first sued by Ameranth, such as NetWaiter and MonkeyMedia. Others, like Taco Bell and Cognizant CTSH , may have signed on to pay the licensing fee preemptively.

MORE: Kitchensurfing raises $15 million for private chef marketplace

“Every dollar that GrubHub has earned and is earning is done by violating our patents,” McNally says. He formed the company in 1996, long before the idea of ordering food over the Internet was conceivable.

Like most software patents, the ones in question here use broad, vague terms and include things that have become standard in software. Here’s the abstract of one of the patents Ameranth is using to sue GrubHub, US 6982733, which was filed in 1999:

An information management and synchronous communications system and method facilitates database equilibrium and synchronization with wired, wireless and Web-based systems, user-friendly and efficient generation of computerized menus and reservations with handwritten/voice modifications for restaurants and other applications that utilize equipment with nonstandard graphical formats, display sizes and/or applications for use in remote data entry, information management and communication with host computer, digital input device or, remote pager via standard hardwired connection, the internet, a wireless link, printer or the like.

Regardless, the patents are valuable weapons. This week GrubHub and peers were dealt a blow in their defense against the lawsuit. The defendants had attempted to invalidate Ameranth’s patents. But on April 1, Ameranth announced the patents were confirmed as valid by the U.S. Patent & Trademark Office. In other words, the defendants lost.

This doesn’t mean the fight is over. GrubHub and its peers can argue in court that they have not violated Ameranth’s patents. Given the cost and time associated with such a legal battle, many companies choose to avoid the hassle and simply pay the patent litigator’s fee. McNally would not disclose how much Ameranth charges its patent licensees. He emphasized that this development boded positively for a victory in court. “They still have defenses but they’re very meager right now,” he says. “They fired their silver bullet and missed.”

It’s unclear whether GrubHub will fight the lawsuit or choose to pay up. Ameranth has lost before. In 2010, a point-of-sale software company called Digital Dining won a lawsuit against Ameranth, invalidating the patents in question. Whichever action GrubHub chooses, the news creates a stain on an otherwise positive day.