JP Morgan Chase, Barclays, Citigroup, and Royal Bank of Scotland have to pay billions in fines after pleading guilty to activities that sound straight out of &#34;Wolf of Wall Street.&#34;

Every day, about $5 trillion changes hands in the global currency trade. It's the largest market in the world, and offers the traders who work with it a huge opportunity to skim something off the top. That's exactly what authorities say bankers working at JPMorgan Chase, Barclays, Citigroup and Royal Bank of Scotland have been up to for years.

On Wednesday, all of those banks pleaded guilty to activities that sound straight out of The Wolf of Wall Street: Operating in chat rooms with code names like "the mafia" and "the cartel," groups of traders colluded to fix the prices of the euro and the dollar to each others' advantage. As a result, the banks will be paying about $5.6 billion in penalties.

"Whenever an American investor, such as a pension fund, wants to buy or sell stock in a European company, for instance, they convert dollars to euros or vice versa," Brad Miller, a former North Carolina Congressman who worked extensively on financial regulation in Washington, tells VICE. "Mainly they used their clients' money to make such big trades that they moved the exchange rates, and they took advantage since they knew which way the market would move, and when."

The relative worth of all the world's currencies fluctuates 24 hours a day, except for two separate points per day known as "fixes." Those two windows—one a minute long, the other a single point in time—are what third parties use to determine how much each currency is worth. Working together, traders would make huge trades to manipulate the price of currencies. The maneuver is called "banging the close," and it made these banks tons of cash.

According to federal court documents, the London bankers would meet up in a chat room and work together even though they were supposed to be competitors. According to a plea agreement from Barclays, the scheme went on from at least December 2007 to at least January 2013. A consent order from that same bank also offers insight into how the bankers operated in their secret chats.

When one banker became the head euro trader for Barclays in 2011, he was desperate to join the cartel. He was invited, after much discussion within the group, to a one-month trial, but was told that if he screwed up he shold "sleep with one eye open." Apparently he passed his test and continued to cheat the market until being busted.

The bust represents a PR victory for the US Department of Justice, which has been regularly accused of taking a kid-gloves approach to white-collar crime in recent years. Criminal charges are not usually part of the splashy settlements struck with banks for breaking the law. But as usual in these kinds of deals, no executives have been charged, although the Associated Press reports that part of the investigation is ongoing.

"These resolutions make clear that the US government will not tolerate criminal behavior in any sector of the financial markets," the FBI's Andrew McCabe said in a statement. "This investigation represents another step in the FBI's ongoing efforts to find and stop those responsible for complex financial schemes for their own personal benefit.

The banks got waivers from the SEC that allow them to continue business as usual. Still, given the sheer brazenness of these crimes, it was clear the feds had to do something.

"This is a lot more than a broken windows prosecution," Miller says. "It's more like a truck bomb went off."