Ukraine said today it was issuing a $3 billion in two-year Eurobonds at a yield of 5 percent in what seems to the start of a bailout deal with Russia. That sounds like a good deal for Kiev — its Eurobond maturing next year is trading at at a yield of 8 percent and it could not reasonably expect to tap bond markets for less than that. In addition,¬† Ukraine is also¬† getting a gas price discount from Russia that will provide an annual saving of $2.6 billion or so.

But what about Russia? Whether the bailout was motivated by “brotherly love” as Putin claims or by geo-politics, it sounds like a rotten deal for Moscow. The credit will earn it 5 percent on what is at best a risky investment. What’s more the money will come out of its rainy day fund which had been earmarked to cover future pension deficits. State gas company Gazprom will have to stomach a 30 percent price cut, which according to Barclays analysts is “a reminder of the risks of Gazprom’s quasi-sovereign status.”

But there could be positives.

Putin is clearly playing a long game that aims not only at giving the Kremlin tighter political control over Ukraine but also to bring it back into the Russian gas sales orbit and eventually create a bigger trade bloc encompassing Russia, Kazakhstan and Ukraine, says Christopher Granville, managing director of consultancy Trusted Sources in London.

Lets look at the gas issue first.

The chart above from Barclays shows how Gazprom’s exports to Ukraine have plummeted in recent years — a consequence of the high tariffs for Ukrainian importers. Cheesed off by the prices, Ukrainians have been using more coal and also importing cheaper gas from Europe. So Gazprom could actually be an incidental beneficiary of the Moscow-Kiev deal, Granville says:

I’d argue this deal is fundamentally positive to Gazprom in the long run. The way I see it is that Gazprom has its been priced back into the Ukrainian market. It’s reasonable to assume a material pick up in volumes, which would go a long way towards offsetting the drop in price.