Exhibit



EXHIBIT 10.40



MASTER REFINANCING AGREEMENT
BARCLAYS BANK PLC, as administrative agent for the Buyers and other Secured Parties  
(in such capacity, “Administrative Agent”),
BARCLAYS BANK PLC and NOMURA CORPORATE FUNDING AMERICAS, LLC,  
each as Buyer and other Buyers from time to time (“Buyers”),
BARCLAYS CAPITAL INC. and NOMURA SECURITIES INTERNATIONAL, INC.,  
each as an MSFTA Counterparty (“MSFTA Counterparties”),
DITECH FINANCIAL LLC, as a DIP Seller (“Ditech”),
REVERSE MORTGAGE SOLUTIONS, INC., as a DIP Seller (“RMS”), 
RMS REO BRC II, LLC, as a DIP Seller (“REO Subsidiary”), 
and
DITECH HOLDING CORPORATION, as guarantor (“Guarantor”)
Dated as of February 14, 2019


 



2014058.10-NYCSR07A - MSW



TABLE OF CONTENTS
Page



ARTICLE 1: DEFINITIONS................................................................................................2
ARTICLE 2: CONDITIONS PRECEDENT TO  EFFECTIVE DATE AND INITIAL FUNDINGS...........................................................................................................15
ARTICLE 3: [RESERVED]................................................................................................17
ARTICLE 4: CERTAIN COVENANTS.............................................................................17
ARTICLE 5: EVENTS OF DEFAULT................................................................................19
ARTICLE 6: REMEDIES...................................................................................................24
ARTICLE 7: FEES AND EXPENSES...............................................................................25
ARTICLE 8: MILESTONES..............................................................................................26
ARTICLE 9: REPORTING................................................................................................27
A. Cash Flow Forecasts..........................................................................................27
B. Other Reporting..................................................................................................27
ARTICLE 10: CONFLICTS...............................................................................................27
ARTICLE 11: MISCELLANEOUS...................................................................................28


SCHEDULES AND EXHIBITS:


Schedule I:    Certain Closing Documents
Schedule II:    Specified Existing Program Agreements
Exhibit A:     Prepetition Warehouse Facility Agreements
Exhibit B:     Interim DIP Order
Exhibit C:     Form of Officer’s Compliance Certificate


i
2014058.10-NYCSR07A - MSW






This MASTER REFINANCING AGREEMENT, dated as of February 14, 2019 (as amended, restated, supplemented or otherwise modified from time to time, this “Master Refinancing Agreement”), is entered into by and among BARCLAYS BANK PLC (“Barclays”), as administrative agent for the Buyers and other Secured Parties (as defined below) (including the “Buyers” party hereto) (in such capacity, “Administrative Agent”), BARCLAYS, as a Buyer (as defined below), NOMURA CORPORATE FUNDING AMERICAS, LLC (“Nomura”), as a Buyer, BARCLAYS CAPITAL INC. (“Barclays Capital”), as an MSFTA Counterparty (as defined below), NOMURA SECURITIES INTERNATIONAL, INC. (“Nomura Securities”), as an MSFTA Counterparty, DITECH FINANCIAL LLC (“Ditech”), REVERSE MORTGAGE SOLUTIONS, INC. (“RMS” and, together with Ditech, the “Sellers”), RMS REO BRC II, LLC (the “REO Subsidiary” and together with the Sellers, the “DIP Sellers”), and DITECH HOLDING CORPORATION (“Guarantor”).
Recitals
WHEREAS, on February 11, 2019, the Guarantor, Ditech, RMS and certain of their Affiliates filed the Cases (defined below) in the Bankruptcy Court (defined below);
WHEREAS, in connection with the Cases, the Sellers and certain of their Affiliates propose to refinance and replace in full the facilities contained in the Prepetition Warehouse Facility Agreements (as defined below);
WHEREAS, concurrently with the effectiveness of this Master Refinancing Agreement, the Administrative Agent, Buyers, and Ditech are entering into that certain Master Repurchase Agreement, dated as of the Effective Date (as amended, restated, supplemented or otherwise modified from time to time, the “Ditech Repurchase Agreement”);
WHEREAS, concurrently with the effectiveness of this Master Refinancing Agreement, the Administrative Agent, Buyers, RMS, and the REO Subsidiary are entering into that certain Amended and Restated Master Repurchase Agreement, dated as of the Effective Date (as amended, restated, supplemented or otherwise modified from time to time, the “RMS Repurchase Agreement”);
WHEREAS, Ditech Agency Advance Trust, as issuer (“SAF Agency Issuer”), Wells Fargo Bank, N.A. (“Wells Fargo”), as indenture trustee, calculation agent, paying agent and securities intermediary (in such capacities, the “SAF Agency Indenture Trustee”), Ditech, and Credit Suisse First Boston Mortgage Capital LLC, as administrative agent (in such capacity, the “Prior SAF Agency Agent”), previously entered into that certain Indenture, dated as of February 9, 2018, and effective as of February 12, 2018 (as amended, restated, supplemented or otherwise modified from time to time, including, but not limited to, by the SAF Agency Indenture Supplement (as defined below), the “SAF Agency Indenture”);
WHEREAS, concurrently with the effectiveness of this Master Refinancing Agreement, SAF Agency Issuer, SAF Agency Indenture Trustee, Ditech, Barclays, as administrative agent (in such capacity, the “DIP SAF Agency Agent”), and Barclays, as an SAF Agency Noteholder (as defined below), are entering into that certain Series 2019-VF1 Indenture Supplement, dated as 


1
2014058.10-NYCSR07A - MSW





of the Effective Date (as amended, restated, supplemented or otherwise modified from time to time, the “SAF Agency Indenture Supplement”);
WHEREAS, Ditech PLS Advance Trust II, as issuer (“SAF PLS Issuer” and together with the SAF Agency Issuer, the “SAF SPVs”), Wells Fargo, as indenture trustee, calculation agent, paying agent and securities intermediary (in such capacities, the “SAF PLS Indenture Trustee”), Ditech, and Credit Suisse First Boston Mortgage Capital LLC, as administrative agent (in such capacity, the “Prior SAF PLS Agent”), previously entered into that certain Indenture, dated as of February 9, 2018, and effective as of February 12, 2018 (as amended, restated, supplemented or otherwise modified from time to time, including, but not limited to, by the SAF PLS Indenture Supplement (as defined below), the “SAF PLS Indenture” and, together with the SAF Agency Indenture, the “Indentures”);
WHEREAS, concurrently with the effectiveness of this Master Refinancing Agreement, SAF PLS Issuer, SAF PLS Indenture Trustee, Ditech, Barclays, as administrative agent (in such capacity, the “DIP SAF PLS Agent”), and Barclays, as an SAF PLS Noteholder (as defined below), are entering into that certain Series 2019-VF1 Indenture Supplement, dated as of the Effective Date (as amended, restated, supplemented or otherwise modified from time to time, the “SAF PLS Indenture Supplement”);
WHEREAS, pursuant to each Repurchase Agreement, the Buyers party thereto from time to time shall agree to enter into Transactions (as defined in such Repurchase Agreement) for the purchase of mortgage loans or other assets as described therein (collectively, the “Purchased Assets”) from the DIP Sellers party thereto, subject to the applicable DIP Sellers’ obligation to repurchase such Purchased Assets at the Repurchase Price (as defined in such Repurchase Agreement) on or prior to the Repurchase Date (as defined in such Repurchase Agreement);
WHEREAS, pursuant to each Indenture, the Buyers party thereto from time to time shall agree to fund certain VFN Draws (as defined in such Indenture) to the SAF SPV party thereto (collectively, the “VFN Draws”), which VFN Draws are secured by certain Receivables (as defined in such Indenture) and are evidenced by one or more variable funding promissory notes, subject to such SAF SPV’s obligation to repay such VFN Draws on or prior to the Expected Repayment Date (as defined in such Indenture); and
WHEREAS, the parties hereto desire to enter into this Master Refinancing Agreement in order to set out certain provisions regarding, inter alia, (i) certain common conditions precedent to the occurrence of the Effective Date and each Funding Date, (ii) certain common covenants of the Guarantor, the DIP Sellers and certain of their Affiliates, and (iii) certain common Events of Default, in each case, under the Governing Agreements, as applicable.
NOW, THEREFORE, in consideration of the mutual covenants contained herein and for other good and valuable consideration, the parties hereto, intending to be legally bound, hereby agree as follows:


2
2014058.10-NYCSR07A - MSW






ARTICLE 1:DEFINITIONS
A.    Capitalized terms used but not otherwise defined herein shall have the meanings given to them in the Repurchase Agreements, the Master DIP Fee Letter, the Indentures and DIP Guaranty, as applicable, unless otherwise indicated or amended or supplemented hereby.
B.    All references to “Program Agreements” and “Program Documents” herein and in each Repurchase Agreement shall be deemed to include this Master Refinancing Agreement, the Netting Agreement, the Master DIP Fee Letter, the DIP Guaranty and the Administration Agreement. 
C.    Whenever used in this Master Refinancing Agreement, the following words and phrases, unless context otherwise requires, shall have the following meanings:
“Acceptable Plan” shall mean a chapter 11 plan of reorganization in the Cases that (a) provides for the termination of the commitments of the Secured Parties under the DIP Warehouse Facility Agreements on the effective date of such plan, (b) provides for the payment in full in cash of all obligations of the Guarantor, the DIP Sellers, the SAF SPVs and the Depositors with respect to the DIP Warehouse Facility Agreements on the effective date of such plan, (c) contains release, indemnification and exculpatory provisions relating to the Secured Parties that are satisfactory to the Administrative Agent (with the consent of the Required Buyers in their sole discretion), (d) is otherwise in form and substance reasonably satisfactory to the Buyers, and (e) contemplates effectiveness of such plan no later than the Stated Termination Date.
“Acceptable Sale Agreement” shall mean an initial Sale Agreement or replacement Sale Agreement, as the case may be, that satisfies each of the requirements listed below and shall otherwise, in form and substance, be acceptable to Buyers in their reasonable discretion:
(a)    The agreement shall be in form and substance reasonably satisfactory to Administrative Agent (at the direction of Required Buyers).
(b)    Without limiting the generality of clause (a) above, the agreement shall not be subject to any diligence or financing conditions and the proposed purchaser(s) shall have obtained all requisite corporate/organizational approvals, and has obtained, or is reasonably likely to obtain all necessary governmental and third-party consents, within a time frame such that the contemplated sale is capable of being consummated in accordance with the Chapter 11 Milestones prior to the Stated Termination Date. 
(c)    The proposed purchaser(s) is/are capable of consummating the sale in accordance with the Chapter 11 Milestones prior to the Stated Termination Date, after taking into account all relevant legal, regulatory, and business considerations.
(d)    The proposed purchaser(s) shall have provided such financial and other information demonstrating the proposed purchaser’s or purchasers’ financial wherewithal and business capabilities to fulfill all obligations in connection with the transactions 


3
2014058.10-NYCSR07A - MSW





