Last night, when we concluded our overnight summary state of affairs we said that "we expect some resolution around first light this morning, and while another Greek can kicking and some last-moment "hope" is surely in the cards, we know two things: Greece is officially finished - there is no way the Tsipras or any other government can politically recover after such a humiliating spectacle when half of Europe made a mockery of the Greek people; and perhaps better, we finally have seen the true face of Europe: visible only when things are finally falling apart."

Sure enough, just around 9am CET, after a 17-hour mammoth all-night session, Greece did manage to cobble together a "deal" if one may call this latest embarrassing can-kicking that, which was nothing short of total capitulation by Tsipras: a prime minister who 8 days ago was victorious cheering the passage of a referendum that rejected a far less draconian deal.

As part of the deal, Greece "surrendered to European demands for immediate action to qualify for up to 86 billion euros ($95 billion) of aid Greece needs to stay in the euro" as Bloomberg politely put it.

We would put it as follows: Greece agreed, at the cost of ceding its sovereignty to Europe, to allow the Troika to repay itself. Even Greek prime minister Tsipras admitted as much saying "Greece will fight to return to growth and to reclaim its lost sovereignty." He started the "fight" by being brave enough to put up a smile for the reporters.

Worse, there is no actual deal term sheet on the table: while the summit agreement averted a worst-case outcome for Greece, it only established the basis for negotiations on an aid package, which would also include €25 billion euros to recapitalize its weakened financial system, money which would come from Greek asset sales.

The politicians were greatly relieved, perhaps most of all to be finally able to go to bed. Here is the statement by Euro president Donald Tusk:

Good morning. Today, we had only one objective: to reach an agreement. After 17 hours of negotiations, we have finally reached it. One can say that we have 'agreekment'. Leaders have agreed in principle that they are ready to start negotiations on an ESM programme, which in other words means continued support for Greece. There are strict conditions to be met. The approval of several national parliaments, including the Greek parliament, is now needed for negotiations on an ESM programme to formally begin. Nevertheless, the decision gives Greece a chance to get back on track with the support of European partners. It also avoids the social, economic and political consequences that a negative outcome would have brought. I welcome the progress and the constructive position of Greece that helps to bring back trust among euro zone partners. Following national procedures, the Eurogroup will work with the Institutions to swiftly take forward the negotiations. Finance ministers will also as a matter of urgency discuss how to help Greece meet her financial needs in the short term, so-called bridge-financing. I would like to thank the President of the Commission Jean-Claude Juncker and the Eurogroup President Jeroen Dijsselbloem for their dedication and involvement in this progress. Without your work, today's agreement wouldn't be possible. Thank you.

One wonders just how effective leaders of a multi-trillion political and monetary block are at cobbling together deals at 4 am in the morning, when the biggest motivators is just to get a deal signed.

The terms of the deal are largely as had been agreed upon by the finance ministers previously, and contain numerous draconian clauses which make the much-hated "memorandum" from the second bailout tame in comparison. Furthermore, Greece also capitulated on the IMF remaining as a key part of the deal, as well as the formation of a €50 billion "escrow" fund which would receive proceeds from the liquidation of Greece assets, and where the first €25 billion of capital would be used to bailout the insolvent Greek banking system.

According to Reuters, "Tsipras finally accepted a compromise on German-led demands for the sequestration of Greek state assets worth 50 billion euros - including recapitalized banks - in a trust fund beyond government reach, to be sold off primarily to pay down debt. In a gesture to Greece, some 12.5 billion euros of the proceeds would go to investment in Greece, Merkel said. The Greek leader had to drop his resistance to a full role for the International Monetary Fund in a proposed 86 billion euro bailout, which Merkel has declared essential to win parliamentary backing in Berlin."

Perhaps the toughest condition for Tsipras to swallow was Germany's insistence that Greek state assets worth up to 50 billion euros be placed in a trust fund beyond government reach to be sold off with proceeds going directly to pay down debt. Berlin initially wanted to use a structure in Luxembourg managed by its own national development bank, KfW, but diplomats said it was flexible on the location. One diplomat said that was tantamount to turning Greece into a "German protectorate", stripping it of more sovereignty. But Merkel declared the matter a "red line" for Germany.

