How does a refinance allow a mortgage to be repaid? A textbook I'm reading states (talking about the years leading up to the financial crisis):


  As long as housing prices increased, these mortgages were secure: the
  borrower 
      rapidly accumulated equity in the house that could be taken out in a refinance, 
      allowing the mortgage to be repaid.


How would this work exactly? I know that many people took out home equity loans, but I'm not exactly sure how accumulated equity would end up making liabilities easier to pay back.
Say you buy a house for \$100. This is paid with:


A \$10 down payment (from your own cash). (This is your equity.)
A \$90 loan from a bank at 10% annual interest. (We call this a mortgage loan or more simply a mortgage.)


Notice you're paying a relatively high interest rate of 10% on your mortgage, perhaps because the bank is not very confident that you'll be able to repay the loan.

Say that overnight, the value of the house rises by \$50 to \$150. Now your equity has also risen by \$50, from \$10 to \$60. You can now refinance your mortgage and ask the bank to lower the interest rate on your loan, say to 5%. You are certainly happy to do this refinancing because you'll pay a lower interest rate. And the bank might be willing to oblige because it is now more confident that you'll repay the loan.