It’s rosy at best to presume that the next 20 years will be as kind to Amazon as the last 20. Local taxpayers shouldn’t bear the risk of the corporation’s financial future.

Amazon’s announcement of HQ2, a second headquarters, is about to set off an incentive arms race among state and local officials bidding for its economic promise. Elected leaders will leap at the chance to recruit Amazon, a widely admired technology company that has led development of some of the most powerful technologies of the 21st century, from cloud computing to smart speakers to drone delivery.  The company employs more than 350,000 people and has grown more than 40 percent in a year.

Amazon’s rapid job growth and strong market position suggest that the company’s promise of 50,000 jobs in HQ2 is as sure a bet as can be found in economic development. But technologies evolve unpredictably, and today’s market leader—even one as admired as Amazon— may take a tumble tomorrow. As state and local officials prepare to open public coffers to recruit HQ2, they should make sure taxpayers are protected if the company’s fortunes turn.

I learned this hard lesson myself when I was the director of business development in the Washington, D.C. mayor’s office five years ago.  At the time the hottest company in town was LivingSocial, a startup that offered daily deals to millions of email subscribers. LivingSocial was hiring several people every day in their Washington, D.C. offices, which the company seemed to outgrow every few months. The company was the flagbearer of DC’s tech sector with a value of $6 billion.

Recognizing its leverage, LivingSocial’s executives demanded that the city provide substantial financial incentives in exchange for the company remaining in Washington. After a lot of debate, my colleagues and I decided that, given the novelty of the daily deals market, we preferred an incentive package that the company would “earn” over time through continued hiring growth. The city ultimately gave LivingSocial a package along those lines, with a total value of up to $32 million.

As it turned out, the next few years were not kind to the daily deals space in general, and to LivingSocial in particular. The daily deals market lost retailers weary of bargain-hunting consumers who seldom became loyal customers. LivingSocial itself was hacked, with 50 million customers affected. Last year its competitor Groupon bought the company for a pittance.