Just as banks are beginning to work the massive amount of bad debt through their systems, a less obvious creature related to the once-booming housing market may pose a threat as mortgage rates decline and homeowners refinance.

Mortgage-servicing rights, or MSRs, comprise a relatively small portion of the more than $1 trillion balance sheets of the major banks. Most of these banks also hedge against the risk of sharp movements in interest rates and against refinancing booms -- like the one going on right now. But smaller firms whose MSR portfolios comprise a bigger portion of assets are far more exposed to losses, especially those who consider hedging too costly.

For instance, National City, a mid-cap bank that was based in Cleveland, posted hundreds of millions of dollars in hedging losses on its MSR portfolio before regulators pushed it into the arms of PNC Financial Services ( PNC) at the end of 2008. First Horizon's ( FHN) First Tennessee Bank has sold off tens of billions of dollars' worth of MSRs to reduce its exposure to such assets.

"A lot of them look at the cost to hedge that exposure, and that cost is pretty big," says Dale Conder, COO and chief risk officer at A10 Capital, which advises banks on commercial-real estate deals. "So what happens is this kind of domino effect where they say, 'No, we believe in our model and we're not going to hedge.' Then a big refinance boom takes hold and that model starts going out the door."

MSRs are the fees banks can collect from investors for collecting monthly payments made by home loan borrowers, putting money into escrow for taxes and insurance premiums and paying principal and interest to lenders. Banks acquire MSRs by either purchasing them or retaining the right to service loans that are securitized and sold off to investors.

"Mortgage companies love to retain the servicing because it's free money," says Lee Munson, who has a background in mortgage servicing and is chief investment officer of Portfolio LLC. "And it's a really stable business in better times."

If you liked this article you might like

14 Bank Stocks That Will Either Surge or Do Nothing

Goldman's Top Bank Stocks for the Rest of 2017

Don't Bank on PNC: It May Retest Highs, but Could Disappoint Longer-Term

Electronic Arts, Activision Blizzard and Take-Two Interactive: 'Mad Money' Lightning Round

Don't Let Stock Picking Scare You: Cramer's 'Mad Money' Recap (Wednesday 7/19/17)