contemplated by the agreement, including, without limitation, any equity or debt financing commitment letters.
(e)    The agreement shall provide for (i) the termination of the commitments of the Secured Parties under the DIP Warehouse Facility Agreements and (ii) net cash proceeds in an aggregate amount sufficient for the payment in full in cash of all obligations of the Guarantor, the DIP Sellers, the SAF SPVs and the Depositors with respect to the DIP Warehouse Facility Agreements, the DIP Guaranty and this Master Refinancing Agreement, in each case, after giving effect to the closing(s) of the sale(s) contemplated thereby in accordance with the terms of such agreement(s).
“Act of Insolvency” shall mean, with respect to any Person, (a) the filing of a petition, commencing, or authorizing the commencement of any case or proceeding, or the voluntary joining of any case or proceeding under any bankruptcy, insolvency, reorganization, liquidation, dissolution or similar law relating to the protection of creditors, or suffering any such petition or proceeding to be commenced by another which is consented to, not timely contested or results in entry of an order for relief; (b) the seeking of the appointment of a receiver, trustee, custodian or similar official for such party or any substantial part of the property of either; (c) the appointment of a receiver, conservator, or manager for such party by any governmental agency or authority having the jurisdiction to do so; (d) the making or offering by such party of a composition with its creditors or a general assignment for the benefit of creditors; (e) the admission by such party of its inability to pay its debts or discharge its obligations as they become due or mature; or (f) that any governmental authority or agency or any person, agency, or entity acting or purporting to act under governmental authority shall have taken any action to condemn, seize or appropriate, or to assume custody or control of, all or any substantial part of the property of such party, or shall have taken any action to displace the management of such party or to curtail its authority in the conduct of the business of such party.
“Adjusted Tangible Net Worth” means, with respect to any Seller, the Net Worth of such Seller on a consolidated basis minus (a) all intangible assets determined in accordance with GAAP (including goodwill and excluding originated and purchased mortgage servicing rights of such Seller) and (b) any and all advances to, investments in and receivables from Affiliates of Seller (in the case of RMS, other than with respect to RMS and Subsidiaries of RMS).
“Administration Agreement” shall mean that certain Master Administration Agreement, dated as of the Effective Date, by and among (i) the Administrative Agent, (ii) the Buyers party thereto from time to time, (iii) the MSFTA Counterparties, and (iv) the DIP Sellers, as it may be amended, restated, supplemented or otherwise modified from time to time. 
“Administrative Agent” shall have the meaning assigned to such term in the Preamble.
“Agency” shall mean any of Fannie Mae, Freddie Mac, Ginnie Mae, HUD, or the FHA or any person, agency or entity acting or purporting to act under governmental authority on behalf of any of the foregoing.


4
2014058.10-NYCSR07A - MSW





“Bankruptcy Code” shall mean title 11 of the United States Code, 11 U.S.C. § 101, et seq., as amended from time to time.
“Bankruptcy Court” shall mean the United States Bankruptcy Court for the Southern District of New York having jurisdiction over the Cases or any other court having jurisdiction over the Cases, including, to the extent of the withdrawal of any reference under 28 U.S.C. § 157, the United States District Court for the Southern District of New York. 
“Barclays” shall have the meaning assigned to such term in the Preamble.
“Barclays Capital” shall have the meaning assigned to such term in the Preamble.
“Barclays MSFTA” shall mean that certain Master Securities Forward Transaction Agreement, dated as of May 18, 2017, between Barclays Capital, and Ditech, as amended by that certain Amendment dated as of June 15, 2017, as further amended, restated, supplemented or otherwise modified from time to time.
“Business Day” shall mean any day other than (i) a Saturday or Sunday; (ii) a day on which the New York Stock Exchange or the Federal Reserve Bank of New York is authorized or obligated by law or executive order to be closed or (iii) a public or bank holiday in New York City.
“Buyers” shall mean collectively, (a) with respect to any Repurchase Agreement, Barclays, Nomura and their respective successors in interest and permitted assigns, as “Buyers” or “Purchasers”, as the case may be, under such Repurchase Agreement, (b) with respect to the SAF Agency Indenture, the SAF Agency Noteholders, and (c) with respect to the SAF PLS Indenture, the SAF PLS Noteholders.
“Carve-Out” shall have the meaning assigned to such term in the DIP Orders.
“Cases” shall mean the cases under chapter 11 of the Bankruptcy Code commenced by the Guarantor, Ditech, RMS and the other Debtors in the Bankruptcy Court and styled as In re Ditech Holding Corporation, et al., Case No. 19-10412. 
“Change in Control” shall mean:
(a)     any transaction or event as a result of which Guarantor ceases to own, directly or indirectly, 100% of the stock of each Seller;
(b)     the sale, transfer, or other disposition of all or substantially all of Seller’s assets (excluding any such action taken in connection with any securitization transaction or routine sales of mortgage loans or routine sales of mortgage servicing rights); or
(c)    the consummation of a merger or consolidation of Guarantor with or into another entity or any other corporate reorganization, if more than 50% of the combined voting power of the continuing or surviving entity’s equity outstanding immediately after such merger, consolidation or such other reorganization is owned by persons who were not equityholders of the Guarantor immediately prior to such merger, consolidation or other reorganization


5
2014058.10-NYCSR07A - MSW





“Chapter 11 Milestones” shall have the meaning assigned to such term in Article 8.
“Collateral” shall mean, collectively, (a) the “Repurchase Assets”, the “Purchased Assets” and the “Purchased Items”, as defined in the related Repurchase Agreement, (b) the collateral under the Netting Agreement, (c) all “Collateral” as defined in each Indenture, (d) all “DIP Collateral” as defined in the DIP Orders and (e) all other assets of any DIP Seller, Depositor, SAF SPV or any of their respective Affiliates subject to a Lien securing all or any portion of the Secured Obligations.
“Commitment Letter” shall mean that certain commitment letter, dated February 8, 2019, among the Guarantor, Ditech, RMS, Barclays and Nomura.
“CP Conduit” shall mean a commercial paper conduit administered, managed or supported by any Buyer or by a Person who, directly or indirectly is in control of, or is controlled by, or is under common control with any Buyer.
“Debtor Relief Law” shall mean any law, administration, or regulation relating to reorganization, winding up, administration, composition or adjustment of debts or otherwise relating to bankruptcy or insolvency.
“Debtors” shall mean, collectively, the Guarantor; Ditech; RMS; DF Insurance Agency LLC; Green Tree Credit LLC; Green Tree Credit Solutions LLC; Green Tree Insurance Agency of Nevada, Inc.; Green Tree Investment Holdings III LLC; Green Tree Servicing Corp.; Marix Servicing LLC; Mortgage Asset Systems, LLC; REO Management Solutions, LLC; Walter Management Holding Company LLC; and Walter Reverse Acquisition  LLC.  The Debtors shall not include the REO Subsidiary, any Depositor, or any SAF SPV.
“Default” shall mean an Event of Default or an event that with notice or lapse of time or both would become an Event of Default.
“Default Rate” shall mean (a) with respect to the Ditech Repurchase Agreement, “Post Default Rate” as defined therein, (b) with respect to the RMS Repurchase Agreement, “Default Rate” as defined therein, and (c) with respect to any other Repurchase Agreement “Post Default Rate” or “Default Rate”, as the case may be, as defined in such Repurchase Agreement.
“Depositor Equity Pledge Agreement” shall mean that certain Depositor Equity Pledge Agreement, dated as of the Effective Date, by Ditech in favor of the Administrative Agent, and acknowledged and agreed to by the Depositors.
“Depositors” shall mean, collectively, the SAF Agency Depositor and the SAF PLS Depositor.
“Designated MSFTA” shall mean any Master Securities Forward Transaction Agreement, by and between (i) Ditech and (ii) a Person who becomes a Buyer under the Ditech Repurchase Agreement pursuant to an assignment in accordance with Article 5 of the Administration Agreement, or an Affiliate of such a Buyer, as amended, restated, supplemented or otherwise modified from time to time; provided that, in connection with such assignment, (x) Ditech shall have delivered to 


6
2014058.10-NYCSR07A - MSW





the Administrative Agent and the other Buyers party to the Ditech Repurchase Agreement a written request to designate such Master Securities Forward Transaction Agreement as a “Designated MSFTA” for purposes of this Master Refinancing Agreement, and (y) the Administrative Agent and the Buyers contemplated to continue being parties to the Ditech Repurchase Agreement immediately after giving effect to such assignment shall have consented to such designation.
“DIP Guaranty” shall mean that certain Master DIP Guaranty, dated as of the Effective Date, by Guarantor in favor of Administrative Agent, for the benefit of the Buyer Parties (as defined therein), as amended, restated, supplemented or otherwise modified from time to time.
“DIP HMBS Repurchase Agreement” shall mean any repurchase agreement for Ginnie Mae Tail HMBS (as defined in the RMS Repurchase Agreement) that is entered into after the Effective Date as contemplated by Article 11.E.2 hereof, between (i) RMS and (ii) a Person who is a Buyer under the RMS Repurchase Agreement, or an Affiliate of such a Buyer, as amended, restated, supplemented or otherwise modified from time to time; provided that, prior to the effectiveness thereof, (x) RMS shall have delivered to the Administrative Agent and the other Buyers party to the RMS Repurchase Agreement a written request to designate such repurchase agreement as a “DIP HMBS Repurchase Agreement” for purposes of this Master Refinancing Agreement, and (y) the Administrative Agent and such Buyers shall have consented to such designation.
“DIP Maturity Date Event of Default” shall mean a failure to do each of the following on or before the earliest to occur of the dates referred to in clauses (a), (c) and (d) of the definition of Termination Date: (i) pay the Secured Obligations in full in cash, (ii) reduce the Maximum Available Funding for each Governing Agreement and the Maximum Combined Purchase Price to zero and (iii) terminate any other commitment of any Secured Party to extend credit under, or enter into transactions pursuant to, any of the DIP Warehouse Facility Agreements.
“DIP Orders” shall mean the Interim DIP Order and the Final DIP Order related to the Cases.  
“DIP SAF Agency Agent” shall have the meaning assigned to such term in the Recitals.
“DIP SAF PLS Agent” shall have the meaning assigned to such term in the Recitals.
“DIP Sellers” shall have the meaning assigned to such term in the Preamble.
“DIP Superpriority Claims” shall have the meaning assigned to such term in the DIP Orders.
“DIP Warehouse Facility Agreements” shall mean, collectively, (a) the DIP Orders, (b) this Master Refinancing Agreement, (c) the DIP Guaranty, (d) the Netting Agreement, (e) the Administration Agreement, (f) the MSFTAs, (g) the Ditech Repurchase Agreement and the related Program Agreements, (h) the RMS Repurchase Agreement and the related Program Agreements, (i) any other Repurchase Agreement and the related Program Agreements, (j) the SAF Agency Indenture and the related Program Agreements, (k) the Master DIP Fee Letter, (l) SAF PLS Indenture and the related Program Agreements and (m) the Depositor Equity Pledge Agreement.
“Ditech” shall have the meaning assigned to such term in the Preamble.


7
2014058.10-NYCSR07A - MSW





“Ditech/Fannie Agreement” shall mean the Mortgage Selling and Servicing Contract with Fannie Mae and the Fannie Mae Selling Guide, together with all supplements, addenda and amendments thereto and incorporating all of the applicable guides. 
“Ditech/Freddie Agreement” shall mean that certain Master Agreement with Freddie Mac and the Freddie Mac Single Family Seller/Servicing Guide, together with all supplements, addenda and amendments thereto and incorporating all of the applicable guides, described in more detail on Schedule 1 to the SAF Agency Indenture (as such schedule may be updated from time to time pursuant to the SAF Agency Indenture).
“Ditech/Ginnie Agreement” shall mean those certain Guaranty Agreements and Master Servicing Agreement between Ditech and Ginnie Mae, together with all supplements, addenda and amendments thereto and incorporating all the applicable guides.
“Ditech Repurchase Agreement” shall have the meaning assigned to such term in the Recitals.
“Dollars”, “U.S. Dollars” and “$” means dollars in lawful currency of the United States of America.
“Effective Date” shall mean the first Business Day on which each of the conditions precedent set forth in Article 2 shall have been satisfied or waived by the Administrative Agent (at the direction of Required Buyers in their sole discretion).
“Event of Default” shall have the meaning assigned to such term in the Article 5.
“FHA” means the Federal Housing Administration, an agency within HUD, or any successor thereto, and including the Federal Housing Commissioner and the Secretary of Housing and Urban Development where appropriate under the FHA regulations.
“Final Cash Management Order” shall mean a final order entered by the Bankruptcy Court related to the Cases, in form and substance satisfactory to Administrative Agent and the Buyers, authorizing, inter alia, Ditech to continue using existing cash management system, bank accounts and business forms and implementing changes to the cash management system.
“Final DIP Order” shall mean a final financing and cash collateral order entered by the Bankruptcy Court related to the Cases, and in form and substance satisfactory to the Administrative Agent and the Buyers. 
“Final Ditech OCB Order” shall mean a final order entered by the Bankruptcy Court related to Ditech’s Case, in form and substance satisfactory to Administrative Agent and the Buyers, authorizing, inter alia, Ditech to continue in the ordinary course to perform its obligations under (x) the Ditech/Fannie Agreement, (y) the Ditech/Freddie Agreement, and (z) the Ditech/Ginnie Agreement.
“Final OCB Orders” shall mean, collectively, the Final Ditech OCB Order and the Final RMS OCB Order.


8
2014058.10-NYCSR07A - MSW





