Global markets are on edge today after it was learned over the weekend that Cyprus would be getting a bank bailout from the European Central Bank, along with a very controversial provision that could hurt every citizen in the country. European finance ministers worked out an agreement on Saturday that would provide around 10 billion euros in loans to the prop up the bankrupt Cypriot government as well provide support for the nation's overloaded (and nearly insolvent) banking sector. The deal, which has been rumored for months, shares some resemblance to the bank bailouts that have come to Greece and Spain, and includes increases in corporate taxes to help finance the deal.

However, the deal also includes one other wrinkle that is infuriating citizens and is worrying investors in other nations. In another move designed to raise money for the bailout, anyone who has money in a Cypriot bank will charged a one-time tax of as much as 9.9 percent on whatever money they have deposited in the bank. The tax would even hit those who have deposits under 100,000 euros, the amount that is supposed to be protected by insurance in the event the banks fail completely. (Just like the FDIC insurance that protects deposit accounts in United States.) After protests on Sunday, the government announced they may restructure that part of the deal before voting on it Tuesday, but some sort of deposit tax is almost certain to be part of the final package.

It's that controversial decision that has investors up in arms and is being compared to outright theft. The "bail-in" tax is meant to spread the pain among every stakeholder, especially those who use the banks but don't live in Cyprus—more than 30 percent of the nation's bank holdings come from people who don't live in the eurozone. But it also sets a dangerous precedent for a government to essentially wipe out the insurance protections and seize deposits to keep the banks afloat. It could forever erode trust in that country's banks, but may also lead citizens in other European country, like Spain and Italy, to believe it could to happen to them. A run on European banks is probably unlikely, but when "insured" bank deposits are no longer safe, then all bets are off.

So how did tiny little Cyprus find itself upsetting everyone in Europe? The island nation presents a unique challenge for the European Union, because it's economy is so small compared to the other nations that share the euro currency. (Its GDP is just 0.2 percent of the entire eurozone economy.) If it were to fail completely, the impact on the larger European economy would be small, but the other eurozone states feel they cannot allow one of their members to fail, without it destroying the integrity of their whole system.

In addition, Cyprus has a banking system that is gigantic relative to the size of its national economy—it's total size is roughly 700 percent of the island's GDP. Lax banking regulations and low taxes have made Cypriot banks attractive to outside investors, particularly to Greek and Russian depositors who have poured billions into accounts there. That's why Russian President Vladmir Putin was so adamantly opposed to the deal—his people are about to lose a lot of money on the bail-in tax.

That outsized importance makes the fragile state of the financial sector even more toxic to the health of nation than it would in a stronger economy. Anchor Michelle Caruso-Cabrera of CNBC illustrated the problem this way: For the United States to have a banking sector as large as Cyprus's (relative to size of its economy), we would need 45 more banks that were each as big as the largest American bank, JPMorgan Chase. And you thought Wall Street was too big to fail.

There is a sense among European regulators that much of that outside money was earned illegally and is simply being laundered through the Cypriot banking sector, making the tax (especially on large account) slightly more palatable. But that doesn't make the deal any easier to swallow for average citizens who won't know how much money is their account tomorrow. Many of them ran to the ATM over the weekend, in fear for their savings. Monday is a bank holiday in Cyprus and citizens are sweating out the final negotiations over the plan, hoping their money will still be waiting for them when or if they ever get to a teller again. (Update: Cyprus now says the banks will remain closed until at least Thursday.)

In the end, it's a no-win situation for Cypriot citizens who will have to pay for this bailout one way or the other. If the plan goes forward, they could lose a significant chunk of their wealth to the bail-in. But if doesn't, they could lose a lot more in taxes later if the banks fail completely or the country is forced to abandon the euro altogether.