What happens to your home loan if the bank holding it as a portfolio loan becomes insolvent?

Nothing about your loan changes, and the terms you signed stay exactly as written. A mortgage has two sides: a liability to you, and an asset to whoever holds it. When a bank fails, its assets don't vanish. They get taken over by another institution, through an acquisition or a regulator-arranged transfer, and your mortgage moves with them. The new holder simply continues servicing the loan and collecting your payments. Your rate, balance, payment, and payoff date all survive the move, and that holds even for a low-rate portfolio loan the failing bank kept on its own books. The new owner can't rewrite your contract. They inherit it as-is. The one thing you may notice is a change in where you send your payment. If that happens, you'll get a formal notice naming the new servicer and address. Watch for that notice, confirm it's legitimate before redirecting any payment, and otherwise keep paying as normal. A bank's troubles are the bank's problem, and the loan you locked in stays yours.