“Final RMS OCB Order” shall mean a final order entered by the Bankruptcy Court related to RMS’ Case, in form and substance satisfactory to Administrative Agent and the Buyers, authorizing, inter alia, RMS to perform under all RMS/Ginnie/HUD Agreements.
“First Lien Term Loan Collateral” shall have the meaning assigned to such term in the DIP Orders.
“First Lien Term Loan Obligations” shall have the meaning assigned to such term in the DIP Orders.
“Funding” shall mean, collectively, (a) the “Purchase Price” and “Purchase Price Increase” as defined under each Repurchase Agreement, as applicable, and (b) the “VFN Draw” as defined under each Indenture.
“GA Selling and Servicing Agreements” shall mean, collectively, the Ditech/Fannie Agreement, the Ditech/Freddie Agreement, the Ditech/Ginnie Agreement and the RMS/Ginnie/HUD Agreements.
“GAAP” means generally accepted accounting principles in effect from time to time in the United States of America and applied on a consistent basis.
“Governing Agreements” shall mean, collectively, the Repurchase Agreements and the Indentures.
“Guarantor” shall have the meaning assigned to such term in the Preamble.
“Hedging Transaction” shall mean, any transaction that constitutes a short sale of a U.S. Treasury Security, or any transaction related to an ISDA or Master Securities Forward Transaction Agreement, futures contract, or options related contract, or swap, cap or collar agreement.
“HUD” means the United States Department of Housing and Urban Development or any successor thereto.
“Immediate Event of Default” shall mean the occurrence of any of the following:  (i) the loss of any DIP Seller’s status as either (x) an approved servicer or (y) an approved issuer, with Fannie Mae, Freddie Mac, or Ginnie Mae, as applicable, (ii) the Event of Default set forth in Section 5.21 hereof titled “Exercise of Remedies by Other Creditors”, (iii) the Event of Default set forth in Section 5.9 hereof titled “Conversion of any of the Cases”, or (iv) the DIP Maturity Date Event of Default.
“Indentures” shall have the meaning assigned to such term in the Recitals.
“Initial Maximum Combined Purchase Price” shall mean ONE BILLION NINE HUNDRED MILLION DOLLARS ($1,900,000,000).
“Interim Cash Management Order” shall mean an interim order entered by the Bankruptcy Court related to the Cases, in form and substance satisfactory to Administrative Agent and the 


9
2014058.10-NYCSR07A - MSW





Buyers, authorizing, inter alia, Ditech to continue using existing cash management system, bank accounts and business forms and implementing changes to the cash management system.
“Interim DIP Order” shall mean an interim financing and cash collateral order entered by the Bankruptcy Court related to the Cases, and in the form substantially attached hereto as Exhibit B or otherwise in form and substance satisfactory to the Administrative Agent and the Buyers.
“Interim Ditech OCB Order” shall mean an interim order entered by the Bankruptcy Court related to Ditech’s Case, in form and substance satisfactory to Administrative Agent and the Buyers, authorizing, inter alia, Ditech to continue in the ordinary course to perform its obligations under (x) the Ditech/Fannie Agreement, (y) the Ditech/Freddie Agreement, and (z) the Ditech/Ginnie Agreement.
“Interim OCB Orders” shall mean, collectively, the Interim Ditech OCB Order and the Interim RMS OCB Order.
“Interim RMS OCB Order” shall mean an interim order entered by the Bankruptcy Court related to RMS’ Case, in form and substance satisfactory to Administrative Agent and the Buyers, authorizing, inter alia, RMS to perform under all RMS/Ginnie/HUD Agreements.
“Lien” shall mean any mortgage, lien, pledge, charge, security interest or similar encumbrance.
“Limited Guaranty” shall mean, with respect to each Indenture and the related Program Agreements, the limited guaranty obligations of the Guarantor contained in any Receivables Sale Agreement (as defined in such Indenture) in respect of the transactions contemplated by such Indenture.
“Master DIP Fee Letter” shall mean that certain Master DIP Fee Letter, dated as of the Effective Date, among Administrative Agent, Buyers, Ditech, RMS and acknowledged by the Guarantor, as may be amended, restated or supplemented or otherwise modified from time to time.
“Master Refinancing Agreement” shall have the meaning assigned to such term in the Preamble.
“Material Adverse Effect” shall mean (a) a material adverse change in, or a material adverse effect upon, the operations, business, properties, or condition (financial or otherwise) of a DIP Seller, or any affiliate thereof that is a party to any DIP Warehouse Facility Agreement taken as a whole, other than as customarily occurs as a result of events leading up to and following the commencement of a proceeding under chapter 11 of the Bankruptcy Code by the Debtors and the commencement of the Cases or any Specified Act of Insolvency with respect to the Guarantor or any Seller; (b) a material impairment of the ability of a DIP Seller, Guarantor or any affiliate thereof that is a party to any DIP Warehouse Facility Agreement to perform under any DIP Warehouse Facility Agreement and to avoid any Event of Default; or (c) a material adverse effect upon the legality, validity, binding effect or enforceability of any DIP Warehouse Facility Agreement against a DIP Seller, Guarantor or any affiliate thereof that is a party to any DIP Warehouse Facility Agreement, in each case as 


10
2014058.10-NYCSR07A - MSW





determined by the Administrative Agent (at the direction of the Required Buyers in their sole discretion).
“Maximum Available Funding” shall have the meaning assigned to such term in the Administration Agreement.
“Maximum Combined Purchase Price” shall mean the Initial Maximum Combined Purchase Price, which amount shall automatically and permanently be reduced on a dollar-for-dollar basis by the amount of any permanent reduction to the Maximum Available Funding under any of the Governing Agreements.
“MSFTA” shall mean, collectively, the Barclays MSFTA, the Nomura MSFTA, and any Designated MSFTA.
“MSFTA Counterparties” shall mean, collectively, (a) Barclays Capital, (b) Nomura Securities, and (c) any other Buyer under the Ditech Repurchase Agreement, or Affiliate of such a Buyer, that is party to a Designated MSFTA, in each case, in its capacity as a party to an MSFTA.
“National Founders Facility” shall mean that certain Participation Interest Sale and Contribution Agreement, dated as of October 1, 2018, by and among RMS and RMS 2018-09, LLC, and the related Note Purchase Agreement of even date therewith, between RMS 2018-09, LLC and National Founders LP.
“Net Worth” means, with respect to any Seller, an amount equal to, on a consolidated basis, such Seller’s stockholder equity (determined in accordance with GAAP).
“Netting Agreement” shall mean that certain Margin, Setoff And Netting Agreement, dated as of the Effective Date, among Administrative Agent, the Buyers party thereto, the MSFTA Counterparties party thereto, DIP Sellers, and acknowledged by Guarantor, in form and substance acceptable to Barclays, as amended, restated, supplemented or otherwise modified from time to time.
“Nomura” shall have the meaning assigned to such term in the Preamble.
“Nomura MSFTA” shall mean that certain Master Securities Forward Transaction Agreement, dated as of May 20, 2013, between Nomura Securities and Ditech, as amended by that certain Amendment dated as of July 11, 2017, as further amended, restated, supplemented or otherwise modified from time to time.
“Nomura Securities” shall have the meaning assigned to such term in the Preamble.
“Non-Recourse Indebtedness” means an obligation for borrowed money secured by a lien on any property owned by a Person, with respect to which obligation the Person has not assumed or become liable for the payment thereof. 


11
2014058.10-NYCSR07A - MSW





“Officer’s Compliance Certificate” shall mean an officer’s certificate substantially in the form attached hereto as Exhibit C or such other form as is reasonably acceptable to the Administrative Agent.
“Original Hedges” shall have the meaning assigned to such term in Section 5.18.
“Person” shall mean an individual, partnership, corporation (including a business trust), limited liability company, joint stock company, trust, unincorporated association, joint venture or other entity, or a government or any political subdivision or agency thereof.
“Petition Date” shall mean the date of the filing of the chapter 11 petitions commencing the Cases.
“Prepetition 1L Agent” shall mean the “First Lien Term Loan Agent” (as such term is defined in the DIP Orders).
“Prepetition 1L Credit Agreement” shall mean the “First Lien Term Loan Credit Agreement” (as such term is defined in the DIP Orders).
“Prepetition 1L Lenders” shall mean the “First Lien Term Loan Lenders” (as such term is defined in the DIP Orders).
“Prepetition 1L Secured Parties” shall mean the “First Lien Term Loan Parties” (as such term is defined in the DIP Orders).
“Prepetition 1L/2L Documents” shall have the meaning assigned to such term in the DIP Orders.
“Prepetition 1L/2L Parties” shall have the meaning assigned to such term in the DIP Orders.
“Prepetition 2L Trustee” shall mean the “Second Lien Notes Indenture Trustee” (as such term is defined in the DIP Orders).
“Prepetition Warehouse Facility Agreements” shall mean the agreements identified on Exhibit A hereto. 
“Prior SAF Agency Agent” shall have the meaning assigned to such term in the Recitals.
“Prior SAF PLS Agent” shall have the meaning assigned to such term in the Recitals.
“Program Agreements” shall mean (a) with respect to the Ditech Repurchase Agreement, “Program Agreements” as defined therein, (b) with respect to the RMS Repurchase Agreement, “Program Documents” as defined therein, (c) with respect to any other Repurchase Agreement “Program Agreements” or “Program Documents”, as the case may be, as defined in such Repurchase Agreement, (d) with respect to the SAF Agency Indenture, “Transaction Documents” as defined therein, and (e) with respect to the SAF PLS Indenture, “Transaction Documents” as defined therein.


12
2014058.10-NYCSR07A - MSW





“Purchased Assets” shall have the meaning assigned to such term in the Recitals.
“REO Subsidiary” shall have the meaning assigned to such term in the Preamble.
“Repurchase Agreements” shall mean, collectively, (a) the Ditech Repurchase Agreement, (b) the RMS Repurchase Agreement, and (c) any DIP HMBS Repurchase Agreement.
“Required Buyers” shall have the meaning assigned to such term in the Administration Agreement.
“RMS” shall have the meaning assigned to such term in the Preamble.
“RMS Repurchase Agreement” shall have the meaning assigned to such term in the Recitals.
“RMS/Ginnie/HUD Agreements” shall mean all applicable agreements with RMS, on the one hand, and Ginnie Mae and/or HUD, on the other hand, together with all supplements, addenda and amendments thereto and incorporating all the applicable guides.
“RSA” shall mean that certain Restructuring Support Agreement, dated as of February 8, 2019, among the Guarantor and the Prepetition 1L Lenders party thereto as “Consenting Term Lenders” (as defined therein).
“SAF Agency Depositor” shall mean Ditech Agency Advance Depositor LLC, as Depositor under and as defined in the SAF Agency Indenture.
“SAF Agency Indenture” shall have the meaning assigned to such term in the Recitals.
“SAF Agency Indenture Supplement” shall have the meaning assigned to such term in the Recitals.
“SAF Agency Indenture Trustee” shall have the meaning assigned to such term in the Recitals.
“SAF Agency Issuer” shall have the meaning assigned to such term in the Recitals.
“SAF Agency Noteholders” shall mean Barclays and each other Noteholder of the Series 2019-VF1 Notes (as such terms are defined in the SAF Agency Indenture) and their respective successors in interest and permitted assigns in such capacity.
“SAF PLS Depositor” shall mean Ditech PLS Advance Depositor LLC, as Depositor under and as defined in the SAF PLS Indenture.
“SAF PLS Indenture” shall have the meaning assigned to such term in the Recitals.
“SAF PLS Indenture Supplement” shall have the meaning assigned to such term in the Recitals.
“SAF PLS Indenture Trustee” shall have the meaning assigned to such term in the Recitals.


13
2014058.10-NYCSR07A - MSW





