This was co-authored by some federal reserve board members 2 years ago
https://www.brookings.edu/wp-content/uploads/2018/03/KimEtAl_Text.pdfIII.C. The Warehouse-Lending Process shows the two stages of the warehouse-lending process. In the initial stage, shown on the left side, the mortgage borrower is approved for a mortgage from the nonbank originator, who funds the mortgage using a draw from a line of credit provided by a warehouse lender. Typically, the warehouse lender will only fund about 95 percent of the mortgage balance, so that the nonbank originator has some skin in the game for each loan. The collateral on the loan is the mortgage, and the nonbank in turn transfers the mortgage to the warehouse lender to collateralize the draw on its line of credit. Since the passage of the Bankruptcy Abuse Prevention and Consumer Protection Act of 2005, mortgage-collateralized warehouse lending has been eligible for accounting and legal treatment as repurchase agreements (repos).
Next, turn to page 16:
III.D. Vulnerabilities of Warehouse Funding, to keep it simple its the equavlant to adding stop loss to every warehouse line of credit (which are used to fund mortgages). Since the margin call is on the loan for the mortgage instead of the mortgage itself, we don't see forclosures yet, but instead the margin call money is funded by the repo. Shawdow banks take the margin call. They pay the call via repo loan and pay that back via bonds, hence why the fed is buying those, junk bonds to be specific
Ginnie Mae servicers can only obtain unsecured financing, such as unsecured corporate bonds, to cover their advances. The rates on this financing are high, especially because many nonbanks have highyield credit ratings.
tl;dr most high risk mortgages(over 50% of total mortgages) that a bank wouldn't lend, was lent by shadow banks via a link of credit from the banks. Banks have tight stop losses set on these and have been issuing margin calls on tons of them.