As Donald Trump continues to escalate his slap-happy approach to tariffs on Chinese goods, China is running out of US goods on which to to levy duties in retaliation. But if China wants to keep going tit-for-tat, it has other options.

Unlike the US government, the People’s Bank of China—China’s government-run central bank—directly manages the value of its currency. The Chinese government let the yuan weaken around 4% against the US dollar in the last month, among the sharpest one-month drops in value in its history. The yuan’s slide has sparked fears that China could “turn a trade war into a currency war,” as Brad Setser, economist at the Council on Foreign Relations, phrased it.

If antagonizing Trump is the goal, depreciation has double-whammy appeal. Since it makes China’s exports cheaper—and therefore more competitive against US manufacturers—allowing the yuan to weaken will soften the blow of Trump’s tariffs on the Chinese economy, all other things being equal, and possibly eliminate the impact altogether. Conversely, it will also make the American products China buys more expensive, reinforcing the effects of China’s tariffs on US-made goods.

But this strategy is not as easy to implement as it might seem.

“The hard part is weakening the currency by a bit without leading the market to expect a big depreciation,” writes CFR’s Setser. “It is, in my judgment, doable given the state of China’s balance of payments—but that doesn’t mean it wouldn’t be risky.”

The yuan isn’t freely traded in a global market the way many currencies are. As with any managed currency, one big problem the yuan’s custodians face is the possibility of inciting herd behavior that could dangerously destabilize China’s financial system.

Since Chinese exporters earn dollars (and other foreign exchange) when they sell their goods, their choice of what to do with that foreign cash depends in large part on what’s happening with the yuan. When a gradual drop in the yuan signals that it’s overvalued—that is, that market is demanding fewer yuan per dollarthan the current exchange rate reflects—the sensible thing for Chinese exporters to do is to keep their cash in dollars. As this momentum builds, it triggers capital outflows that can endanger the economy as a whole.

Capital flight is particularly devastating for countries that have borrowed heavily in foreign currencies and that lack the foreign-exchange reserves to defend their currencies’ value against speculators—as the 1997 Asian financial crisis demonstrated. China doesn’t have these worries; its foreign debt is under control, and it boasts a little more than $3.1 trillion in official reserves (with probably a good deal more squirreled away elsewhere in China’s state-dominated financial system).

But particularly when growth is looking shaky—as it is these days in China—capital outflow can still be perilously disruptive. And thanks to the larger scale of foreign investment flows into Chinese stocks and bonds, it’s more vulnerable than it was the last time capital flight was a worry, back in 2015.

One way to foil the herd dynamic is with a big, one-off revaluation that brings the currency in line with the market value. But even that’s not foolproof. Especially at a time of growing economic uncertainty, a sharp devaluation still risks signaling a loss in confidence in the economy, setting off a chain reaction of panic not just in China but, potentially, across global markets too.

It’s worth noting that the Chinese government doesn’t seem eager to let the yuan fall markedly. It has consistently favored preserving stability—buying and selling dollars to offset market moves, preventing the yuan from making big swings in either direction. A big, intentional devaluation would shatter the stable currency regime that the PBoC has worked hard to construct, noted Chen Long, economist at the research firm Gavekal, in a recent conference call. However, the PBoC only has so much control over the yuan’s value. If the market expects China to suffer more from the trade war than the US, depreciation pressures could build, said Chen.

In that event, the US could face a bigger threat than simply cheaper Chinese goods. A sharp drop in the yuan against the dollar could set off a chain reaction among other countries that export to the US. For instance, a Chinese depreciation would put pressure on other export-driven Asian countries to let their currencies weaken too, lest they lose market share to Chinese companies. Fortunately for the US, many of these countries have plenty of reserves with which to battle back those market forces. The question, though, is whether the US could persuade them to spend those.

“The impact on any such Chinese depreciation on the United States would be limited if the U.S. could convince its allies in Asia to take action to avoid following China’s currency down,” notes Setser. “But they aren’t likely to do that if they think the US brought on the Chinese devaluation through reckless trade action.”