It’s been almost a year since Trump has taken office. At the center of his campaign was protectionism and rewriting the international rules. Nafta was described as the worst deal ever. But so were other trade agreements. Americans can give a sigh of relief that he has failed; his rhetoric proved—so far—largely empty. But he has already done enormous damage to the rules based system, and he is well on the way to creating an even larger trade deficit. The threat to our system remains, and it is important to understand why so far he’s been so ineffective, how much damage he could do and what we might do to contain the damage.

Trump exploited understandable grievances among a large swath of American society, whose standard of living has stagnated for almost half a century. Defenders of globalization say that Trump has unfairly blamed globalization, when the real culprit is technology. Of course, Trump like so many demagogues prefers to blame others.

Though even without globalization, technological advances would have meant workers without a college education would be hard pressed, the reality is that globalization has played a central role: even without changes in technology, especially unskilled workers would have seen wages depressed. Globalization was oversold: the increase in output was less than hoped, and there were costs—especially the lowering of wages as the bargaining power of workers weakened.

The problem though is not so much with globalization itself, but with the way it’s been managed. It’s been managed to benefit those at the top.

This has had profound effects on our politics: the leaders, in both parties, who promised that globalization would bring untold benefits—against the well-deserved skepticism of many—have been discredited; trust has been undermined—opening the way to an anti-establishment demagogue.

That Trump is profoundly ignorant of economics is obvious; that he would have a hard time finding well trained economists willing to work for a bigot and misogynist is no surprise. A basic lesson of economics 101 is that the overall trade deficit is determined by macroeconomics—by the gap between the country’s investment and savings. Several corollaries immediately follow: it makes no sense to pay attention to bilateral trade deficits. Trade deals may affect what we sell or buy from whom; but they don’t affect the overall trade deficit. Workers don’t care whether their jobs are replaced by imports for Vietnam or China; they only care that they have lost their jobs. Bilateral trade deals may provide help to some special interests in one sector or another. But they don’t affect the bottom line—the overall trade deficit. And the detailed provisions make matters worse. An especially peculiar aspect of Trumpian economics is that trade in services is viewed differently from trade in goods. But foreign exchange earned by providing education to a foreign student is just the same as foreign exchange earned by exporting steel.

This helps explain why the new tax bill is likely to worsen the trade deficit. At the macro-level, increased fiscal deficits normally lead to increase trade deficits—and in the case of this tax bill especially so. Exports of education services is a major earner for foreign exchange, and the tax bill’s assault on higher educational institutions will make them less competitive. While corporations have been open about the fact that the tax cut is unlikely to lead to much more investment, America’s competitiveness also depends on the quality of our labor force, and that depends importantly on education as well. Even a cursory look at the tax bill makes it clear that it is likely to result in cutbacks in expenditures at state and local levels.

One of the reasons that Trump has failed to consummate a new Nafta agreement is that he doesn’t grasp the extent to which the US has benefited from Nafta. He talks about the losers, but not the winners. Leaving Nafta would create a new set of losers—those whose livelihoods depend on trade with Mexico; but is unlikely to create a new set of winners—the jobs that are gone are not likely to come back. Indeed, without access to inexpensive auto parts from Mexico, our auto industry becomes less competitive, and jobs may actually be lost.

But another reason is that what he wants is just inconsonant with what a trade agreement is about: for instance, he wants agreements to come up for renewal every five years. But cross border investments won’t occur with a five year horizon. He somehow he wants the trade agreement to ensure that there be no bilateral trade deficits, but no one has explained how that could be achieved within any semblance of a free trade framework. And besides, as every economist repeats, bilateral trade balance makes no more sense than primitive barter.

The Mexican peso serves a good barometer of market expectations of whether the US will walk away from Nafta: it has improved significantly since Trump took office, though declined somewhat in the last few months. America would be shooting itself in the foot if it walked away from Nafta, and the American business community has made that clear. But Trump and Republican politics are not totally predictable: who would have thought that in an era with ever growing inequality Congress would pass the most regressive tax bill ever? If the US left Nafta, tariffs would shift to WTO levels, entailing truly small changes, which would be more than offset by exchange rate adjustments. And the changes would be adverse to the US, especially for agricultural exports. Of course, the US could walk away from the WTO, but that would require an act of Congress. Could Republicans who have so long sought trade agreements do a 180 degree about-face? Unlikely, but in this new world, we’ve learned anything is possible. But the rules based international system will survive, with or without the US. The US would be the loser if it withdrew, both economically and in terms of influence. There are others—including China—more than willing to step into our place.

Nonetheless, Trump has already done enormous damage with the hand grenade that he has thrown into the international economic system. For three quarters of a century, the US led the way in creating an international economic system in which borders were becoming increasingly unimportant. Now, Trump has reminded everyone that borders do matter. The world won’t be the same: the efficient supply chains that were created ignoring borders will have to be reconstructed for this new world.

Congress and the active engagement of the business community and civil society will be required if Trump’s damage is to be contained. The response to Trump’s proposal for repealing Obamacare showed that a concerted response can put a stop to some of his most malicious actions. The stakes are large—not just now, but for the long run.