JUDGED by their giant compensation bills, Wall Street's banks are in fine fettle. But pay is one of the few numbers in their accounts it is easy to make sense of. The investment banks may be booming but they remain black boxes. Both Goldman Sachs and Morgan Stanley, which reported a third-quarter profit of $498m on October 21st, continue to take high levels of trading risk.

The accounts of big, troubled banks—in particular Bank of America (BofA) and Citigroup—are awash with exceptional items, including tax gains and changes in the value of their own debt. After adjusting for the funny stuff, those two firms' common shareholders still made losses in the third quarter. Transparency did at least take a small step forwards at Wells Fargo, America's fourth-biggest bank by assets and its most taciturn. As well as unveiling a $2.6 billion profit, it announced this week (by press release) that it would start conducting conference calls for investors and stockmarket analysts from January.

Such gripes aside, there is a clear sense that things are improving. The big banks seem to think that the provisioning cycle for bad debts overall is at or near a peak. Meanwhile they are writing up the value of some of the toxic securities whose prices have bounced along with almost every other asset in the known universe. There are still minefields aplenty: the latest Moody's/REAL commercial-property price index showed another monthly decline, of 3%, in August, and credit cards remain weak for most firms. But the optimism that has prompted bank shares to soar (see chart) has a foundation. Better still, capital levels are improving as the biggest banks retain their profits, sell assets and exchange debt for common equity.

Still, as a policymaker or a taxpayer, it is hard to view the banking system with anything other than mild nausea. Most of the queasiness stems from the continued accumulation of bumper compensation packages. The Treasury's pay tsar is thought to be considering imposing deep pay cuts on the 25 most senior executives at firms it still owns shares in, including Citigroup and BofA. But since the bigwigs probably account for under 1% of the total compensation at those banks this would be a largely symbolic move.

The chances of a more severe government response is nevertheless growing. Now the emergency is over, the full horror of a banking system that is too big to fail is becoming ever more apparent. Both Goldman's and Morgan Stanley's value-at-risk numbers, a statistical measure of worst-case-scenario losses, remain high. Neither bank's balance-sheet is shrinking, although they do both have more safe assets like government bonds than a year ago.

At the remaining two big banks with state ownership, things still look very messy. Citigroup has stuck its nastiest bits, including consumer loans and toxic securities, into a separate division, but the hard part lies ahead. At $617 billion this unit's assets are about a third of Citi's total, and winding it down will be difficult. At BofA, too, the residual pong of empire-building is hard to ignore. It continues to book more bad debts from Countrywide, a mortgage lender it bought last year.

Yet if the investment banks and the two giant conglomerates present a big regulatory headache, as much concern should focus on those banks further down the scale. In the second quarter of this year America's banking system overall slipped into the red as bad-debt provisions mounted. There is likely to have been more pain in the third quarter. CreditSights, a research firm, reckons 600 to 1,100 of America's 8,200 banks may need help from, or winding down by, the Federal Deposit Insurance Corporation, compared with the 118 that have failed since the beginning of 2008.

Right now America's banking system resembles a pyramid. At the top, two or three firms are doing well. But beneath them are a handful of giant conglomerates that are struggling towards profits, a tier of middling banks with overexposure to risky assets, and a vast base of small banks in deep, deep trouble.