An empty supermarket in Caracas (Jorge Silva/Reuters)

The problem with socialism isn't that you eventually run out of other people's money. It's that you eventually run out of oil money.

Well, at least in Venezuela. It doesn't have an economy, so much as a poorly run oil exporting business that isn't enough to subsidize everything else. And that was true even when oil was more than $100 a barrel. So now that it's under $50 a barrel, Venezuela's government has gone from defaulting on its own people, as former minister Ricardo Hausmann put it, in the form of rampant inflation and shortages, to really doing so, to the point that it might have to start defaulting on its debt, too.

It shouldn't be this way. Venezuela, after all, has the largest oil reserves in the world. It should be rich. But it isn't, and it's getting even poorer now, because of economic mismanagement on a world-historical scale. The problem is simple: Venezuela's government thinks it can have an economy by just pretending it does. That it can print as much money as it wants without stoking inflation by just saying it won't. And that it can end shortages just by kicking people out of line. It's a triumph of magical thinking that's not much of one when it turns grocery-shopping into a days-long ordeal that may or may not actually turn up things like food or toilet paper.

This reality has been a long time coming. Venezuela has the most oil reserves in the world, but not the most oil production. That's, in part, because the Bolivarian regime, first under Chavez and now Maduro, has scared off foreign investment and bungled its state-owned oil company so much that production has fallen 25 percent since it took power in 1999. Even worse, oil exports have fallen by half. Why? Well, a lot of Venezuela's crude stays home, where it's subsidized to the you-can't-afford-not-to-fill-up price of 1.5 U.S. cents per gallon. (Yes, really). Some of it gets sent to friendly governments, like Cuba's, in return for medical care. And another chunk goes to China as payment in kind for the $45 billion it's borrowed from them.

That doesn't leave enough oil money to pay bills. Again, the Bolivarian regime is to blame. The trouble is that while it has tried to help the poor, which is commendable, it has also spent much more than it can afford, which is not. Indeed, Venezuela's government is running a 14 percent of gross domestic product deficit right now, a fiscal hole so big that there's only one way to fill it: the printing press. But that just traded one economic problem — too little money — for the opposite one. After all, paying people with newly printed money only makes that money lose value, and prices go parabolic. It's no wonder then that Venezuela's inflation rate is officially 64 percent, is really something like 179 percent, and could get up to 1,000 percent, according to Bank of America, if Venezuela doesn't change its byzantine currency controls.

Venezuela's government, in other words, is playing whac-a-mole with economic reality. And its exchange-rate system is the hammer. It goes something like this. The Maduro regime wants to throttle the private sector but spend money like it hasn't. Then it wants to print what it needs, but keep prices the same like it hasn't. And finally, it wants to keep its stores stocked, but, going back to step one, keep the private sector in check like it hasn't. This is where its currency system comes in. The government, you see, has set up a three-tiered exchange rate to try to control everything — prices, profits, and production — in the economy. The idea, if you want to call it that, is that it can keep prices low by pretending its currency is really stronger than it is. And then it can decide who gets to make money, and how much, by doling out dollars to importers at this artificially low rate, provided they charge what the government says.

This might sound complicated, but it really isn't. Venezuela's government wants to wish away the inflation it's created, so it tells stores what prices they're allowed to sell at. These bureaucrat-approved prices, however, are too low to be profitable, which is why the government has to give companies subsidies to make them worthwhile. Now when these price controls work, the result is shortages, and when they don't, it's even worse ones. Think about it like this: Companies that don't get cheap dollars at the official exchange rate would lose money selling at the official prices, so they leave their stores empty. But the ones that are lucky, or connected, enough to get cheap dollars might prefer to sell them for a quick, and maybe bigger profit, in the black currency market than to use them for what they're supposed to. So, as I've put it before, it's not profitable for the unsubsidized companies to stock their shelves, and not profitable enough for the subsidized ones to do so, either.

And, remember, this was a problem even when Venezuela had dollars. Now it doesn't. Not when 95 percent of its exports come from oil, and its price has fallen by half. (It's actually a little worse than that, since Venezuela's crude is so heavy that it sells at a $5 a barrel discount to the rest of the world's). Without as many petrodollars, Venezuela has had to cut back on imports so much that its shortages, which had already hit 30 percent of all goods before the central bank stopped keeping track last year, have gone from being a fact of life to the fact of life. Things are so bad that there isn't a bank run — who wants to save their worthless currency? — but rather, as Jonathan Wheatley puts it, a supermarket run. People have lined up for days to try to buy whatever they can, which isn't much, from grocery stores that are even more empty than usual. The government has been forced to send the military in to these supermarkets to maintain some semblance of order, before it came up with an innovative new strategy for shortening the lines: kicking people out of them. Now they're rationing spots in line, based on the last digit of people's national ID cards.

But just like Venezuela has defaulted on its most basic obligations to its people — like, say, laundry detergent — it might also default on its financial ones. It can't afford anything, not food, not diapers, and not bond payments, if oil stays around $50 a barrel. Now, investors have assumed that they'd be able to seize Citgo, which is owned by Venezuela's state-owned oil company, as payment if the country ever defaulted on its debt. But now it looks like that's not true. That, together with falling oil prices, is why credit default swaps, basically debt insurance, on Venezuela's 5-year bonds have exploded the past few months. The fiscal situation is so dire that Citgo, which, remember, supposedly wouldn't count as a part of the Venezuelan state, is planning on taking out $2.5 billion in debt to give to its parent company, which would presumably pass it along to the government. This makes sense, as much as anything does in Venezuela, because Citgo has a higher credit rating than the government, so it can borrow, and if it defaults, it will just be as if the country sold it.

It's a man-made tragedy, and the men who made it won't fix it. Maduro, for his part, blames the shortages on the "parasitic" private sector, while the food minister doesn't get what the big deal is since he has to wait in line at soccer games.

So it turns out Lenin wasn't just right that the best way to destroy the capitalist system is to debauch the currency. It's also the best way, as Venezuela can tell you, to destroy the socialist one.