The derivatives, known as interest-rate swaps, were supposed to protect Detroit from rising interest payments on a chunk of its variable rate debt. The banks would pay Detroit if interest rates rose, and Detroit would pay the banks if rates fell. By 2009, both interest rates and the city’s credit rating were falling, forcing Detroit to pay the banks some $50 million a year and to pledge roughly $11 million a month in casino-tax revenue as additional collateral.

In the settlement, Detroit will keep the casino-tax revenue. It will also reduce its debt load, according to city officials, because the banks have agreed to a discount of as much as 25 percent off what they are owed. But the haircut doesn’t mean that the banks will suffer. They have already made money on the swaps; the true extent of any discount will not be known until the deal is finalized.

This much is clear:

■ The banks’ 25 percent hit is nothing compared with the city’s suggested 90 percent cut to the pensions’ unfunded liability — which will result in benefit cuts that would be disastrous in both human and political terms and that the State of Michigan must prevent from happening.

■ Municipal officials are prey for Wall Street. The Dodd-Frank financial reform law called on regulators to establish “enhanced protection” for municipalities and other clients in their dealings with Wall Street, but the Securities and Exchange Commission has not yet completed rules, while the Commodity Futures Trading Commission’s rules are so weak as to virtually invite the banks to exploit municipalities.

■ The special treatment banks receive when debtors are in or near bankruptcy is unfair and economically destabilizing. Detroit’s agreement with the two banks requires court approval, but, in general, swap deals by banks are not subject to the constraints that normally apply in bankruptcy cases; in effect, the banks are paid first, even before other secured creditors and certainly before pensioners. That privilege, dating to the heyday of derivatives deregulation in the 1990s and 2000s, is destabilizing because the assurance of repayment fosters recklessness.