After ten hours of talks, EU leaders have agreed a deal to solve the eurozone crisis.

They have put together a plan to recapitalise banks in exchange for them agreeing to write off half of Greece's debts.

European Commission president Jose Manuel Barroso says he's confident the deal will work.