How did the banks do on both? Pretty well, thank you — and better than homeowners and American taxpayers.

That is not only unfair, given banks’ huge culpability in the mortgage bubble and financial meltdown. It also means that homeowners and the economy still need more relief, and that the banks, without more meaningful punishment, will not be deterred from the next round of misbehavior.

Under the terms of the settlement, the banks will provide $26 billion worth of relief to borrowers and aid to states for antiforeclosure efforts. In exchange, they will get immunity from government civil lawsuits for a litany of alleged abuses, including wrongful denial of loan modifications and wrongful foreclosures. That $26 billion is paltry compared with the scale of wrongdoing and ensuing damage, including 4 million homeowners who have lost their homes, 3.3 million others who are in or near foreclosure, and more than 11 million borrowers who are underwater by $700 billion.

The settlement could also end up doing more to clean up the banks’ books than to help homeowners. Banks will be required to provide at least $17 billion worth of principal-reduction loan modifications and other relief, like forbearance for unemployed homeowners. Compelling the banks to do principal write-downs is an undeniable accomplishment of the settlement. But the amount of relief is still tiny compared with the problem. And the banks also get credit toward their share of the settlement for other actions that should be required, not rewarded.

For instance, they will receive 50 cents in credit for every dollar they write down on second liens that are 90 to 179 days past due, and 10 cents in credit for every dollar they write down on second liens that are 180 days or more overdue. At those stages of delinquency, the write-downs bring no relief to borrowers who have long since defaulted. Rather than subsidizing the banks’ costs to write down hopelessly delinquent loans, regulators should be demanding that banks write them off and take the loss — and bring some much needed transparency to the question of whether the banks properly value their assets.

The settlement’s complex formulas for delivering relief also give the banks too much discretion to decide who gets help, what kind of help, and how much. The result could be that fewer borrowers get help, because banks will be able to structure the relief in ways that are more advantageous for them than for borrowers. The Obama administration has said the settlement will provide about one million borrowers with loan write-downs, but private analysts have put the number at 500,000 to 700,000 over the next three years.

The settlement’s go-easy-on-the-banks approach might be understandable if the banks were still hunkered down. But most of the banks — which still benefit from crisis-era support in the form of federally backed debt and near zero interest rates — passed the recent stress tests, paving the way for Fed approval to increase dividends and share buybacks, if not immediately, then as soon as possible.

When it comes to helping homeowners, banks are treated as if they still need to be protected from drains on their capital. But when it comes to rewarding executives and other bank shareholders, paying out capital is the name of the game. And at a time of economic weakness, using bank capital for investor payouts leaves the banks more exposed to shocks. So homeowners are still bearing the brunt of the mortgage debacle. Taxpayers are still supporting too-big-to-fail banks. And banks are still not being held accountable.