The District is protected from the job cuts at LivingSocial that began quietly last night and are expected to continue today, a spokesman for Mayor Vince Gray told DCist. Although D.C. and the daily deals company became much more attached in July when Gray signed a tax incentive deal worth as much as $32.5 million, the spokesman, Pedro Ribeiro, says that the deal was structured in a way that inoculates District taxpayers from bearing the full cost if LivingSocial does not live up to its end of the bargain.

Washington Business Journal reported yesterday that LivingSocial, which lost $566 million in the third quarter, would begin laying off as many as 400 people from its U.S. offices, a figure that includes workers in its D.C. offices. The company employs about 1,000 people spread across six downtown locations.

But job cuts threaten a key provision in the tax deal with the District. When it goes into effect in fiscal 2016, LivingSocial must have at least 1,000 employees in D.C., and add at least another 50 every year. Furthermore, half of all new hires are required to be District residents.

Perhaps most importantly, though, is that LivingSocial must be profitable to enjoy a corporate income tax exemption. The daily deals industry has been hard up to turn profits; although LivingSocial reported a modest profit of $63 million in the first half of 2012, it was followed by that massive third-quarter loss, most of was attributed to writedowns on smaller businesses it acquired. Its chief competitor, Groupon, also reported a small profit earlier this year, but returned to red ink in the most recent quarterly reports; the Chicago-based company is also rumored to be weighing the future of chief executive Andrew Mason.

LivingSocial’s layoffs began last night with the dismissal of 25 employees, Washington City Paper reported. Of those, three came from D.C. offices. While the original report of the layoffs said that many areas of LivingSocial’s payroll would be affected, City Paper reports the first batch is heavily weighted toward the editorial department. Nearly all of LivingSocial’s writers are located in Washington; another 10 or so work out of an office in San Francisco.