The International Monetary Fund’s $30bn rescue package for Brazil was larger than expected, and should have brought relief to the markets. But it did not. After an initial rally, bond interest rates have settled at levels incompatible with long-term solvency.

The country’s benchmark C bonds yield about 22 percent in dollar terms. Brazil’s debt equals 60 per cent of gross domestic product, of which 35 per cent falls due within one year.

A primary surplus of 3.75 per cent, required by the IMF program, is not sufficient to prevent a significant further deterioration in the ratio of debt to GDP, especially as high interest rates are pushing Brazil into recession.

The IMF would have liked to insist on a higher primary surplus but that would have been politically unacceptable. The difference was eventually papered over by a communique that put the burden of proof on Brazil.

The size of the package was meant to compensate for the gaffe by Paul O’Neill, US Treasury secretary, about Swiss bank accounts; and to provide a vote of confidence in a star pupil.

Its failure to bring the required relief indicates that there is something fundamentally wrong with the international financial system as currently constituted. Brazil’s problems cannot be blamed on anything Brazil has done; the responsibility falls squarely on the international financial authorities.

Admittedly, Brazil is going to elect a president who the financial markets do not like; but if international financial markets take precedence over the democratic process, there is something wrong with the system. Under the influence of market fundamentalism, the IMF does not provide enough benefit for its members.

In recent years, the so-called Washington consensus has put its faith in the self-correcting nature of financial markets. That faith has been misplaced. Ever since capital was allowed to move around freely, one crisis has followed another and the IMF has been called on to put together ever-larger rescue packages.

Market fundamentalists blame the moral hazard created by the IMF bailouts. In the aftermath of the Asian crisis, the IMF switched from bailouts to bail-ins. The true risks of investing in emerging markets were revealed, and there has been a reverse flow of capital from the periphery to the centre ever since.

The fact is that financial markets require a lender of last resort to preserve stability, and there can be no lender of last resort without a modicum of moral hazard. Every developed country has learned this lesson domestically but we have yet to learn it internationally. The current system is lopsided. It is designed to preserve the international financial markets, not the stability of periphery countries. That is what has rendered the risk/reward ratio of investing in emerging markets unfavorable.

The Washington consensus starts by asking how big a budget surplus is needed to keep indebtedness within bounds—the higher the interest rates, the bigger the required surplus. In the case of Brazil, with 20 per cent interest and 4 per cent growth, the primary surplus would have to be 4.8 per cent to keep the debt/GDP ratio from rising—an obvious impossibility.

The right question to ask is what interest rates could be reconciled with reasonable growth. A primary surplus of 3.75 per cent would be the maximum required, rather than the minimum, and could support real interest rates of no more than 10 per cent.

The challenge would be how to bring interest rates down to that level. That might require some international credit enhancements or guarantees, and the task would be to find the right instruments to keep the real risks—as distinct from moral hazard—within tolerable bounds.

Before the bailout, I suggested that instead of a traditional IMF package, the central banks of developed countries should open their discount windows for Brazilian government debt. Brazilian bonds would rally and confidence would return at the sight of a lender of last resort.

The risk would be minimized by not raising the amount the central banks were willing to lend in line with the rise in market prices. Commercial banks would reinstate their credit lines and export-led growth could resume, especially if the US completely rescinded its steel tariffs. The crisis would dissolve into thin air.

My proposal would do the trick that the recently announced package did not, and would cost no more. It is not too late to adopt it. Once it was in place, the incoming president would have no reason to contemplate any interference with the normal servicing of debt. As it is, he would be justified in demanding some international support, rather than allowing his country to bleed to death as Argentina did.

Financial markets are right to factor in a significant risk of debt reorganization or default, and once they do so it is liable to become a self-fulfilling prophecy. That is why the markets cannot be left to their own devices.