Turkey's currency crisis shows no signs of abating. The lira has lost 40 percent of its value relative to the U.S. dollar so far this year. That's making dollar-denominated debts throughout Turkey's economy much harder to pay off. And that threatens a potential financial crisis that could take down banks and markets well beyond Turkey.

Fortunately, however, the world has dealt with problems like this before.

The immediate aftermath of the 2008 financial crisis left many European banks in the same predicament that Turkey is in now — saddled with enormous commitments denominated in U.S. dollars that they couldn't possibly repay. But in Europe's case, they found a savior: the U.S. Federal Reserve.

So why can't America's central bank rescue Turkey now?

The United States, Turkey, and the eurozone all have their own respective central banks, running their own respective currencies — the U.S. dollar, the lira, and the euro. Each central bank can effectively create as much of their particular currency as they like. That makes them the "lender of last resort" to their country's banking system. If U.S. banks get in over their heads in transactions denominated in U.S. dollars, the Fed can always offer them more dollars to repair their balance sheets. The same goes for Turkish banks who overextend themselves in lira, or European banks who do so in euros.

But when banks get themselves into trouble with another currency, it's a problem without a ready solution. This is what's happening in Turkey, where many corporations, helped along by Turkish banks, borrowed massively in U.S. dollars to fuel the country's economic growth.

This sort of thing has happened before. Back before the Great Recession, European banks spent years eagerly participating in the American housing market craze. By 2007, foreign banks had poured $6.5 trillion in credit into American mortgages and the multitudinous financial instruments built atop them. (For context, domestic U.S. banks had contributed $7.5 trillion.)

When crisis struck, the European banking system was left with huge commitments in U.S. dollars, and not nearly enough dollars on hand to pay them off. Suddenly poisoned by enormous risk, they couldn't find anyone willing to lend them more dollars on the private markets — a textbook "lender of last resort" scenario. But the European Central Bank couldn't create U.S dollars. They couldn't step in to save the day. The only central bank that could was the Fed.

And it did.

Part of this was the Fed's famous quantitative easing program. Just over half of the mortgage-backed securities the Fed bought off bank balance sheets during QE came from foreign banks, most of them in Europe. But even more central was the creation of currency swap lines.

Basically, the Fed agreed to sell a foreign central bank a certain amount of U.S. dollars in exchange for their currency. Simultaneously, the foreign central bank also agreed to buy back its own currency at a future date, plus some interest. This gave the foreign central bank a fresh supply of U.S. dollars that it could lend out to support banks in its own country.

Starting in December 2007, the Fed did this with the European Central Bank, the Bank of England, the Swiss National Bank, and a host of others. By the end of 2010, at least $10 trillion had flowed through these international swap agreements. And while the money has stopped flowing since, a select few swap lines — including to the European Central Bank and the Bank of England — have been made permanent. "While the Fed tried to downplay the significance of its interventions," Matthew Klein wrote in Barron's, "the reality is that it had engaged in an act of international economic statecraft comparable to the Marshall Plan." America's central bank had effectively become the lender of last resort to the world.

So again: Why can't the Fed do this now for Turkey?

Central banks can create as much of their respective currencies as they like. The only real upper limit is the risk of inflation. But neither central bank would be juicing aggregate demand; they'd simply be repairing bank balance sheets to prevent a financial collapse, and thus hold off a catastrophic fall in demand.

Meanwhile, if the Turkish central bank were to just start lending lira unilaterally, it would drive the value of its currency even further below that of the dollar. But the swap agreements preset the exchange rate at which the swap will be paid back, neutralizing the risk of exchange rate changes.

In short, it's costless. Yes, it would be a "bailout" of the Turkish banking system. But money wouldn't have to be taken from anyone else to fund it.

The problem is politics.

From a raw economic standpoint, there's no reason the Fed couldn't provide these swap lines to every other central bank on the planet. Yet even at the height of the 2008 crisis, the Fed was picking and choosing who to rescue. "They felt they had to check with the State Department before they decided finally on who got [the swap lines] and who didn't," Adam Tooze, a Columbia University historian who's written a sweeping history of the crisis, told The Week. While the Fed's intervention was effectively forced by American markets' entanglement with European markets, who got saved was also determined by the implicit assumptions of American political interests.

The same would be true of Turkey, and doubly so in the era of President Trump. "From a geopolitical point of view, until recently everyone thought Turkey was absolutely vital," Tooze continued. "[German Chancellor] Angela Merkel would tell you that Turkey is absolutely pivotal to Europe. So it's a pretty bizarre state of affairs when America can be as indifferent to Turkey's fate as it apparently currently is."

The other problem is that these sorts of bailouts, while technically costless, carry all sorts of problematic questions about moral hazard and distributional economic justice. By nature, monetary policy can rescue banks and big financial firms, and thus prevent calamity. But it cannot rescue citizens and homeowners. The Fed was saved from confronting these issues in the crisis because U.S. politics largely failed to realize its massive intervention in Europe was happening. "If you talk to the Fed people, they know how sensitive the operation was," Tooze continued. "They're quite glad it never really acquired that salience." And to the extent American politicians did realize what the Fed was doing, it drove them to completely unfounded fears of hyperinflation.

So why won't the Fed save Turkey? We may never know. Because as is, the Fed's massive powers remain hidden in a kind of black box, guided by a small group of technocrats for often obscure reasons, loaded with potential, but rarely used.