EVER since Greece plunged into a sovereign-debt crisis in 2009, investors have focused on which European country might be next. According to Capital Economics, a research firm in London, however, the next trouble spot could be Venezuela. “There is a growing risk that the government will default on its obligations in 2012,” its analysts wrote on February 17th. Some in the markets have taken fright, too: the country's credit-default swaps imply a 50% chance of default by 2015. That may be overblown. Even so, Hugo Chávez, Venezuela's leftist president, seems to be pulling off a dubious achievement by causing the bond markets to fear for the solvency of the world's eighth-largest oil producer.

The chief cause of Venezuela's travails has been Mr Chávez's pillaging of PDVSA, the state oil firm. He has packed it with loyalists, starved it of investment and used it for social spending, cutting its output from 3.3m barrels per day (b/d) in 1998 to around 2.25m b/d, according to industry estimates. Of that, some 1m b/d is sold at subsidised prices at home or to regional allies, leaving just 1.25m b/d for full-price exports.

Meanwhile, the president's hostility to business has devastated the rest of the economy. He has nationalised hundreds of companies and trumped up charges against their owners, causing much of Venezuela's private sector to shut up shop and flee. As a result, the country has seen vast capital flight, and must import many goods that it used to produce. Non-oil exports have ground to a halt: petroleum now accounts for 92% of its dollar intake.

A misguided currency policy has exacerbated the malaise. In 2005 Mr Chávez pegged the bolívar at 2.15 to the dollar. However, he also tolerated a legal parallel market that kept the country supplied with hard currency at a higher rate (providing countless opportunities for arbitrage).

Last year he closed that market and created a new state body, which provides just over half the dollars that the old system did, at a price of 5.3 bolívares. Venezuela also reinforced its ban on black-market trading, making it punishable by up to seven years in jail. (Merely publishing the unofficial dollar price, now around 8-10 bolívares, has long been illegal.) As a result, foreign exchange is now scarce. Venezuelans have begun asking friends abroad to send them necessities like nappies, sanitary towels and baby milk.

The government has tried to compensate for these woes by raiding one of its piggy banks—this year it has grabbed all but $3m of the $832m in a rainy-day fund set up to even out oil-price fluctuations—and by leaning on its workers. Public employees have staged frequent protests over unpaid salaries, worsening conditions and a virtual freeze on collective bargaining.

But Mr Chávez's main short-term solution has been borrowing. Since 2008 China has lent Venezuela $12 billion and is being repaid in oil shipments, cutting PDVSA's annual revenues by a further 20%. The government's opaque accounting makes it impossible to know how it has used the money. Net public debt rose from 14% of GDP in 2008 to 29% last year, and the Economist Intelligence Unit, our sister company, expects it to reach 35% in 2011. The country cannot continue borrowing at today's rates: PDVSA's latest dollar-denominated bonds pay a 12.75% coupon.

Yet even though things look bad now, a default probably does not loom in the near future. If oil stays at $100 a barrel, the Capital Economics report calculates, Venezuela's export revenues should just cover its foreign-exchange requirements—$11 billion of debt service, $28 billion of capital flight, and $100 billion of imports—over the next two years. And even if petroleum prices drop, the central bank has $22.5 billion in cash and gold, and another $7.5 billion in further unspecified illiquid assets.

Moreover, since 2005 the government has squirrelled away $39 billion in a separate, unaudited fund called Fonden. Although analysts do not know how much of this has been spent, some part has probably been saved. There are rumours that the president is hoarding hard currency to prepare for 2012, when he faces a difficult re-election battle that will cost him money. The recent spike in oil prices caused by unrest in the Middle East will surely give Mr Chávez some extra breathing room. And at a pinch, he could probably turn to his friends in Beijing for a new loan.

Nonetheless, that sovereign default is even being mentioned in the same breath as a big oil producer in a fast-growing region says something about Mr Chávez's economic stewardship. Even if he makes it past 2012, he will eventually either have to change his policies or deny bondholders what they are owed.