How dumb do you have to be to mint money at a loss? In the latest only-in-Washington episode, we find that the government may have lost as much as $40 million coining pennies and nickels last year.

The metal in them — the zinc, copper and nickel — has soared in value in the last few years, making the coins more valuable as raw materials than they are as currency. The government reaction has been to ban the melting of the coins to get the metal. But there is a good chance that we will find ourselves in an outright coin shortage of a form we have not seen in four decades and one that harks back to the monetary problems of medieval times.

In their landmark book on monetary history, “The Big Problem of Small Change,” two economists, Thomas J. Sargent of New York University and François R. Velde of the Federal Reserve Bank of Chicago, point out that before the 20th century, the value of coins came from the material they contained: silver or gold. In the words of economics, it was “commodity money.”

But as the price of silver or gold increased, people pulled the coins from circulation. These shortages are a basic problem with commodity money and began almost as early as Charlemagne’s minting of the first silver penny around 800 A.D.