“SAF PLS Issuer” shall have the meaning assigned to such term in the Recitals.
“SAF PLS Noteholders” shall mean Barclays and each other Noteholder of the Series 2019-VF1 Notes (as such terms are defined in the SAF PLS Indenture) and their respective successors in interest and permitted assigns in such capacity.
“SAF SPVs” shall have the meaning assigned to such term in the Recitals.
“Sale Agreement” shall have the meaning assigned to such term in Article 8.
“Sale Order” shall have the meaning assigned to such term in Article 8.
“Secured Obligations” shall mean, collectively, the obligations of the Guarantor, each DIP Seller, each Depositor, each SAF SPV and their respective Affiliates under each of the DIP Warehouse Facility Agreements (including the Obligations).
“Secured Parties” shall mean the Administrative Agent, the Buyers, the MSFTA Counterparties and any other holder of the Secured Obligations.
“Sellers” shall have the meaning assigned to such term in the Preamble.
“Specified Act of Insolvency” shall mean the occurrence of any Act of Insolvency specified in clause (a) (with respect to a chapter 11 proceeding under the Bankruptcy Code) or clause (e) of the definition of “Act of Insolvency”.
“Stated Termination Date” shall mean the date that is 180 days after the Petition Date. 
“Termination Date” shall mean the earliest to occur of (a) the Stated Termination Date, (b) the acceleration of any of the Secured Obligations and the termination of the commitments of the Buyers under any of the Governing Agreements to make Fundings thereunder as a result of an exercise of remedies pursuant to Article 6, (c) the substantial consummation (as defined in Section 1101(2) of the Bankruptcy Code, which for purposes hereof shall be no later than the effective date thereof) of a chapter 11 plan of reorganization in any of the Cases that is confirmed pursuant to an order entered by the Bankruptcy Court, and (d) the consummation of a sale under section 363 of the Bankruptcy Code of all or substantially all of the assets of the Debtors.
“Unrestricted Cash” means for any Seller, any amount of cash and cash equivalents of such Seller that is not contractually required to be set aside, segregated or otherwise reserved, which may include cash and cash equivalents on deposit in any bank accounts of such Seller subject to the Prepetition 1L/2L Security Interests or the Adequate Protection Liens (as such terms are defined in the DIP Orders) (but only to the extent such Seller is authorized to use such cash collateral in the ordinary course of its business pursuant to the DIP Orders); provided that, with respect to RMS, for purposes of the liquidity covenant set forth in Section 4.4(b), “Unrestricted Cash” shall also include any cash and cash equivalents of RMS on deposit in the RMS DIP Liquidity Account (as defined in the Cash Management Orders), notwithstanding that such cash and/or cash equivalents may be noted as “restricted cash” on the financial statements of RMS.


14
2014058.10-NYCSR07A - MSW





“VFN Draws” shall have the meaning assigned to such term in the Recitals.
“Wells Fargo” shall have the meaning assigned to such term in the Recitals.

ARTICLE 2:    CONDITIONS PRECEDENT TO  
EFFECTIVE DATE AND INITIAL FUNDINGS
•Conditions Precedent to Effective Date and Initial Fundings.  This Master Refinancing Agreement, the Repurchase Agreements, and the Indenture Supplements shall become effective (as well as the other DIP Warehouse Facility Agreements contemplated to become effective concurrently with the foregoing), and the obligation of the Committed Buyers to fund their respective Pro Rata Portions (as defined in the Administration Agreement) of the initial Fundings under the Governing Agreements shall be subject to the satisfaction of the following conditions precedent, which may only be waived by the Administrative Agent (at the direction of Required Buyers):
1.    The Administrative Agent shall have received:
(a)    this Master Refinancing Agreement, duly executed and delivered by the Administrative Agent, Buyers, the DIP Sellers, and the Guarantor; and
(b)    each Repurchase Agreement, the SAF Agency Indenture Supplement, the SAF PLS Indenture Supplement, the Netting Agreement, the DIP Guaranty, the Administration Agreement, the Depositor Equity Pledge Agreement, each MSFTA and each other DIP Warehouse Facility Agreement, in each case, duly executed and delivered by each party thereto, each in form and substance satisfactory to the Administrative Agent (at the direction of Required Buyers in their sole discretion);
2.    Payment of (a) all fees due and payable at such time pursuant to the Master DIP Fee Letter and (b) all other fees, costs and expenses of Administrative Agent and Buyers incurred in connection with the negotiation, preparation and administration of the DIP Warehouse Facility Agreements and in connection with matters related to any of the Cases, including all reasonable legal fees and expenses; in each case, then due and payable pursuant to the Commitment Letter or Article 7 hereof; 
3.    Evidence that all other actions necessary or, in the opinion of Administrative Agent (at the direction of Required Buyers), reasonably desirable to perfect and protect the Secured Parties’ interest in the Collateral under each DIP Warehouse Facility Agreement and the security interest granted under the Netting Agreement and Depositor Equity Pledge Agreement have been taken, including, without limitation, duly authorized and filed Uniform Commercial Code financing statements on Form UCC 1 and UCC-3, as applicable;
4.    Delivery of a certificate of a duly authorized Person of Guarantor, each DIP Seller, each Depositor and each SAF SPV, (a) attaching certified copies of Guarantor’s, each DIP Seller’s, each Depositor’s and each SAF SPV’s organizational documents and resolutions, as applicable, approving the DIP Warehouse Facility Agreements to which such Person is a party (either specifically or by general resolution or pursuant to the related organizational documents) and (b) 


15
2014058.10-NYCSR07A - MSW





certifying that all necessary action or material governmental approvals as may be required in connection with the DIP Warehouse Facility Agreements have been obtained and are in full force and effect; 
5.    Delivery of a certified copy of a good standing certificate from the jurisdiction of organization of Guarantor, each DIP Seller, each Depositor and each SAF SPV, dated within ten (10) Business Days of the Effective Date; 
6.    An incumbency certificate of Guarantor, each DIP Seller, each Depositor and each SAF SPV, certifying the names, true signatures and titles of the representatives duly authorized to request transactions under and to execute the DIP Warehouse Facility Agreements, as applicable;
7.    With respect to the each Indenture:
(a)    Execution and delivery of each variable funding note issued pursuant to each Indenture for agency servicing/delinquency advances and non-agency servicing/monthly advances, each registered or submitted to be re-registered (as the case may be) in the name of Barclays and delivered to, or held for, Barclays; and
(b)    Execution and delivery of the documents listed on Part A of Schedule I hereto;
8.    Delivery from DIP Sellers’ outside counsel of the legal opinions listed on Part B of Schedule I hereto, in each case, in form and substance acceptable to Buyers;
9.    The Bankruptcy Court shall have entered the Interim DIP Order, the Interim Cash Management Order and the Interim OCB Orders in connection with the Cases, and the Interim DIP Order, the Interim Cash Management Order and the Interim OCB Orders shall be in full force and effect, and shall not have been (i) vacated, reversed, or stayed, or (ii) amended or modified except as otherwise agreed to in writing by the Administrative Agent (at the direction of the Required Buyers);
10.    No uncured Event of Default or uncured Default under any DIP Warehouse Facility Agreement shall exist; 
11.    Accuracy in all material respects of representations and warranties provided by Guarantor, DIP Sellers, Depositors and SAF SPVs in the DIP Warehouse Facility Agreements;
12.    Payoff and termination of all obligations under the Prepetition Warehouse Facility Agreements, and the Administrative Agent shall have received evidence reasonably satisfactory to it with respect to such payoff and termination;
13.    No suspension or loss of any DIP Seller’s status as either (x) an approved servicer or (y) an approved issuer, with Fannie Mae, Freddie Mac, or Ginnie Mae, as applicable, and no termination of any of the GA Selling and Servicing Agreements;  


16
2014058.10-NYCSR07A - MSW





14.    With respect to each Repurchase Agreement, no material disruption of claims payments on FHA insured loans shall have occurred (other than any such material disruption that is generally affecting non-bank mortgage servicers and originators with similar claims); 
15.    Receipt by Administrative Agent, Buyers and MSFTA Counterparties of requested “know your customer” information;
16.    Receipt by Administrative Agent and the Buyers of (a) daily cash flow forecasts with supporting detail, and (b) monthly cash flow forecasts with supporting detail through December 31, 2019, in each case, in form and substance reasonably satisfactory to the Buyers; 
17.    Fannie Mae shall have acknowledged Barclays replacing the Prior SAF Agency Agent as designee for purposes of the existing Fannie Mae Acknowledgement Agreement (as defined in the SAF Agency Indenture), which acknowledgement shall be in form and substance reasonably satisfactory to Barclays;
18.    Administrative Agent and Buyers not having discovered or otherwise having become aware of any information not previously disclosed to them that they believe to be inconsistent in a material and adverse manner with their understanding, based on the information provided to them prior to the date of the Commitment Letter, of the business, assets, liabilities, operations, financial conditions and operating results of the Guarantor and its subsidiaries or each DIP Seller and their respective subsidiaries, in each case, taken as a whole; 
19.    Compliance by the Guarantor and DIP Sellers in all material respects with the terms of the Commitment Letter and each Fee Letter (as defined therein) (including payment of fees and expenses as the same become due and payable and that no breach in any material respect of the representations, warranties and agreements contained in Section 2 of such Commitment Letter shall have occurred and be continuing); and
20.    The Guarantor shall have (a) entered into the RSA with Prepetition 1L Lenders holding at least two-thirds of the aggregate principal amount of loans outstanding under the Prepetition 1L Credit Agreement, and (b) executed and delivered a certification that (i) there has been no modification or amendment to the RSA since the execution thereof and (ii) the “Support Period” (as defined in the RSA) has commenced and is continuing, in each case, in form and substance acceptable to the Administrative Agent and the Buyers.
A.Third Party Beneficiary.  The parties hereto acknowledge and agree that Wells Fargo, as SAF Agency Indenture Trustee and SAF PLS Indenture Trustee under Indentures, shall be a third party beneficiary of this Article 2.

ARTICLE 3:    [RESERVED]




17
2014058.10-NYCSR07A - MSW






ARTICLE 4:    CERTAIN COVENANTS
The Guarantor and the DIP Sellers shall comply, and shall cause their respective Subsidiaries to comply, as applicable, with the following covenants:
1.    Use of Proceeds. The proceeds of any Fundings under any Governing Agreement and other extensions of credit under the DIP Warehouse Facility Agreements shall be used (i) to pay off in full any outstanding obligations under the Prepetition Warehouse Facility Agreements as of the Effective Date, (ii) in the case of the Repurchase Agreements, to acquire Purchased Assets, (iii) for general working capital and operational expenses of Sellers and (iv) to pay customary fees and closing costs in connection with the DIP Warehouse Facility Agreements; provided that, proceeds of any Fundings or any Collateral shall not be used for repayment of amounts owing under the National Founders Facility. 
2.    Cash Flow Review Calls.  Upon request by any Buyer from time to time, the Guarantor and the Sellers shall hold a cash flow review call with the Administrative Agent, the Buyers and their respective representatives and advisors; provided that (i) absent an Event of Default, the Guarantor and Sellers shall not be required to have more than one such call during any calendar week and (ii) any such call shall be scheduled at times reasonably agreed to by the requesting Buyer, the Sellers and the Administrative Agent.
3.    DIP Superpriority Claims.  The DIP Superpriority Claims against the Sellers shall have priority over all other administrative expenses, subject and subordinate only to (a) the Carve-Out and (b) the First Lien Term Loan Obligations but solely to the extent they relate to and against, and are payable from, the First Lien Term Loan Collateral only.  The DIP Superpriority Claims against the Guarantor shall have priority over all other administrative expenses, subject and subordinate in all respects only to (a) the Carve-Out and (b) the First Lien Term Loan Obligations but solely to the extent as they relate to and against, and are payable from, the First Lien Term Loan Collateral only.
4.    Maintenance of Liquidity.  
(a)    Ditech shall ensure that, at all times, it has Unrestricted Cash in an amount not less than $5,000,000.
(b)    RMS shall ensure that, at all times, it has Unrestricted Cash in an amount not less than $25,000,000.
5.    Other Ditech Financial Covenants.
(a)    As of the end of each calendar month, Ditech shall maintain an Adjusted Tangible Net Worth at least equal to $400,000,000.
(b)    As of the end of each calendar month, Ditech’s ratio of Warehouse Indebtedness of Ditech (excluding Non-Recourse Indebtedness and excluding all Indebtedness (as defined in the Ditech Repurchase Agreement) (i) that is not reflected on 


18
2014058.10-NYCSR07A - MSW





Ditech’s financial statements or (ii) of Ditech in respect of the Prepetition 1L Credit Agreement) to Adjusted Tangible Net Worth of Ditech shall not exceed 10:1.
6.    Other RMS Financial Covenants.
(a)    As of the end of each calendar month, RMS shall maintain an Adjusted Tangible Net Worth at least equal to $60,000,000.
(b)    As of the end of each calendar month, RMS’s ratio of Warehouse Indebtedness of RMS (excluding Non-Recourse Indebtedness and all HMBS security obligations and any other securitization obligations of RMS and excluding all Indebtedness (as defined in the RMS Repurchase Agreement) that is not reflected on RMS’s financial statements) to Adjusted Tangible Net Worth of RMS shall not exceed 10:1.
7.    National Founders Facility.  None of the proceeds of any Collateral or the proceeds of any Funding or other extension of credit under any of the DIP Warehouse Facility Agreements shall be used in any respect of the National Founders Facility.
8.    Agency Reporting.  The Debtors shall (i) timely comply with all informational and reporting requests and requirements of any Agency in connection with the Cases, (ii) promptly after delivery thereof furnish to the Administrative Agent and the Buyers copies of any formal written responses and reporting so delivered to any Agency, and (iii) promptly notify the Administrative Agent and the Buyers of any material conditions imposed by any Agency in connection with any DIP Seller’s continuing status as an approved servicer or issuer and/or forbearance by such Agency with respect to any of the GA Selling and Servicing Agreements.

