BY H.C. | WASHINGTON

MAKING Mexico pay for a border wall was Donald Trump’s flagship campaign promise. Already, it has caused a diplomatic crisis. On January 26th Enrique Peña Nieto, Mexico’s president, pulled out of a scheduled summit with Mr Trump, who had earlier suggested that if Mexico was not going to pay for the wall, then there was no point in having the meeting. Then, for a brief moment, it looked as if the White House was declaring a trade war, when reports surfaced on Twitter that Sean Spicer, the White House press secretary, had said that a 20% tariff on Mexican imports would raise the necessary funds.

Those reports, it turned out, were not quite right. Mr Spicer in fact suggested that a deal was nearing on corporate tax reform. He implied that it would include the so-called “border-adjustment” Republicans in the House of Representatives have long sought. That change could pay for the wall, he said. (He later told a reporter he was only discussing “possible” policy moves).

Border-adjustment would change the way firms calculate their profits for tax purposes. Revenue made from exports would no longer count. Neither would costs incurred by importing goods. In short, exports would be subsidised, and imports taxed.

Crucially, most economists do not view border-adjustment as a barrier to trade. In isolation, either an export subsidy or an import tax is plainly protectionist. But, at least in theory, an export subsidy and import tax of equal size should cancel each other out. Instead of impeding trade, they should push up the dollar to the point where exports and imports cost the same as they did before the tax. (Your blogger’s piece from December provides a fuller explanation). Most rich countries already implement border-adjustment as part of their VATs, a kind of sales tax. Mexico’s VAT irks Mr Trump, but it is not really a trade barrier.

Border-adjustment would raise a lot of money. Because America runs a large trade deficit, taxes on imports would fill the Treasury’s coffers much more than rebates to exporters would drain them. Mr Spicer noted that border-adjustment would raise about $10bn a year from the trade deficit with Mexico alone, assuming a tax rate of 20% (which is favoured by House Republicans). That would allow Mr Trump to claim that Mexico was paying for his border wall.

Border-adjustment could therefore keep lots of people happy. Mr Trump could claim he was taxing imports to pay for the wall, House Republicans would get their desired corporate tax reform and free-traders could be content that the measure was not true protectionism. The change would also remove the incentive for companies to shift profits across borders for tax purposes. Everyone could cheer that. It is remarkable that it took so long for Mr Trump’s team to realise the potential of this compromise. In fact, Mr Trump criticised the proposal earlier in January, telling the Wall Street Journal that “usually it means we’re going to get adjusted into a bad deal”.

The reform would come at a cost. The dollar appreciation needed to offset the tax would be massive. Assuming a tax rate of 20%, the dollar would need to rise by fully 25% for the tax to have no effect on trade. This would have two bad consequences. First, it would inflate the value of dollar-denominated debts in emerging markets, imperiling their economies (see leader). Second, it would transfer wealth to those with dollar assets. Ironically, this would greatly benefit China, which would see the value of its $3trn Treasury portfolio go up by a quarter.

Some doubt whether the greenback would in fact surge. Currency markets are distant from trade flows. Big importers in the retail industry are lobbying against the reform; exporters are support it. That suggests firms expect the tax to impede trade after all. Border-adjustment is a politically convenient way for Mr Trump to pay for the wall. But it will either distort trade, or push up the dollar, or some combination of both. Pick your poison.