Bloomberg adds that "the agreement shifts the spotlight to the parliament in Athens, where lawmakers from Tsipras’s Syriza party mutinied when he sought their endorsement two days ago for spending cuts, pensions savings and tax increases. They have until Wednesday to pass into law key creditor demands, including streamling value-added taxes, broadening the tax base to increase revenue and curbing pension costs."

The agreement cobbled together in the last minute "was billed as its last chance to stay in the euro... with Greece running out of money and its banks shut the past two weeks."

The hope is that now that Greece may have a deal in place, the ECB will open up some ELA taps and allow Greeks to withdraw some more of their €120 billion or so of hijacked deposits. Assuming, of course, the Greek parliament passes the deal.

The politician comments were split as per the pre-bailout posture with many of the northern European nations less than thrilled:

First it was Merkel who said thatt "trust has to be rebuilt, the Greek authorities have to take on responsibility for what they agreed to politically here. It reflects the basic principles which we’ve followed in rescuing the euro. It now hinges on step-by-step implementation of what we agreed tonight."

Then it was Dutch Prime Minister Mark Rutte's turn to talk to reporters saying that "only after the Greek parliament agrees

with all the measures that have been decided this week, is there a base to reopen negotiations for the ESM program, which could take weeks. The Greek proposals of two days ago were insufficient. They needed to take measures, which they can translate into actions. The current measures are fierce, but necessary to heal the Greek economy and government." Rutte added that he is unhappy with the fact that he has to break electoral promise to Dutch constituents on no further Greece aid "This summit was about the position of Greece in the euro zone, but it was also about the credibility of our coin, the euro."

Tsirpas naturally tried to spin the total capitulation as at least some victory: "Greece will be able to stand on its own feet with agreement reached at EU summit, Greek PM Alexis Tsipras says in statement broadcast live on state-run ERT TV. Agreement with creditors “tough”, averted transfer of Greek assets abroad. Greece will keep fighting to return to growth. Greece has sent message of democracy, dignity across Europe. Measures included in the deal will inevitably cause recession to Greek economy. Agreement with creditors will put Grexit talks in the past."

Well not really: only until the next government comes in power promising to undo the current memorandum just as Tsipras did.

But the punchline came from Malta's Prime Minister Muscat who said that "The Greek government has accepted practically everything... It accepted all the crucial and important points.”

Some more details: the conditions that Tsipras swallowed comprised a laundry list of unfinished business from Greece’s two previous bailouts and a new demand for the government to transfer 50 billion euros of state assets to a holding company that will seek to either sell or generate cash from them. His creditors rejected Tsipras’s pleas for a cut in the face value of Greek debt of about 310 billion euros.

* * *

And now comes the hard part: convincing both Greece, the Euroskeptics, and the market (after kneejerking higher the EUR is now down on the session), that the deal is viable.

Calling that vote “has turned into one of the most expensive economic policy mistakes in the European Union for a long time,” Holger Schmieding, chief economist at Berenberg Bank in London, said in a note to clients Monday. “The much bigger sums which creditors now need to offer and the tougher conditions Greece now has to meet make it harder for both sides to deliver on the bargain.”

Rabobank adds that "implementation of Greece deal will remain subject to “considerable” risk given domestic political backdrop, Rabobank strategists write in client note. New governing arrangement likely necessary after Greek govt’s volte-face in accepting deal and clearly flouting result of July 5 referendum. A new unity govt or an early election very possible. Further deteriorating macro backdrop raises odds that disappointing economic performance will drive Greece’s debt metrics to rapidly unwind benefits from any debt relief." Rabo adds thatt Greece’s influence on mkts will remain limited, as long as any missed targets and delayed reforms occur within context of a bailout agreement.

It concludes that sustainability of Greece’s public debt likely to remain a threat in longer term. Which is true considering Greek debt/GDP is about to surpass 200%.

In fact, the sellside consensus is clear: Greece was "comprehensively routed" by German. Quote Demetrios Efstathiou of ICBC Standard Bank (via the Guardian):

Tsipras had to concede on almost every point; Merkel comes out as a winner, and should be able to get the deal though the German parliament.

Germany’s extremely tough position would serve as a warning to other Eurozone nations. There are arguments that she even pushed too far.

Varoufakis may have gambled, Tsipras and Syriza may have lost, but Greece may be the ultimate winner - Greece has a golden opportunity to implement in record time the drastic reforms that it desperately needed and which successive governments have been unwilling to commit to.