ARTICLE 5:    EVENTS OF DEFAULT
Each of the following shall constitute an “Event of Default” hereunder and under each of the Governing Agreements:
1.    Failure to Enter Interim DIP Order. Within five (5) Business Days following the Petition Date, the Bankruptcy Court fails to enter the Interim DIP Order; 
2.    Failure to Draw. Within five (5) Business Days following the Petition Date, DIP Sellers fail to enter into a new Transaction under each Governing Agreement;
3.    Failure to Enter Final DIP Order, Final Cash Management Order or Final OCB Orders. Within thirty-five (35) calendar days following the entry of the Interim DIP Order, the Bankruptcy Court fails to enter the Final DIP Order, the Final Cash Management Order or any Final OCB Order; 
4.    Failure to Pay Administrative Agent for its own account or the account of any Buyer. Failure to (a) make any payment of Price Differential or Repurchase Price or make a payment of any other sum or amount which has become due, whether by acceleration or otherwise, under any of the DIP Warehouse Facility Agreements, including, without limitation, payment in full in cash 


19
2014058.10-NYCSR07A - MSW





by the Termination Date or (b) pay any Margin Deficit when due pursuant to any Repurchase Agreement;
5.    Breach of Representation. Any representation or warranty of Guarantor, any DIP Seller, any Depositor or any SAF SPV under this Master Refinancing Agreement the DIP Guaranty or any other DIP Warehouse Facility Agreement is materially incorrect;
6.    Breach of Covenant. A breach of any covenant or agreement of Guarantor, any DIP Seller, any Depositor or any SAF SPV under this Master Refinancing Agreement, the DIP Guaranty or any other DIP Warehouse Facility Agreement;
7.    Breach of DIP Orders. The occurrence of a breach or violation of the Interim DIP Order (or, after entry thereof, the Final DIP Order) that has not been promptly cured or waived to the satisfaction of the Administrative Agent (at the direction of the Required Buyers in their sole discretion);
8.    Breach of OCB Orders or Cash Management Order. The occurrence of a breach or violation of any Interim OCB Order (or, after entry thereof, any Final OCB Order) or the Interim Cash Management Order (or, after entry thereof, the Final Cash Management Order), in each case, that has not been promptly cured or waived to the satisfaction of the Administrative Agent (at the direction of Required Buyers in their sole discretion);
9.    Conversion of any of the Cases. The conversion of any of the Cases to a case under chapter 7 of the Bankruptcy Code; 
10.    Dismissal of any of the Cases. The dismissal of any of the Cases;
11.    Appointment of a Chapter 11 Trustee; Loss of Exclusivity. (a) Appointment of a chapter 11 trustee in any of the Cases pursuant to section 1104 of the Bankruptcy Code, or (b) any Debtor loses the exclusive right to file a chapter 11 plan or plans in any of the Cases or to solicit acceptances thereof pursuant to section 1121 of the Bankruptcy Code; 
12.    Chapter 11 Milestones.  After entry of the Final DIP Order, the Debtors fail to comply with any of the Chapter 11 Milestones in accordance with Article 8;
13.    Modification of DIP Orders or Certain Other Orders. Any reversal, revocation or modification of any of the following orders without the prior written consent of the Administrative Agent (at the direction of the Required Buyers in their sole discretion) (in the case of subclause (d) below, other than a modification that is not adverse to any of the rights, claims or interests of any Secured Party): (a) the Interim DIP Order (or, after entry thereof, the Final DIP Order), (b) any Interim OCB Order (or, after entry thereof, any Final OCB Order), (c) after entry thereof, any order referred to in clause (e) of the Chapter 11 Milestones, (d) after entry thereof, any of the other orders referred to in the Chapter 11 Milestones or (e) the Interim Cash Management Order (or, after entry thereof, the Final Cash Management Order);


20
2014058.10-NYCSR07A - MSW





14.    Loss or Suspension of Servicer or Issuer Status. Any Agency (a) removes or suspends any DIP Seller’s status as an approved servicer or issuer, (b) terminates of any of the GA Selling and Servicing Agreements, or (c) engages in any setoff against any Collateral;
15.    Order Granting Relief of Automatic Stay to Third Party. The entry of an order of the Bankruptcy Court granting any Person other than the Secured Parties (in their capacities as such) relief from the automatic stay in any of the Cases in a manner that is materially adverse to the rights, claims or interests of any of the Secured Parties; 
16.    Order Granting Lien or Claim to Third Party. The entry of an order of the Bankruptcy Court granting any Person other than the Secured Parties (in their capacities as such) a Lien or claim in or against (a) any of the Collateral, or (b) any other material assets of Guarantor, a DIP Seller, any other Debtor, any Depositor or any SAF SPV (other than, solely with respect to assets that do not, and are not required to, constitute Collateral, (i) Liens existing as of the Petition Date granted to the Prepetition 1L Agent and the Prepetition 2L Trustee pursuant to the Prepetition 1L/2L Documents on assets of the Debtors, (ii) adequate protection Liens granted to the Prepetition 1L Agent and the Prepetition 2L Trustee in accordance with the DIP Orders on assets of the Debtors, (iii) Liens permitted under the Prepetition 1L Credit Agreement (as amended and in effect on the date of the Commitment Letter) and DIP Warehouse Facility Agreements; provided that it shall constitute an Event of Default if any of the DIP Sellers, Guarantor, any other Debtor, any SAF SPV or any Depositor shall grant any Lien to secure any indebtedness or obligations referred to in clause (17) below or (iv) as otherwise provided in the DIP Orders);
17.    Additional Indebtedness. Guarantor, a DIP Seller, any other Debtor, a SAF SPV or a Depositor (a) issues or incurs, or files a motion to issue or incur, any additional secured or unsecured term loan debt, debt bonds, or other debt for borrowed money, or (b) enters into, or files a motion to approve, any other debt arrangements similar to a DIP Warehouse Facility Agreement;
18.    Other Hedges. Without the prior written consent of Administrative Agent (at the direction of Required Buyers): (a) Guarantor, a DIP Seller, any other Debtor, a SAF SPV or a Depositor enters into any Hedging Transactions, other than transactions with Ditech pursuant to hedging agreements identified in writing by the DIP Sellers to the Buyers on February 7, 2019 (the “Original Hedges”) or (b) any guaranties are provided in connection with any of the Original Hedges or any other Hedging Transaction; 
19.    Chapter 11 Plan Filing. The filing of any chapter 11 plan of reorganization (or a disclosure statement describing a chapter 11 plan of reorganization) in any of the Cases or any motion to approve the Sale Agreement, any plan support agreement or any other asset purchase agreement or similar agreement, in any such case, that does not provide that all obligations of the Guarantor, the DIP Sellers, the SAF SPVs, and the Depositors with respect to the DIP Warehouse Facility Agreements, the DIP Guaranty and this Master Refinancing Agreement shall be paid in full in cash as per the terms of such agreements (other than with respect to any other asset purchase agreement or similar agreement relating to a sale or disposition on terms and conditions consented to by the Buyers, subject to any applicable prepayment requirements set forth herein or in any other DIP Warehouse Facility Agreement);


21
2014058.10-NYCSR07A - MSW





20.    RSA Termination. (a) The RSA is (i) terminated or (ii) amended, waived or otherwise modified in a manner that is materially adverse to the rights, claims or interests of any of the Secured Parties, or (b) the “Consenting Term Lenders” under and as defined in the RSA fail to hold at least two-thirds of the aggregate principal amount of loans outstanding under the Prepetition 1L Credit Agreement and such failure continues unremedied for a period of five (5) consecutive Business Days;
21.    Exercise of Remedies by Other Creditors. Exercise by any Prepetition 1L/2L Party or any other creditor or any agent, trustee or other representative on behalf of any creditor (other than Administrative Agent or the Required Buyer in accordance with the Administration Agreement and other relevant DIP Warehouse Facility Agreements) of remedies (a) against any Collateral, or (b) in a manner that is materially adverse to the rights, claims or interests of any of the Secured Parties;
22.    [Reserved]. 
23.    Sale Agreement.  The Sale Agreement at any time after execution thereof shall be (i) amended in a manner that results in such Sale Agreement no longer complying with the requirements set forth herein and in the other DIP Warehouse Facility Agreements or (ii) withdrawn or terminated, unless such Sale Agreement is replaced within thirty (30) days by a replacement Sale Agreement that is an Acceptable Sale Agreement; provided that this Section 5.23 shall cease to apply in the event that Section E.2 of the Chapter 11 Milestones no longer applies pursuant to the proviso set forth at the end of Article 8;
24.    Sale, Transfer or Disposition of Servicing Rights. Any sale, transfer or other disposition of (i) any mortgage servicing rights with respect to any mortgage loans (including any manufactured housing loans) or rights to reimbursement for advances related thereto or (ii) any other assets of the Guarantor, any DIP Seller, any other Debtor, any Depositor or any SAF SPV and, in the case of this subclause (ii), the sale, transfer or other disposition of such other asset would materially impair the rights and claims of any of the Secured Parties (as determined by Required Buyers in their sole discretion) in and to the Collateral (other than the sale, transfer or other disposition of such servicing rights or assets occurring in the ordinary course; provided that the outstanding Repurchase Price or other Secured Obligations (including any accrued and unpaid interest and fees with respect thereto) owed to any of the Secured Parties with respect to such sold mortgage servicing rights or any rights to reimbursement for advances related thereto or, to the extent constituting Collateral, other sold assets shall be repaid no later than substantially concurrently with such sale, transfer or other disposition);
25.    Failure to Pay at Maturity. The occurrence of a DIP Maturity Date Event of Default;
26.    MSFTA Cross Default. An “event of default” (as such term is defined in the applicable MSFTA) (in each case, subject to any applicable cure period) occurs under any MSFTA (as defined herein);
27.    Insolvency. An Act of Insolvency shall have occurred with respect to the REO Subsidiary, any Depositor or any SAF SPV; 


22
2014058.10-NYCSR07A - MSW





