Banks and other financial institutions would be able to use provisions in the proposed Trans-Pacific Partnership to block new regulations that cut into their profits, according to the text of the trade pact released this week.

In what may be the biggest gift to banks in a deal full of giveaways to Hollywood, the drug industry and technology firms, financial institutions would be able to appeal any national rules they didn’t like to independent, international tribunals staffed by friendly corporate lawyers.

That could nullify a proposal by Hillary Clinton to impose a “risk fee” on financial firms — or the Elizabeth Warren/Bernie Sanders plan to reinstate the firewall between investment and commercial banks.

Financial firms could demand compensation for these measures that would make them too expensive to manage.

The TPP, a 12-nation pact with countries in Asia and the Americas that requires congressional approval, includes an investor-state dispute settlement (ISDS) system. This allows foreign companies operating in TPP member countries to enforce the agreement without using that country’s court system. Instead, corporations can sue for monetary damages in independent tribunals before corporate lawyers who can rotate between advocating for investors and judging the cases themselves.

The lawyers have an inherent incentive to encourage more challenges with favorable rulings, so they can be paid to arbitrate them. Labor unions who allege violations of the trade deal cannot use ISDS directly; only international investors, i.e. large corporations, can.

Hundreds of past trade deals have included ISDS, usually as a special insurance policy for countries operating in emerging markets. But language in the TPP could be directed to target American financial laws and regulations.

In prior deals, financial services providers were limited to making ISDS challenges based on discrimination — where foreign companies were subject to more stringent rules than their domestic counterparts — or an illegal “taking” of their investments. These types of challenges have been largely unsuccessful in ISDS tribunals.

But now, for the first time, financial institutions could make an ISDS claim based on not receiving a “minimum standard of treatment.” This is the most flexible type of claim. “Over time, tribunals have interpreted this to mean that the company gets compensation if the change in policy disappoints their expectations of future profits,” said Lori Wallach of Public Citizen’s Global Trade Watch.

Article 11.2 of the agreement confirms that financial services providers are covered under the minimum standard of treatment obligation. This means that almost any change in financial regulations affecting future profits could be challenged in an extra-judicial tribunal, even if they equally applied to foreign and domestic firms and even if they were enacted in response to a crisis.

The change to ISDS had been rumored in recent weeks but has now been confirmed by the language in the agreement.

The U.S. Trade Representative’s office claims in a fact sheet that they improved the ISDS process to ensure that countries have the right to “regulate in the public interest,” including in the financial sector. And they point to this language in the investment chapter: “The mere fact that a Party takes or fails to take an action that may be inconsistent with an investor’s expectations does not constitute a breach” of minimum standard of treatment, “even if there is loss or damage to the covered investment as a result.”

But according to Wallach, “The language the Administration has pointed to as the fix is identical to what has been in trade agreements since CAFTA,” referring to a free trade deal with Central America. “Tribunals have systematically ignored it and continue to make broad interpretations.”

Public Citizen estimates that ISDS rulings carried out under U.S. free trade agreements and bilateral treaties have ordered over $3.6 billion in compensation to investors. To use one example, Exxon-Mobil won $17.3 million from Canada this year in an ISDS tribunal, after claiming that a law forcing offshore oil drillers to spend a percentage of revenues on local economic development violated the North American Free Trade Agreement. With the far larger amounts at stake in U.S. financial regulations, the compensation awards could be much higher.

Importantly, there is no ability to appeal an ISDS ruling, so even if countries believe it has been interpreted poorly, they cannot change the outcome and would owe potentially billions in compensation.

“We don’t see that this ISDS is watered-down at all,” said Celeste Drake, trade and globalization policy specialist for the AFL-CIO. “It actually doubles down by providing more access to challenge laws, especially financial services.”

The text is frustratingly circular about a country’s right to regulate. For example, there’s this sentence in the financial services chapter: “For greater certainty, nothing in this Chapter shall be construed to prevent a Party from adopting or enforcing measures necessary to secure compliance with laws or regulations that are not inconsistent with this Chapter.”

In other words, the TPP member country can adopt or enforce any law or regulation it wants — but only as long as it’s consistent with the agreement. This logic offers no additional protection beyond the agreement itself, and does not obviate the minimum standard of treatment obligation.

Excessive awards for violations would be likely to lead governments to repeal laws and regulations, as the U.S. is in the midst of doing with country-of-origin labeling for meat and poultry. In that case, the World Trade Organization ruled that the U.S. would face $2 billion in retaliatory tariffs unless it repeals the law. While the tariffs aren’t the same as the direct compensation to corporations under ISDS, the resulting financial pressure would similarly lead lawmakers to move to repeal.

Extending minimum standard of treatment in this fashion protects all of Wall Street, not just foreign firms, as domestic mega-banks would benefit from any repeal as much as their foreign colleagues.

The big takeaway is this: Former Citigroup executive Michael Froman, the U.S. trade representative, negotiated an agreement that will give Citi and all other banks a shot to undermine every future financial reform enacted.

“Expanding the financial chapter is an enormous expansion of the scope of the investor-state dispute system,” Lori Wallach concluded. “It opens up a Pandora’s box for financial services regulation.”

Public Citizen also estimates that over 1,000 new corporations from TPP member countries, representing over 9,200 subsidiaries in the United States, would now be able to launch ISDS cases. This nearly doubles the companies eligible for the ISDS process. It comes as ISDS cases have surged, with as many claims launched in the last four years as in the previous three decades.

The TPP, in fact, essentially acknowledges the dangerous threat ISDS represents to domestic laws by carving out tobacco companies from using the process to attack public health regulations. Other industries that spew carcinogens into the atmosphere, or harm citizens through other means, are not similarly restricted. “Tobacco is not the only dangerous thing in the world,” said John Sifton, Asia advocacy director for Human Rights Watch. “You could get a tobacco company to make the same point and they would be right.”