Last week, LivingSocial announced it would be getting a whole lot less social. The daily deals and events company will no longer host live events, and it’ll shut down its once-heralded F Street NW site that’s served as a venue for everything from a password-protected speakeasy to a “7 Deadly Sins” Halloween party that drew accusations of anti-Semitism. The company posted a $183 million net loss in 2013, which is actually an improvement from a $653 million loss in 2012.

When the city approved generous tax breaks in 2012 to keep LivingSocial in town, the company had almost 1,000 employees in D.C., and CEO Tim O’Shaughnessy predicted that the number would soon nearly double. But a year later, there were just 602 LivingSocial workers in the District after a round of layoffs. Now the figure is about 580, according to company spokeswoman Sara Parker, who says it’s “too early to predict the accurate impact” of the closure of the F Street building, one of three LivingSocial outposts in D.C., on the company’s headcount in the city. Last month, O’Shaughnessy announced he would step down once the company finds a replacement for him.

Douglas Development announced plans in early 2012 to build a big mixed-use development at the corner of New York Avenue and 7th Street NW with 380,000 feet of trophy office space. The company didn’t have a tenant lined up, but the logos in the renderings looked an awful lot like LivingSocial’s, and just about everyone assumed the company would be expanding into the space in a big way. Eight months and many layoffs later, Douglas said LivingSocial was “off the table.”

It would be tempting to look at the company’s disappointments and say that the city’s tax breaks were an obvious failure. In fact, LivingSocial’s mounting struggles prove the opposite: City officials crafted the tax incentives very shrewdly.

Here’s how the incentives package came about: LivingSocial was one of the city’s largest private employers, and it was planning to expand. Not only did it bring the city residents and tax revenue, but it also served as the anchor of a growing tech sector that Mayor Vince Gray made into a centerpiece of his economic development strategy. But as the company scaled up, D.C.’s high costs and business taxes caused it to look to other potential locations. It hired the real estate firm Jones Lang LaSalle to explore its options, and the search yielded at least one generous tax-break offer, from Nashville.

So D.C. officials felt the need to provide incentives to the company to stay in town. The chance that LivingSocial would walk appeared real and threatening.

“We took it very seriously,” says David Zipper, who served as D.C.’s head of business development at the time and now works for tech hub 1776. “And the outside sources we had took it very seriously, too. We talked to a lot of folks who were connected with the company in various ways.”

He adds of LivingSocial’s stated intentions during the negotiations, “The tone was clear that the city needed to make an effort if we wanted to avoid LivingSocial leaving.”

That effort took the form of a package passed by the D.C. Council in July 2012 and signed by Gray that would give the company up to $32.5 million to stay in the District. Critics slammed the deal. Ken Archer, a software company executive and leading opponent of the tax package, called it a “subsidy with few strings attached.” The D.C. Fiscal Policy Institute created a daily deals-style graphic mocking the bill as “The No Guarantees Deal: Big money to LivingSocial asking for little in return,” accompanied by a blue “buy now!” button with a $32.5 million price tag.

But a year and a half later, the grand total that D.C. has given to LivingSocial through tax breaks in this deal is…not a cent. And that’s what it’s likely to remain.

Under the terms of the package, no tax breaks kick in until October 2015. But even then, the company doesn’t get anything unless it has at least 1,000 employees in D.C. and opens a new headquarters of at least 200,000 square feet. Both of those targets now appear to be longshots. (If the company somehow does meet them, it still won’t receive the full $32.5 million unless it hits even more ambitious targets, since the incentives work on a sliding scale based on the number of people hired and whether they live in the District.)

Compare that to the $6.1 million property tax abatement the city gave the CoStar Group to buy a new office building in 2010—a building CoStar turned around and sold a year later for a $60 million profit. The city learned a lesson after getting burned in that deal by not providing adequate safeguards.

Or take the Corporate Executive Board’s 2004 announcement that it would move to Arlington after receiving tax incentives from Virginia. D.C. lost the business consulting firm, Zipper says, “because we were asleep at the wheel.”

Ed Lazere, executive director of the D.C. Fiscal Policy Institute, says he was generally supportive of the idea of tax breaks to keep LivingSocial in town but thought they should have had more stringent requirements to ensure local hiring, given that the ultimate deal allowed the company to stay at about the same level of D.C. employment. “We thought that was a reasonable quid pro quo,” he says. “We’ll give you a tax break to stay in D.C., but you have to hire more in D.C.”

Archer makes a similar critique. “I think tax breaks should be tied to the growth of companies, and specifically the growth of company activities that are strategically important to the District,” he says. “We shouldn’t pay companies for their existence.”

But Zipper says LivingSocial wouldn’t have agreed to more restrictive terms. “If we’d required that 100 percent of jobs be in the city, LivingSocial would have walked,” he says.

Zipper says the city negotiated the best deal possible under the circumstances, including the provision that stalled any tax breaks until 2015—a clause that may have saved the city lots of money. “They wanted the money now,” he says. “They pushed us to give money in fiscal 2013. We pushed back hard against that. They hired very aggressive national consultants from Jones Lang LaSalle who were trying to find any way possible to extract cash from the city immediately.”

Maybe the city could have gotten more concessions from LivingSocial; maybe it couldn’t have. The point is moot now that the company is struggling. The city hasn’t lost anything through the tax incentives. But it may have gained something big.

LivingSocial was being actively courted by other cities. The company’s threats to leave the District in the absence of tax incentives may have been exaggerated, but there’s little reason to believe they were merely bluffs. (O’Shaughnessy declined to be interviewed for this story, but LivingSocial General Counsel Jim Bramson says in a statement that the tax deal “was a factor” in the company’s decision to stay, but not the only factor.)

“I don’t think that we would have put together a package if we didn’t think there was a serious threat of losing a major employer,” says Jen Boss, who leads the city’s tech development efforts.

And retaining LivingSocial, even if just a shell of its former self, brought considerable benefits to the city, at no cost.

Peter Corbett, who helped make a name for D.C. tech with his marketing firm iStrategyLabs, says having LivingSocial in town has given a big boost to D.C. tech’s reputation. “LivingSocial’s biggest effect on Washington, D.C., over the past few years is probably its global change in perception,” he says. “When I traveled to Moscow or Berlin or Bangalore, people said, ‘Oh you’re from D.C.? LivingSocial’s there, right?’”

Moreover, Corbett says, LivingSocial attracted talented tech developers and engineers to the District, and now that the company has been shrinking, those skilled workers are joining other local tech ventures. “It’s almost better that they did implode and spill people out,” he says. Both Corbett and Zipper say they now have colleagues who are LivingSocial alumni.

Corbett says many D.C. tech companies started up around the time the tax breaks were hammered out in 2012, and they may have been inspired by LivingSocial’s success and presence. “It makes other people in the market go, ‘Wow, I can do this, I’m going to take a shot at it.’ And that’s an intangible thing I think is very important.”

Tech is a small but growing part of the D.C. economy, building up primarily around government-related industries. D.C. technology companies employed 24,793 people last year, according to the Bureau of Labor Statistics, up from 23,862 in 2012.

Corbett says some D.C. entrepreneurs balked at the tax breaks, hewing to the entrepreneurial distaste for government handouts. “We had to say, ‘These aren’t handouts,’” he says. “It is a zero-sum game. Either LivingSocial is going to get support from its government or it’s going to get support from someone else.”

Photo by Darrow Montgomery