28.    Inability to Perform. Any DIP Seller, Guarantor, any Depositor or any SAF SPV shall admit its inability to, or its intention not to, perform such Person’s obligations under any of the DIP Warehouse Facility Agreements to which it is a party; provided that the filing of any of the Cases or any Specified Act of Insolvency with respect to the Debtors hall not, in and of itself, be deemed any admission of Person’s inability to perform; 
29.    Change in Control.  The occurrence of a Change in Control;
30.    Failure to Transfer.  Any DIP Seller fails to transfer the Purchased Assets to Administrative Agent or its designee on the applicable Purchase Date (provided that the applicable Buyers (or the Administrative Agent, on behalf of the applicable Buyers) have tendered the related Purchase Price);
31.    Judgment.  A post-petition final judgment or judgments for the payment of money in excess of $5,000,000 in the aggregate shall be rendered against any DIP Seller or Guarantor by one or more courts, administrative tribunals or other bodies having jurisdiction and the same shall not be satisfied, discharged (or provision shall not be made for such discharge) or bonded, or a stay of execution thereof shall not be procured, within thirty (30) days from the date of entry thereof; 
32.    Government Action.  Any Governmental Authority or any person, agency or entity acting or purporting to act under governmental or regulatory authority (i) shall have taken any action to condemn, seize or appropriate, or to assume custody or control of, all or any substantial part of the property of any DIP Seller, Guarantor or any Affiliate thereof, (ii) shall have taken any action to displace the management of any DIP Seller, Guarantor or any Affiliate thereof or (iii) shall have taken any action to curtail its authority in any material respect in the conduct of the business of any DIP Seller, Guarantor or any Affiliate thereof, or any enforcement action that either materially impairs the ability of any DIP Seller, the Guarantor, any Depositor or any SAF SPV to perform its obligations under the DIP Warehouse Facility Agreements or prevents it from carrying on its business or a substantial part thereof, and, in the case of this subclause (iii), such action shall not have been discontinued or stayed within thirty (30) days; 
33.    Servicer Default.  Any third party servicer of any Purchased Assets is in default of the applicable servicing agreement entered into between such servicer and any Seller, and the relevant Seller has not, within thirty (30) days of such default, (i) replaced such servicer with a successor servicer approved by Administrative Agent in its sole discretion or (ii) repurchased all Purchased Assets subject to such servicing agreement or any other servicing agreement with such servicer;
34.    Indenture Cross Default. The occurrence of an “Event of Default” (as such term is defined under each Indenture), or the failure to timely pay any “Target Amortization Amount” (as such term is defined under each Indenture) when due and payable; 
35.    Assignment. Assignment or attempted assignment by any DIP Seller, Guarantor, any Depositor or any SAF SPV of any DIP Warehouse Facility Agreement to which it is a party or any of its rights or obligations thereunder without first obtaining the specific written consent of Administrative Agent (at the direction of the Required Buyers in their sole discretion), or the granting 


23
2014058.10-NYCSR07A - MSW





by any DIP Seller of any security interest, lien or other encumbrances on any Purchased Assets to any person other than Administrative Agent or any custodian or agent acting on behalf of the Administrative Agent and relevant Buyers; 
36.    Security Interest. Any of the DIP Warehouse Facility Agreements shall for any reason cease to create a valid, first priority security interest in any material portion of the Collateral purported to be covered thereby;
37.    Occurrence of any other Event of Default.  The occurrence of any other event of default under any DIP Warehouse Facility Agreement (beyond any grace period, and subject to any express notice requirement, set forth in such DIP Warehouse Facility Agreement that is applicable to such event) that has not been promptly cured or waived to the satisfaction of the Administrative Agent (at the direction of the Required Buyers in their sole discretion);
38.    Enforceability.  For any reason (i) any DIP Seller, Guarantor, Depositor or SAF SPV shall seek to disaffirm, terminate, limit, challenge, repudiate or reduce its obligations under any DIP Warehouse Facility Agreement or otherwise challenge the ability of Administrative Agent, any Buyer or any other Secured Party to enforce its rights and remedies thereunder or (ii) any DIP Warehouse Facility Agreement at any time shall fail to be in full force and effect in all material respects in accordance with its terms or shall not be enforceable in all material respects in accordance with its terms;
39.    Cash Collateral Termination Event.  The occurrence of a Cash Collateral Termination Event (as defined in the DIP Orders).
An Event of Default shall be deemed to be continuing unless expressly waived by Administrative Agent (at the direction of the Required Buyers in their sole discretion) in written notice to the DIP Sellers.

ARTICLE 6:    REMEDIES
Notwithstanding anything to the contrary in this Master Refinancing Agreement or in any other DIP Warehouse Facility Agreement, upon the occurrence and during the continuance of an Event of Default, the Administrative Agent (at the direction of the Required Buyers in their sole discretion) shall: (a) deliver a notice of an Event of Default; (b) terminate any pending Funding or other extension of credit under any DIP Warehouse Facility Agreement; (c) declare the Secured Obligations to be due and payable; (d) place an administrative hold on any deposit account, securities account or other bank account that constitutes Collateral; and (e)(i) immediately upon the occurrence of any Immediate Event of Default, and (ii) upon three (3) Business Days’ written notice to Ditech, RMS and the Guarantor in the case of any Event of Default (other than an Immediate Event of Default), exercise all other rights and remedies available to the Administrative Agent (at the direction of the Required Buyers in their sole discretion), any Buyer and/or any other Secured Party pursuant to any of the DIP Warehouse Facility Agreements, DIP Guaranty, the DIP Orders and any other order of the Bankruptcy Court or otherwise.  The rights and remedies set forth in this Article 6 may be exercised without presentment, demand, protest or other notice of any kind (except for any notice expressly required in this Article 6), all of which are hereby expressly waived by each of the DIP 


24
2014058.10-NYCSR07A - MSW





Sellers, Guarantor, any SAF SPV and any Depositor.  For the avoidance of doubt, upon the occurrence and during the continuance of an Event of Default, the interest rate that is used to calculate amounts due under the Repurchase Agreements (including Price Differential) shall automatically be the Default Rate without any further action required by Administrative Agent or any Buyer party to any Repurchase Agreement.


Upon the occurrence of a DIP Maturity Date Event of Default, the exercise of remedies under any of the Governing Agreements and related Program Agreements may be commenced at the direction of any of the initial Buyers party to such Governing Agreement (or, in the case of an MSFTA, the MSFTA Counterparty party to such MSFTA); provided, however, that to the extent that, and for so long as, each of the following conditions are satisfied (but solely during the 45-day period immediately following the occurrence of the DIP Maturity Date Event of Default) the exercise of such remedies shall only be commenced at the direction of the Required Buyers:


(a)    the Debtors have filed with the Bankruptcy Court an Acceptable Plan or an Acceptable Sale Agreement, as applicable; and


(b)    (i)  a confirmation or sale hearing, as applicable, has been scheduled for the confirmation or approval of such Acceptable Plan or Acceptable Sale Agreement and the Debtors are working to obtain Bankruptcy Court confirmation or approval thereof, or (ii) the Debtors have obtained entry of either an order of the Bankruptcy Court confirming such Acceptable Plan or the Sale Order approving such Acceptable Sale Agreement and are pursuing the effective date or consummation thereof, as applicable; and


(c)    an updated DIP budget is delivered within ten (10) days prior to the occurrence of the DIP Maturity Date Event of Default demonstrating sufficient liquidity for the Debtors and their non-Debtor subsidiaries to the reach the expected effective date of such Acceptable Plan or consummation of the transactions under such Acceptable Sale Agreement, as applicable.


The Administrative Agent (acting at the direction of the Required Buyers in their sole discretion) shall have the right, following the occurrence of an Event of Default, to transfer the existing HUD mortgagee ID numbers for no less than all of the Mortgage Loans that are subject to the RMS Repurchase Agreement to the HUD mortgagee ID number specified by the Administrative Agent; provided that such transfer shall be subject to HUD approval.  The Administrative Agent, Buyers and Sellers agree to negotiate in good faith to modify and supplement the Administration Agreement within thirty (30) days of the Effective Date to reflect certain sub-agency and similar provisions that would apply in the event any such transfer is made to Nomura’s HUD mortgagee ID number pursuant to this paragraph, which modifications shall be in form and substance reasonably satisfactory to the Administrative Agent.  The Administrative Agent will have the option in its sole discretion for such transfer to be made to either Nomura’s or Barclays’ HUD mortgagee ID number. 




25
2014058.10-NYCSR07A - MSW






ARTICLE 7:    FEES AND EXPENSES
Notwithstanding anything to the contrary in any Governing Agreement or any other Program Agreement, DIP Sellers shall pay all of the reasonable costs and expenses of the Administrative Agent and the Buyers, whether incurred before, on or after the Petition Date, including, without limitation, due diligence audit (including per diems), consultant, search, filing and recording fees and all other reasonable out-of-pocket expenses of the Administrative Agent and the Buyers (including the reasonable fees and expenses of (a) separate counsel to each Buyer, (b) appropriate local counsel and regulatory counsel, (c) one counsel to the Administrative Agent or a Buyer delivering any legal opinion required as a condition precedent to the Effective Date and initial Fundings, and (d) following the occurrence of a Default, accountants and other professionals and advisors to the Administrative Agent and the Buyers), as well as all reasonable expenses of the Administrative Agent and the Buyers in connection with the negotiation and preparation, execution, administration (including the preparation, negotiation and execution of any amendments, consents, waivers, assignments, restatements or supplements thereto), monitoring and enforcement of this Master Refinancing Agreement, the DIP Guaranty, and the other DIP Warehouse Facility Agreements and in connection with matters related to any of the Cases.  For the avoidance of doubt, DIP Sellers will pay all of the outstanding legal fees of Buyers on (i) the Effective Date, (ii) at such regular intervals during the Cases as agreed to among the parties and (iii) upon the Termination Date.  

ARTICLE 8:    MILESTONES
The Debtors shall comply with the following chapter 11 milestones (collectively, the “Chapter 11 Milestones”):
A.    On or before the date that is fifteen (15) days following the Petition Date, the Debtors shall have filed with the Bankruptcy Court a motion, in form and substance satisfactory to the Required Buyers, seeking entry of an order by the Bankruptcy Court approving bidding procedures in connection with a 363 sale process pursuant to one or more asset purchase agreements or similar agreements that provide for repayment in full in cash of the obligations under the DIP Warehouse Facility Agreements on the closing of such agreement;
B.    On or before the date that is fifteen (15) days following the Petition Date, the Debtors shall have filed with the Bankruptcy Court an Acceptable Plan and a disclosure statement reasonably satisfactory to the Required Buyers with respect thereto; 
C.    On or before the date that is sixty (60) days following the Petition Date, the Bankruptcy Court shall have approved bidding procedures, in form and substance reasonably acceptable to the Required Buyers, and such approval shall be in full force and effect, and shall not have been (i) vacated, reversed, or stayed, or (ii) amended or modified except as otherwise agreed to in writing by the Required Buyers;
D.    On or before the date that is sixty (60) days following the Petition Date, the Debtors shall have obtained the Bankruptcy Court’s approval of a disclosure statement for an Acceptable Plan and solicitation procedures contemplating completion of a confirmation hearing with respect 


26
2014058.10-NYCSR07A - MSW





to an Acceptable Plan no later than 115 days following the Petition Date, which disclosure statement and solicitation procedures must otherwise be in form and substance reasonably acceptable to the Required Buyers, and the Bankruptcy Court’s approval of such disclosure statement and solicitation procedures shall not have been amended, modified or supplemented (or any portions thereof reversed, stayed or vacated) other than as agreed in writing by the Required Buyers; and
E.    One of the following milestones shall be satisfied on or before the date that is 125 days following the Petition Date: 
1.    the Debtors shall obtain entry of an order of the Bankruptcy Court confirming an Acceptable Plan, which order (i) shall be (x) in form and substance satisfactory to the Required Buyers, to the extent relating to the termination of the commitments under the DIP Warehouse Facility Agreements, the payment in full in cash and full discharge of the obligations under the DIP Warehouse Facility Agreements, and releases and other exculpatory provisions for the Secured Parties and (y) otherwise in form and substance reasonably satisfactory to the Required Buyers, and (ii) shall not have been amended, modified or supplemented (or any portions thereof reversed, stayed or vacated) other than as agreed in writing by the Required Buyers; or
2.    the Bankruptcy Court shall have entered an order approving an asset purchase agreement or similar agreement that provides for repayment in full in cash of the obligations under the DIP Warehouse Facility Agreements on the closing of such agreement (such order, the “Sale Order” and such agreement, the “Sale Agreement”), in form and substance reasonably acceptable to the Required Buyers, and the Sale Order shall be in full force and effect, and shall not have been (i) vacated, reversed, or stayed, or (ii) amended or modified except as otherwise agreed to in writing by the Required Buyers;
provided that, in the event the Board of Directors of the Guarantor and Sellers have determined to no longer pursue the Sale Agreement or a replacement Sale Agreement, then (x) the Guarantor and Sellers shall notify the Administrative Agent and the Buyers thereof no later than the date that is the sum of (A) 95 days plus (B) five (5) Business Days following the Petition Date and (y) Section E.2 above shall cease to be an alternative and the Debtors shall be required to satisfy the Chapter 11 Milestone set forth in Section E.1 above.

ARTICLE 9:    REPORTING
In addition to the reporting requirements set forth in any other DIP Warehouse Facility Agreement, The Guarantor and the DIP Sellers shall furnish to the Administrative Agent and each of the Buyers:

