Banks have been fined a staggering $243 billion since the financial crisis, according to a tally released Tuesday.

Most of these fines have been assessed for misleading investors about the underlying quality of the mortgages they packaged into bonds during the housing bubble.

According to Keefe, Bruyette and Woods, which compiled the list, Bank of America BAC, -0.55% leads the ignominious tally with $76 billion in fines. JPMorgan Chase JPM, -0.21% has been fined nearly $44 billion, and a number of other big money-center banks have been fined over $10 billion. Thirteen banks make up 93% of the total.

It’s important to note that the banks don’t just send a check for their fines to federal and state governments. Many times they get credit by making loans and supporting debt restructuring. For example, a Goldman Sachs GS, +0.01% commitment for $1.8 billion of loan forgiveness and financing for affordable housing was considered as part of a $5.1 billion “fine” the bank had to pay.

Read:As Goldman settles, mortgage ‘consumer relief’ deals given mixed reviews

The actual cash the banks pay mostly goes to federal and state coffers without being earmarked for any particular use.

And despite the size of the fines, banks have been aggressively returning money to shareholders through stock buybacks and dividends. Even Wells Fargo WFC, +0.08% said it was looking to give more money back to shareholders after the Federal Reserve said it wouldn’t allow the San Francisco bank to grow any more after a wave of customer scandals.

The KBW report said it expects the fines to subside, both because of the time elapsed since the mortgage crisis as well as the deregulatory bent of the Trump administration. But the report said the Wells Fargo sanction, as well as levies against Rabobank and U.S. Bank over bank secrecy and anti-money-laundering violations, shows that the risk hasn’t disappeared.