The formation of a national unity or special purpose government to pass the reforms in the tight time-frame is now required. Elections would have to follow at a later stage.

The debate will now move on to the reaction of the Greek people. There is no easy answer. Only time will tell. The way I see it is that the Greek people will be relieved to see their banks reopen, their pensions and savings to be still denominated in euros, and the tourist season not destroyed. They should also be celebrating the implementation of structural reforms, but I doubt that.

Greece must now push through parliament, by Wednesday, July 15th, a series of legislations that include the streamlining of the VAT system, and pension measures.

ADM's Marc Ostwald also agrees that the measures in this bailout package are “infinitesimally worse” than the ones turned down in last Sunday’s referendum. He adds that what is on the table as a deal highlights that: a) there is no long-term future for the Eurozone; b) the desire on the part of Eurozone creditor nations to completely destroy the Greek economy - it can certainly be asserted that this is indeed a worse deal than the 1919 Treaty of Versailles.

This is how he views next steps:

Tsipras will have to form a new government of national unity as soon as he gets back to Athens

By Wednesday 15th, Greece will have to pass laws including simplifying VAT rates, and applying VAT on a wider basis, cutbacks on pensions, and making its statistics agency independent.

Once these have been passed, ESM bail-out parliamentary process can commence, and this will require parliaments in Finland, Germany, Austria, Netherlands, Slovakia and Estonia to approve starting ESM talks

The Greek parliament will then have to rush through further laws to attain brige financing to pay the ECB on July 20th.

Others, such as Joerg Kraemer, chief economist at Commerzbank, sees elections as imminent, saying Greek parliament will presumably pass the required reform laws partly with votes from big opposition parties; Tsipras will find no majority of his own in parliament and new elections are likely after a possible agreement on 3rd bailout program. In other words, a new Greek political party is set to take over with promises of undoing what Tsipras just "achieved."

Heads of state and government kicked the ball back to Athens as the country has to pass numerous and unexpectedly tough reform laws before talks about 3rd bailout program can start

Eurogroup will clarify how Greek government is to be financed until 3rd bailout program enters into effect

As long as negotiations are ongoing and not officially declared to have failed, ECB will probably keep ELA ceiling for Greek banks stable; may even raise it if Greek banks are about to become illiquid

Most importantly, as we said yesterday, the Summit over weekend has shown once again how deeply divided euro zone is politically.

ABN's Nick Kounis piles on saying the agreement reached this morning in Brussels averts Grexit possibility only in near term, reduces risk of bank collapse as ECB likely to increase ELA, Nick Kounis.

Greece made all the concessions, accepted very tough measures; more to come as this only opens door to ESM negotiations

EU50B in asset sales isn’t realistic; parliamentary processes in Greece and other countries will be difficult

Biggest risk now is implementation in coming days, weeks, months against the background of deepening recession

Doesn’t see big concession to Greece on debt as language almost exactly the same as in 2012.

But the most damning assessment of the capitulation came from Greece itself aftter Minister of Labor Panos Skourletis said in interview with state-run ERT-TV that "Greek snap elections aren’t possible at this stage, due to country’s economic situation, but will be needed this year as there’s “an issue,” with the govt’s parliamentary majority."

He adds that the agreement currently negotiated between Greece and its creditors isn’t viable, no one can say what will happen after a few months. "I can’t see how we can avoid elections in 2015, they are necessary. We have a government which has probably lost its parliamentary majority, which believes, says and supports the opposite things from what those that it is forced to implement, under the threat of a gun.

Nikos Filis, the parliamentary spokesman for Tsipras’s governing party, said that Greece had been “waterboarded” by euro-area leaders during the negotiations and accused Germany of “tearing Europe apart” for the third time in the past century. “#ThisIsACoup” became the most-trending Twitter hashtag in both Greece and Germany overnight.

* * *

And now we turn our attention to the Greek reaction where the population will weight the opportunity cost of reopening banks, if only briefly as any ELA increase by the ECB (expect capital controls to continue for weeks, if not months or longer if indeed the bank bailout funds will come from Greek asset sales)...

ECB told that if gives extra €2bn of ELA, banks re-open tmrw - not as normal, €60 withdrawal limit to stay, but to provide other services — Robert Peston (@Peston) July 13, 2015

... will promptly see all incrementally freed deposits be withdrawn, versus the harshest "deal" possible, far worse than anything Samaras' government had in store for Greece.