A.    Cash Flow Forecasts.  Daily cash flow forecasts with supporting detail, on a rolling 120-day basis, and (ii) monthly cash flow forecasts with supporting detail through December 31, 2019, in each case, updated weekly and to be delivered on Thursday of each week based on information as of the end of the immediately preceding calendar week, which reporting shall be in a form substantially consistent with such forecasts provided to the Buyers as of the date of the Commitment Letter or in such other form as is reasonably acceptable to the Buyers.


27
2014058.10-NYCSR07A - MSW






B.    Other Reporting.  The same reports, disclosures or other information provided to the Administrative Agent, any of the Prepetition 1L/2L Parties, or their respective advisors in accordance with any order of the Bankruptcy Court.

ARTICLE 10:    CONFLICTS
Notwithstanding anything in the DIP Warehouse Facility Agreements to the contrary, in the event of any conflict between the terms of a DIP Warehouse Facility Agreement and the other related Program Agreements, the documents shall control in the following order of priority:  first, the terms of this Master Refinancing Agreement shall prevail, second, the terms of the related Pricing Side Letter shall prevail, third, the terms of the Administration Agreement, fourth the terms of the relevant Governing Agreement shall prevail, and fifth, the terms of the other related Program Agreements shall prevail.

ARTICLE 11:    MISCELLANEOUS
A.    Representations and Warranties.  Except as otherwise disclosed to Administrative Agent in writing, each DIP Seller hereby represents and warrants to the Administrative Agent and Buyers that it is in compliance with all the terms and provisions set forth in the DIP Warehouse Facility Agreements on its part to be observed or performed, and that no Event of Default has occurred or is continuing under any DIP Warehouse Facility Agreement, and hereby confirms and reaffirms the representations and warranties contained in Section 13 of each Repurchase Agreement.
B.    Binding Effect; Entire Agreement.  This Master Refinancing Agreement shall be binding and inure to the benefit of the parties hereto and their respective successors and permitted assigns. This Master Refinancing Agreement and the other DIP Warehouse Facility Agreements represent the entire agreement between the parties hereto with respect to the subject matter contained herein and therein. This Master Refinancing Agreement supersedes all prior agreements and understandings, oral or written, with respect to the subject matter hereof.  Except as expressly supplemented and modified by this Master Refinancing Agreement and/or the DIP Orders, the agreements, instruments and documents identified on Schedule II hereto shall continue to be, and shall remain, in full force and effect and for all purposes shall constitute Program Agreements related to the relevant Governing Agreement identified opposite the description thereof.
C.    Severability. Each provision and agreement herein shall be treated as separate and independent from any other provision or agreement herein and shall be enforceable notwithstanding the unenforceability of any such other provision or agreement.
D.    Buyers and MSFTA Counterparties May Act Through Administrative Agent.  Each Buyer and MSFTA Counterparty has designated the Administrative Agent for the purpose of performing any action hereunder (other than, for the sake of clarity, Article 8 hereof).  The exculpatory and liability-limiting provisions contained in the Administration Agreement with respect to the Administrative Agent shall also apply in all respects to the Administrative Agent hereunder and under the other DIP Warehouse Facility Agreements.
E.    Amendments.  


28
2014058.10-NYCSR07A - MSW





1.    Neither this Master Refinancing Agreement nor any term hereof may be changed, waived, discharged or terminated orally, but only by an instrument in writing signed by the Sellers, the Administrative Agent and Required Buyers.
2.    Notwithstanding anything to the contrary herein or in the other DIP Warehouse Facility Agreements, any facilities entered into for the financing of Ginnie Mae Tail HMBS are contemplated to be documented separately from the other Eligible Asset categories described in the RMS Repurchase Agreement.  RMS, the Administrative Agent and the Buyers shall work together in good faith to structure and document any facilities for Ginnie Mae Tail HMBS (the “DIP HMBS Documentation”) and shall endeavor to complete any DIP HMBS Documentation within thirty (30) days after the Effective Date.  It is understood and agreed that (i) the maximum committed amount under the DIP HMBS Documentation shall be equal to the Ginnie Mae Tail HMBS Sublimit (as defined in the RMS Repurchase Agreement), and (ii) the sum of (x) the maximum combined committed amount under the DIP HMBS Documentation and (y) the Maximum Aggregate Purchase Price under and as defined in the RMS Repurchase Agreement shall not at any time exceed the Maximum Aggregate Purchase Price under and as defined in the RMS Repurchase Agreement as in effect on the Effective Date. Any DIP HMBS Repurchase Agreement and other DIP HMBS Documentation entered into pursuant to this paragraph (x) shall constitute a DIP Warehouse Facility Agreement and a Governing Agreement, and (y) shall be subject in all respects to the terms and conditions of, among other things, the DIP Orders, this Master Refinancing Agreement and the Administration Agreement.
F.    Counterparts.  This Master Refinancing Agreement may be executed by each of the parties hereto on any number of separate counterparts, each of which shall be an original and all of which taken together shall constitute one and the same instrument.  Delivery of an executed counterpart of a signature page of this Master Refinancing Agreement in Portable Document Format (PDF) or by facsimile shall be effective as delivery of a manually executed original counterpart of this Master Refinancing Agreement.
G.    Reaffirmation of Guaranty.  The Guarantor acknowledges and agrees that the term “Obligations” as used in the DIP Guaranty shall apply to all of the Obligations (as defined therein) of DIP Sellers to Administrative Agent and Buyer Parties (as defined in the DIP Guaranty) under this Master Refinancing Agreement, the DIP Orders, the applicable Governing Agreements referred to in the DIP Guaranty, MSFTAs, and the related Program Agreements.  The Guarantor hereby ratifies and affirms all of the terms, covenants, conditions and obligations of each Limited Guaranty.
H.    Bankruptcy Non-Petition. The parties hereby agree that they shall not institute against, or join any other person in instituting against, any Buyer that is a CP Conduit any bankruptcy, reorganization, arrangement, insolvency or liquidation proceeding, or other proceeding under any federal or state bankruptcy or similar law, for one year and one day after the latest maturing commercial paper note issued by the applicable CP Conduit is paid in full.
I.    Limited Recourse. The obligations of each party under this Master Refinancing Agreement or any other Program Agreement are solely the corporate or limited liability company obligations of such party. No recourse shall be had for the payment of any amount owing by any 


29
2014058.10-NYCSR07A - MSW





party under this Master Refinancing Agreement, or for the payment by any party of any fee in respect hereof or any other obligation or claim of or against such party arising out of or based on this Master Refinancing Agreement, against any stockholder, partner, member, employee, officer, director or incorporator or other authorized person of such party. In addition, notwithstanding any other provision of this Master Refinancing Agreement, the parties hereto agree that all payment obligations of any Buyer that is a CP Conduit under this Master Refinancing Agreement shall be limited recourse obligations of such Buyer, payable solely from the funds of such Buyer available for such purpose in accordance with its commercial paper program documents. Each party waives payment of any amount which such Buyer that is a CP Conduit does not pay pursuant to the operation of the preceding sentence until the day which is at least one year and one day after the payment in full of the latest maturing commercial paper note issued in accordance with its commercial paper program documents (and waives any “claim” against such Buyer within the meaning of Section 101(5) of the Bankruptcy Code or any other Debtor Relief Law for any such insufficiency until such date).
J.    Notices. Any and all notices, statements, demands or other communications hereunder may be given by a party to the other by mail, email, messenger or otherwise to the address specified on the signature pages hereto, or so sent to such party at any other place specified in a notice of change of address hereafter received by the other. All notices, demands and requests hereunder may be made orally, to be confirmed promptly in writing, or by other communication as specified in the preceding sentence. In all cases, to the extent that the related individual set forth in the respective “Attention” line is no longer employed by the respective party hereto, such notice may be given to the attention of an officer of the respective Person or to the attention of such individual or individuals as subsequently notified in writing by an officer of the respective party.
K.    GOVERNING LAW.  THIS MASTER REFINANCING AGREEMENT SHALL BE GOVERNED BY, AND CONSTRUED IN ACCORDANCE WITH, THE LAWS OF THE STATE OF NEW YORK, WITHOUT REFERENCE TO THE CHOICE OF LAW PROVISIONS THEREOF (OTHER THAN SECTION 5-1401 OF THE NEW YORK GENERAL OBLIGATIONS LAW) AND, TO THE EXTENT APPLICABLE, THE BANKRUPTCY CODE.
L.    WAIVER OF JURY TRIAL.  EACH PARTY HERETO HEREBY WAIVES, TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, ANY RIGHT IT MAY HAVE TO A TRIAL BY JURY IN RESPECT OF ANY LITIGATION DIRECTLY OR INDIRECTLY ARISING OUT OF, UNDER OR IN CONNECTION WITH THIS MASTER REFINANCING AGREEMENT (WHETHER BASED ON CONTRACT, TORT OR ANY OTHER THEORY). EACH PARTY HERETO (I) CERTIFIES THAT NO REPRESENTATIVE, AGENT OR ATTORNEY OF ANY OTHER PARTY HAS REPRESENTED, EXPRESSLY OR OTHERWISE, THAT SUCH OTHER PARTY WOULD NOT, IN THE EVENT OF LITIGATION, SEEK TO ENFORCE THE FOREGOING WAIVER AND (II) ACKNOWLEDGES THAT IT AND THE OTHER PARTIES HERETO HAVE BEEN INDUCED TO ENTER INTO THIS MASTER REFINANCING AGREEMENT BY, AMONG OTHER THINGS, THE MUTUAL WAIVERS AND CERTIFICATIONS IN THIS PARAGRAPH. 


30
2014058.10-NYCSR07A - MSW





M.    JURISDICTION.  EACH PARTY HERETO IRREVOCABLY AND UNCONDITIONALLY AGREES THAT IT WILL NOT COMMENCE ANY ACTION, LITIGATION OR PROCEEDING OF ANY KIND OR DESCRIPTION, WHETHER IN LAW OR EQUITY, WHETHER IN CONTRACT OR TORT OR OTHERWISE, AGAINST THE ADMINISTRATIVE AGENT, ANY OTHER SECURED PARTY OR ANY RELATED PARTY OF ANY OF THE FOREGOING, IN ANY WAY RELATING TO THIS MASTER REFINANCING AGREEMENT OR THE TRANSACTIONS RELATING HERETO, IN A FORUM OTHER THAN THE BANKRUPTCY COURT (OR, IF THE BANKRUPTCY COURT DOES NOT HAVE (OR ABSTAINS FROM) JURISDICTION, THE COURTS OF THE STATE OF NEW YORK SITTING IN NEW YORK COUNTY, AND OF THE UNITED STATES DISTRICT COURT OF THE SOUTHERN DISTRICT OF NEW YORK, AND ANY APPELLATE COURT FROM ANY THEREOF, AND EACH OF THE PARTIES HERETO IRREVOCABLY AND UNCONDITIONALLY SUBMITS TO THE JURISDICTION OF SUCH COURTS AND AGREES THAT ALL CLAIMS IN RESPECT OF ANY SUCH ACTION, LITIGATION OR PROCEEDING MAY BE HEARD AND DETERMINED IN SUCH NEW YORK STATE COURT OR, TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, IN THE BANKRUPTCY COURT OR SUCH OTHER FEDERAL COURT.  EACH OF THE PARTIES HERETO AGREES THAT A FINAL JUDGMENT IN ANY SUCH ACTION, LITIGATION OR PROCEEDING SHALL BE CONCLUSIVE AND MAY BE ENFORCED IN OTHER JURISDICTIONS BY SUIT ON THE JUDGMENT OR IN ANY OTHER MANNER PROVIDED BY LAW.  NOTHING IN THIS MASTER REFINANCING AGREEMENT, ANY GOVERNING AGREEMENT OR IN ANY OTHER RELATED AGREEMENT SHALL AFFECT ANY RIGHT THAT THE ADMINISTRATIVE AGENT MAY OTHERWISE HAVE TO BRING ANY ACTION OR PROCEEDING RELATING TO THIS MASTER REFINANCING AGREEMENT, ANY GOVERNING AGREEMENT OR IN ANY OTHER RELATED AGREEMENT AGAINST ANY DIP SELLER, ANY AFFILIATE THEREOF OR ANY OF THEIR RESPECTIVE PROPERTIES IN THE COURTS OF ANY JURISDICTION.  Each of the parties hereto hereby irrevocably and unconditionally waives, to the fullest extent it may legally and effectively do so, any objection which it may now or hereafter have to the laying of venue of any suit, action or proceeding arising out of or relating to this Master Refinancing Agreement in the Bankruptcy Court or any such New York State or federal court referred to above. Each of the parties hereto hereby irrevocably waives, to the fullest extent permitted by law, the defense of an inconvenient forum to the maintenance of such action or proceeding in any such court. 
N.    Termination Date.  The commitments of the Secured Parties under the DIP Warehouse Facility Agreements shall automatically terminate by their own terms upon the occurrence the Termination Date.  Notwithstanding the occurrence of the Termination Date, (i) this Master Refinancing Agreement shall remain in full force and effect and (ii) the Administrative Agent and the other Secured Parties shall continue to have all of their respective rights and remedies set forth in the DIP Warehouse Facility Agreements until the Secured Obligations have been indefeasibly paid in full in cash and all the commitments of the Secured Parties under the DIP Warehouse Facility Agreements have terminated or expired.


31
2014058.10-NYCSR07A - MSW





O.    General Interpretive Principles.  For purposes of this Master Refinancing Agreement, except as otherwise expressly provided or unless the context otherwise requires:
1.the terms defined in this Master Refinancing Agreement have the meanings assigned to them in this Master Refinancing Agreement and include the plural as well as the singular, and the use of any gender herein shall be deemed to include the other gender;
2.accounting terms not otherwise defined herein have the meanings assigned to them in accordance with GAAP, and all financial computations required under this Master Refinancing Agreement shall be made, in accordance with GAAP, consistently applied;
3.references herein to “Articles”, “Sections”, “Subsections”, “Paragraphs”, and other subdivisions without reference to a document are to designated Articles, Sections, Subsections, Paragraphs and other subdivisions of this Master Refinancing Agreement;
4.a reference to a Subsection without further reference to a Section is a reference to such Subsection as contained in the same Section in which the reference appears, and this rule shall also apply to Paragraphs and other subdivisions;
5.the words “herein”, “hereof”, “hereunder” and other words of similar import refer to this Master Refinancing Agreement as a whole and not to any particular provision; 
6.the term “include” or “including” shall mean without limitation by reason of enumeration; 
7.all times specified herein or in any other DIP Warehouse Facility Agreement are local times in New York, New York unless otherwise stated; 
8.the headings in this Master Refinancing Agreement are for convenience of reference only and shall not define or limit the provisions hereof;
9.all references herein or in any other DIP Warehouse Facility Agreement to “good faith” means good faith as defined in Section 5 102(7) of the UCC as in effect in the State of New York; 
10.any definition of or reference to any agreement, instrument or other document shall be construed as referring to such agreement, instrument or other document as from time to time amended, supplemented or otherwise modified (subject to any restrictions on such amendments, supplements or modifications set forth herein or in any other  DIP Warehouse Facility Agreement); 
11.any reference to any law shall include all statutory and regulatory provisions consolidating, amending, replacing or interpreting such law and any reference to any law or regulation shall, unless otherwise specified, refer to such law or regulation as amended, modified or supplemented from time to time; and


32
2014058.10-NYCSR07A - MSW





12.any reference herein to the termination of all the commitments under the Governing Agreements or words of similar import shall refer to (i) the reduction to zero of the Maximum Available Funding for each Governing Agreement and the Maximum Combined Purchase Price and (ii) the termination of any other commitment of any Secured Party to extend credit under, or enter into transactions pursuant to, any of the DIP Warehouse Facility Agreements.
[Signature Pages Follow]




33
2014058.10-NYCSR07A - MSW



EXHIBIT 10.40



IN WITNESS WHEREOF, the undersigned have caused this Master Refinancing Agreement to be duly executed as of the date first above written.
BARCLAYS BANK PLC,  
as Administrative Agent
By    /s/ Joseph O’ Doherty            
Name: Joseph O’ Doherty
Title:   Managing Director


BARCLAYS BANK PLC,  
as a Buyer and a Committed Buyer


By    /s/ Joseph O’ Doherty            
Name: Joseph O’ Doherty
Title:   Managing Director


BARCLAYS CAPITAL INC.,  
as an MSFTA Counterparty


By    /s/ Joseph O’ Doherty            
Name: Joseph O’ Doherty
Title:   Managing Director






Signature Page to Master Refinancing Agreement






NOMURA CORPORATE FUNDING AMERICAS, LLC, as a Buyer and a Committed Buyer


By /s/ Kelvin Ji                    
Name: Kelvin Ji
Title:   Managing Director


NOMURA SECURITIES INTERNATIONAL, INC., as an MSFTA Counterparty


By    /s/ Vincent Primiano                
Name: Vincent Primiano
Title:   Managing Director








Signature Page to Master Refinancing Agreement






DITECH FINANCIAL LLC,  
as a DIP Seller
By    /s/ Joanna Colaneri                
Name: Joanna Colaneri
Title:   Senior Vice President and Treasurer


REVERSE MORTGAGE SOLUTIONS, INC.,  
as a DIP Seller


By    /s/ Andrew Dokos                
Name: Andrew Dokos
Title:   Vice President and Treasurer


RMS REO BRC II, LLC, as a DIP Seller


By    /s/ Andrew Dokos                
Name: Andrew Dokos
Title:   Vice President and Treasurer


DITECH HOLDING CORPORATION,  
as Guarantor


By    /s/ Joanna Colaneri                
Name: Joanna Colaneri
Title:   Senior Vice President and Treasurer








Signature Page to Master Refinancing Agreement






SCHEDULE I
CERTAIN CLOSING DOCUMENTS


[see attached]






Sched. I-1
2014058.10-NYCSR07A - MSW






SCHEDULE II


SPECIFIED EXISTING PROGRAM AGREEMENTS


	
		
	Ditech Repurchase Agreement:
	•    Amended and Restated Block Account Control Agreement, made and effective as of the Effective Date, among Barclays Bank PLC, as Administrative Agent, Ditech Financial LLC and U.S. Bank National Association.  


•    Amendment No. 8 to the Intercreditor Agreement, made and effective as of the Effective Date, among Credit Suisse First Boston Mortgage Capital LLC, Barclays Bank PLC and Ditech Financial LLC.


•    Amendment No. 8 to Joint Account Control Agreement, made and effective as of the Effective Date, among Deutsche Bank National Trust Company, Ditech Financial LLC, Credit Suisse First Boston Mortgage Capital LLC and Barclays Bank PLC, as Administrative Agent.  


•    Amendment No. 8 to Joint Securities Account Control Agreement, made and effective as of the Effective Date, among Deutsche Bank National Trust Company, Ditech financial LLC, Credit Suisse First Boston Mortgage Capital LLC and Barclays Bank PLC, as Administrative Agent.








Sched. II-1
2014058.10-NYCSR07A - MSW





	
		
	RMS Repurchase Agreement:
	•    Amended and Restated Reverse Master Repurchase Agreement, made and effective as of the Effective Date, among (i) Barclays Bank PLC, as Administrative Agent, Nomura Corporate Funding Americas, LLC, as a purchaser, Barclays Bank PLC, as a purchaser, Reverse Mortgage Solutions, Inc. and RMS REO BRC II, LLC. 


•    Amended and Restated Reverse Custodial Agreement, made and effective as of the Effective Date, among RMS REO BRC II, LLC, Reverse Mortgage Solutions, Inc., Deutsche Bank National Trust Company, Barclays Bank PLC, as Administrative Agent, Nomura Corporate Funding Americas, LLC, as a purchaser, and Barclays Bank PLC, as a purchaser. 


•    Amendment No. 1 to RMS REO BRC II, LLC Limited Liability Company Agreement, made and effective as of the Effective Date.


•    Amended and Restated Deposit Account Control Agreement, made and effective as of the Effective Date, among Reverse Mortgage Solutions, Inc., Barclays Bank PLC, as Administrative Agent, and Wells Fargo Bank, NA.


•    Nominee Agreement, made and effective as of May 21, 2018, among RMS REO BRC II, LLC and Reverse Mortgage Solutions, Inc.


•    Flow Assignment Agreement, made and effective as of May 21, 2018, among Reverse Mortgage Solutions, Inc., as assignor, and RMS REO BRC II, LLC, as assignee.


•    Flow Assignment Agreement, made and effective as of May 21, 2018, among RMS REO BRC II, LLC, as assignor, and Reverse Mortgage Solutions, Inc., as assignee.



	SAF Agency Indenture:
	•    Amendment No. 1 to Receivable Sales Agreement, made and effective as of the Effective Date, among Ditech Financial LLC, Ditech Agency Advance Depositor LLC and Ditech Holding Corporation.


•    Amendment No. 1 to Trust Agreement, made and effective as of the Effective Date, among Ditech Agency Advance Depositor LLC, Wilmington Trust, National Association and Ditech Financial LLC.


•    Amendment No. 1 to Amended and Restated Limited Liability Company Agreement, made and effective as of the Effective Date, among Ditech Agency Advance Depositor LLC, Ditech Financial LLC and Albert Fioravanti.


•    Amendment No. 2 to Fannie Mae Acknowledgement Agreement, made and effective as of the Effective Date, among Ditech Financial LLC, Ditech Agency Advance Depositor LLC, Ditech Agency Advance Trust, Well Fargo Bank, NA, Barclays Bank PLC, as DIP SAF Agency Agent, and Fannie Mae.








Sched. II-2
2014058.10-NYCSR07A - MSW





	
		
	SAF PLS Indenture:
	•    Amendment No. 1 to Receivable Sales Agreement, made and effective as of the Effective Date, among Ditech Financial LLC, Ditech PLS Advance Depositor LLC and Ditech Holding Corporation.


•    Amendment No. 1 to Trust Agreement, made and effective as of the Effective Date, among Ditech PLS Advance Depositor LLC, Wilmington Trust, National Association and Ditech Financial LLC.


•    Amendment No. 1 to Amended and Restated Limited Liability Company Agreement, made and effective as of the Effective Date, among Ditech PLS Advance Depositor LLC, Ditech Financial LLC and Albert Fioravanti.












Sched. II-3
2014058.10-NYCSR07A - MSW






EXHIBIT A
PREPETITION WAREHOUSE FACILITY AGREEMENTS
		
	1.
	Amended and Restated Master Repurchase Agreement, dated as of November 18, 2016, by and among Ditech Financial LLC, as seller, Credit Suisse First Boston Mortgage Capital LLC, as administrative agent, and the buyers party thereto, as amended and in effect as of the Petition Date.


		
	2.
	Master Repurchase Agreement, dated as of April 23, 2018, between Reverse Mortgage Solutions, Inc. as seller and Barclays Bank PLC, as purchaser and agent, as amended and in effect as of the Petition Date.


		
	3.
	Second Amended and Restated Master Repurchase Agreement, dated as of November 30, 2017, by and among Reverse Mortgage Solutions, Inc., as seller, the other seller parties party thereto, Credit Suisse First Boston Mortgage Capital LLC, as administrative agent, and the buyers party thereto, as amended and in effect as of the Petition Date.


		
	4.
	Series 2018-VF1 Advance Receivables Backed Notes issued pursuant to an Indenture and the supplement thereto, each dated as of February 9, 2018, among Ditech Agency Advance Trust, as issuer, Wells Fargo, as indenture agent, calculation agent, paying agent and securities intermediary, Ditech Financial LLC, as servicer and administrator, and Credit Suisse First Boston Mortgage Capital LLC, as administrative agent, as amended and in effect as of the Petition Date.


		
	5.
	Series 2018-VF1 Advance Receivables Backed Notes issued pursuant to an Indenture and the supplement thereto, each dated as of February 9, 2018, among Ditech PLS Advance Trust II, as issuer, Wells Fargo, as indenture trustee, calculation agent, paying agent and securities intermediary, Ditech Financial LLC, as servicer and administrator, and Credit Suisse First Boston Mortgage Capital LLC, as administrative agent, as amended and in effect as of the Petition Date.








Ex. A-1
2014058.10-NYCSR07A - MSW






EXHIBIT B
INTERIM DIP ORDER
[see attached]




Ex. B-1
2014058.10-NYCSR07A - MSW