EX-10.29.4





 Exhibit 10.29.4 

EXECUTION VERSION 
  





 
 AMENDMENT NO. 4 TO 

AMENDED AND RESTATED MASTER REPURCHASE AGREEMENT 

This AMENDMENT NO. 4 TO AMENDED AND RESTATED MASTER REPURCHASE AGREEMENT (this “Amendment”) is made and entered into as of July 14,
2017 by and between Bank of America, N.A. (“Buyer”) and loanDepot.com, LLC (“Seller”). This Amendment amends that certain Amended and Restated Master Repurchase Agreement by and between Buyer and Seller, dated as of
July 17, 2015 (as amended, restated, supplemented or otherwise modified from time to time, the “Agreement”). 
 R E
C I T A L S 
 Buyer and Seller have previously entered into the Agreement pursuant to which Buyer may, from time to time, purchase
certain mortgage loans from Seller and Seller agrees to sell certain mortgage loans to Buyer under a master repurchase facility. Buyer and Seller hereby agree that the Agreement shall be amended as more fully provided herein. 

In consideration of the mutual promises contained herein, and for other good and valuable consideration, the receipt and sufficiency of which are hereby
acknowledged, Buyer and Seller hereby agree as follows: 
  

	1.	 Amendments. Effective as of July 14, 2017 (the “Effective Date”), the
Agreement is hereby amended as follows: 


 (a) Section 3.2 of the Agreement is hereby amended by
deleting paragraph (a) thereof its entirety and replacing it with the following: 
  

	 	(a)	 Request for Transaction. Seller shall request a Transaction by delivering to Buyer, electronically or in
writing, an Asset Data Record for each Mortgage Loan intended to be the subject of the Transaction no later than the Transaction Request Deadline. Buyer shall be under no obligation to enter into any Transaction or Transactions requested by Seller.
If Buyer decides to enter into a Transaction, Buyer shall confirm to Seller the terms of Transactions electronically or in writing. Buyer reserves the right to reject any Transaction request that Buyer determines, in its sole and good faith
discretion, fails to comply with the terms and conditions of this Agreement or Buyer’s then current policies and procedures. 



(b) Section 3.5 of the Agreement is hereby amended by deleting paragraph (e) thereof its entirety and replacing
it with the following (modified text underlined for review purposes): 
  

	 	(e)	 Security Interest. Any funds of Seller at any time deposited or held in the Over/Under Account, whether
such funds are required to be deposited and held in the Over/Under Account pursuant to this Section 3.5 or otherwise, are hereby pledged by Seller as security for its obligations under this Agreement, and Seller hereby grants a security
interest in such funds to Buyer, and such pledge and security interest shall be considered “a security agreement or other arrangement or other credit enhancement” that is “related to” the Agreement and Transactions hereunder
within the meaning of Bankruptcy Code Sections 101(38A)(A), 101(47)(a)(v) and 741(7)(A)(x). 


 (c)
Section 3.6 of the Agreement is hereby amended by deleting the third sentence of paragraph (b)(i) thereof. 












 (d) Section 6.2(e) of the Agreement is hereby amended by deleting
paragraph (iv) thereof in its entirety and replacing it with the following (modified text underlined for review purposes): 
  

	 	(iv)	 At Buyer’s request, Seller shall promptly deliver to Buyer reports regarding the status of any Purchased
Mortgage Loan being subserviced by it, which reports shall include, but shall not be limited to, a description of any default thereunder for more than thirty (30) days or such other circumstances that could cause a Material and Adverse
Change on such Purchased Mortgage Loan, Buyer’s title to such Purchased Mortgage Loan or the collateral securing such Purchased Mortgage Loan; Seller is required to deliver such reports until the repurchase of the Purchased Mortgage Loan by
Seller; and 


 (e) Section 14.25 of the Agreement is hereby amended by deleting it in its
entirety and replacing it with the following (modified text underlined for review purposes): 
  

	 	14.25	 Amendment and Restatement. Buyer and Seller entered into the Original Agreement. Buyer and Seller desire
to enter into this Agreement in order to amend and restate the Original Agreement in its entirety. The amendment and restatement of the Original Agreement shall become effective on the Effective Date, and each of Buyer and Seller shall
hereafter be bound by the terms and conditions of this Agreement and the other Principal Agreements. This Agreement amends and restates the terms and conditions of the Original Agreement, and is not a novation of any of the agreements or
obligations incurred pursuant to the terms of the Original Agreement. Accordingly, all of the agreements and obligations incurred pursuant to the terms of the Original Agreement are hereby ratified and affirmed by the parties hereto and remain in
full force and effect.    For the avoidance of doubt, it is the intent of Buyer and Seller that the security interests and liens granted in the Purchased Assets pursuant to Section 6.1 of the
Original Agreement shall continue in full force and effect. All references to the Original Agreement in any Principal Agreement or other document or instrument delivered in connection therewith shall be deemed to refer to this Agreement and the
provisions hereof. 


 (f) Exhibit A to the Agreement is hereby amended by deleting the definitions of
“Accepted Servicing Practices”, “Government Mortgage Loan”, “Jumbo Mortgage Loan”, “Mortgage Loan Documents”, “Other Mortgage Loan Documents”, “Reportable Event” and “S&P” in
their respective entireties and replacing them with the following (modified text underlined for review purposes): 
 Accepted
Servicing Practices: With respect to any Purchased Mortgage Loan, those accepted and prudent mortgage servicing practices and procedures (including collection procedures) of prudent mortgage lending institutions which service mortgage
loans of the same type as such Purchased Mortgage Loan in the jurisdiction where the related Mortgaged Property is located. 

Government Mortgage Loan: Unless defined otherwise in the Transactions Terms Letter, a first lien mortgage loan that is: 

(a) subject to FHA Mortgage Insurance under a FHA Mortgage Insurance Contract and is so insured, or is subject to a current binding and
enforceable commitment for such insurance pursuant to the provisions of the National Housing Act, as amended, was originated in Strict Compliance with the Ginnie Mae Guide, is eligible for inclusion in the Ginnie Mae Program, and unless
otherwise agreed to by Buyer in its sole discretion, does not exceed the applicable maximum mortgage limits as set forth in the FHA Regulations; 

  
 2 













 (b) subject to a guarantee by the VA under a VA Loan Guaranty Agreement, or
is subject to a current binding and enforceable commitment for such guarantee pursuant to the provisions of the Servicemen’s Readjustment Act, as amended, was originated in Strict Compliance with VA Regulations and the Ginnie Mae Guide, is
eligible for inclusion in the Ginnie Mae Program, and unless otherwise agreed to by Buyer in its sole discretion, does not exceed the applicable maximum mortgage limits as set forth in the VA Regulations; or 

(c) eligible to be guaranteed by the RD under a RD Loan Guaranty Agreement, and is so guaranteed pursuant to the provisions of the RD
Regulations, and was originated in Strict Compliance with RD Regulations and the Ginnie Mae Guide, is eligible for inclusion in the Ginnie Mae Program, and unless otherwise agreed to by Buyer in its sole discretion, does not exceed
the applicable maximum mortgage limits as set forth in the RD Regulations. 
 Jumbo Mortgage Loan: Unless defined
otherwise in the Transactions Terms Letter, a first lien mortgage loan or Cooperative Loan (i) with respect to which Seller has obtained a Purchase Commitment on or prior to the related Purchase Date, unless otherwise agreed to by Buyer
(ii) for which the original loan amount is greater than the conforming limit in the jurisdiction where the related Mortgaged Property is located, and (iii) meets the transaction requirements set forth on the applicable schedule to
the Transactions Terms Letter. 
 Mortgage Loan Documents: With respect to each Purchased Mortgage Loan, each document
listed on Exhibit 12 to the Custodial Agreement. 
 Other Mortgage Loan Documents: In addition to the Mortgage Loan
Documents, with respect to any Mortgage Loan, the following: (i) the original recorded Mortgage, if not included in the Mortgage Loan Documents; (ii) a copy of the preliminary title commitment showing the policy number or preliminary
attorney’s opinion of title and the original policy of mortgagee’s title insurance or unexpired commitment for a policy of mortgagee’s title insurance, if not included in the Mortgage Loan Documents; (iii) the original Closing
Protection Letter and a copy of the Irrevocable Closing Instructions; (iv) the original Purchase Commitment, if any; (v) the original FHA certificate of insurance or commitment to insure, the VA certificate of guaranty or commitment to
guaranty, the RD Loan Guaranty Agreement or the Insurer’s certificate or commitment to insure, as applicable; (vi) the survey, flood certificate, hazard insurance policy and flood insurance policy, as applicable; (vii) the
original of any assumption, modification, consolidation or extension agreements, with evidence of recording thereon or copies stamp certified by an authorized officer of Seller to have been sent for recording, if any; (viii) copies of each
instrument necessary to complete identification of any exception set forth in the exception schedule in the title policy; (ix) the loan application; (x) verification of the Mortgagor’s employment and income, if applicable;
(xi) verification of the source and amount of the downpayment; (xii) credit report on Mortgagor; (xiii) appraisal of the Mortgaged Property (or in the case of any HARP Mortgage Loan, an appraisal or a waiver thereof, and/or a point
value estimate, as permitted by the applicable Agency guidelines); (xiv) the original executed disclosure statement; (xv) tax receipts, insurance premium receipts, ledger sheets, payment records, insurance claim files and correspondence,
current and historical computerized data files, underwriting standards used for origination and all other related papers and records; (xvi) the original of any guarantee executed in connection with the Mortgage Note (if any); (xvii) the
original of any security agreement, chattel mortgage or equivalent document executed in connection with the Mortgage; (xviii) all copies of powers of attorney or similar instruments, if applicable; (xix) copies of all documentation in
connection with the underwriting and origination of any Purchased Mortgage Loan that evidences compliance with, (1) with respect to all Purchased Mortgage Loans other than a Bond Loan – 1st Lien or a Ginnie Mae EBO Mortgage Loan for which
the originator received the related application prior to January 10, 2014, the Ability to Repay Rule and, (2) with respect to all Purchased Mortgage Loans other than a 

  
 3 













 
Bond Loan – 1st Lien, a Ginnie Mae EBO Mortgage Loan for which the originator received the related application prior to January 10, 2014 or a Permitted
Non-Qualified Mortgage Loan, the QM Rule; and (xx) all other documents relating to the Purchased Mortgage Loan. 

Reportable Event: An event described in Section 4043(c) of ERISA with respect to a Plan as to which the thirty
(30) days’ notice requirement has not been waived by the PBGC. 
 S&P: S&P Global Ratings, a
division of S&P Global Inc., and any successor thereto. 
 (g) Exhibit A to the Agreement is hereby amended by inserting
the following new definitions in the appropriate alphabetical order: 
 Agency Eligible Escrow Mortgage Loan: An Agency
Eligible Mortgage Loan or Government Mortgage Loan in respect of which (i) the full original principal amount of such Mortgage Loan has not been fully advanced or disbursed as of the related origination date, (ii) all subsequent advances
or disbursements are made in accordance with the Agency guidelines and (iii) has been approved by Buyer in its sole discretion. 

Anti-Money Laundering Laws: As defined in Exhibit L, “Representations and Warranties Concerning Seller”,
paragraph (v). 
 FHA Mortgage Insurance Contract: A contractual obligation of the FHA respecting the insurance of a Mortgage
Loan. 
 Ginnie Mae Program: The Ginnie Mae Mortgage-Backed Securities Programs, as described in the Ginnie Mae Guide. 

Lien: Any mortgage, lien, pledge, charge, security interest or similar encumbrance. 

RD Loan Guaranty Agreement: The obligation of the United States to pay a specific percentage of a Mortgage Loan (subject to a
maximum amount) upon default of the Mortgagor. 
 Sanctions: As defined in Exhibit L, “Representations and
Warranties Concerning Seller”, paragraph (u). 
 Uniform Commercial Code: The Uniform Commercial Code as in effect on the
date hereof in the State of New York or the Uniform Commercial Code as in effect in the applicable jurisdiction. 
 VA Loan
Guaranty Agreement: The obligation of the United States to pay a specific percentage of a Mortgage Loan (subject to a maximum amount) upon default of the Mortgagor pursuant to the Servicemen’s Readjustment Act, together with all
amendments, modifications, supplements and restatements thereto. 
 VA Regulations: Regulations promulgated by the U.S.
Department of Veterans Affairs pursuant to the Servicemen’s Readjustment Act, as amended, codified in 38 Code of Federal Regulations, and other VA issuances relating to Government Mortgage Loans, including related handbooks, circulars and
notices. 
 (h) Exhibit L, “Representations and Warranties Concerning Seller”, is hereby further amended by adding the
following new paragraphs immediately following paragraph (t) thereof: 

  
 4 














	 	(u)	 No Sanctions. Neither Seller nor any of its Affiliates, officers, directors, partners or members,
(i) is an entity or person (or to the Seller’s knowledge, owned or controlled by an entity or person) that (A) is currently the subject of any economic sanctions administered or imposed by the Office of Foreign Assets Control of the
U.S. Department of the Treasury, the U.S. Department of State, the United Nations Security Council, the European Union, Her Majesty’s Treasury or any other relevant authority (collectively, “Sanctions”) or (B) resides, is
organized or chartered, or has a place of business in a country or territory that is currently the subject of Sanctions or (ii) is engaging or will engage in any dealings or transactions prohibited by Sanctions or will directly or indirectly
use the proceeds of any Transactions contemplated hereunder, or lend, contribute or otherwise make available such proceeds to or for the benefit of any person or entity, for the purpose of financing or supporting, directly or indirectly, the
activities of any person or entity that is currently the subject of Sanctions. 


  

	 	(v)	 Anti-Money Laundering Laws. Seller has complied with all applicable anti-money laundering laws and
regulations, including, without limitation, the USA Patriot Act of 2001, as amended, and the Bank Secrecy Act of 1970, as amended (collectively, the “Anti Money Laundering Laws”); Seller has established an anti-money laundering
compliance program as required by the Anti-Money Laundering Laws, has conducted the requisite due diligence in connection with the origination of each Purchased Mortgage Loan for purposes of the Anti-Money Laundering Laws, including with respect to
the bona fide identity of the applicable Mortgagor and the origin of the assets used by said Mortgagor to purchase the property in question, and maintains, and will maintain, sufficient information to identify the applicable Mortgagor for purposes
of the Anti-Money Laundering Laws. 


 (i) Exhibit L, “Representations and Warranties Concerning Purchased
Assets”, is hereby further amended by adding the following new paragraphs immediately following paragraph (ff) thereof: 
  

	 	(gg)	 Occupancy and Use of the Mortgaged Property. As of the Purchase Date the Mortgaged Property is lawfully
occupied under applicable law. All inspections, licenses and certificates required to be made or issued with respect to all occupied portions of the Mortgaged Property and, with respect to the use and occupancy of the same, including but not limited
to certificates of occupancy and fire underwriting certificates, have been made or obtained from the appropriate authorities. Seller has not received notification from any Governmental Authority that the Mortgaged Property is in material non-compliance with such laws or regulations, is being used, operated or occupied unlawfully or has failed to have or obtain such inspection, licenses or certificates, as the case may be. Seller has not received
notice of any violation or failure to conform with any such law, ordinance, regulation, standard, license or certificate. Solely with respect to Jumbo Mortgage Loans and Closed-End Second Lien Mortgage Loans,
and to the best of Seller’s knowledge, the Mortgaged Property is not being used for business purposes, as defined in the Federal Truth-in-Lending Act of 1968, as
amended, and Regulation Z thereunder. 


  

	2.	 No Other Amendments; Conflicts with Previous Amendments. Other than as expressly modified and
amended herein, the Agreement shall remain in full force and effect and nothing herein shall affect the rights and remedies of Buyer as provided under the Agreement. To the extent any amendments to the Agreement contained herein conflict with any
previous amendments to the Agreement, the amendments contained herein shall control. 


  

	3.	 Capitalized Terms. Any capitalized term used herein and not otherwise defined herein shall have
the meaning ascribed to such term in the Agreement. 



  
 5 














	4.	 Representations. In order to induce Buyer to execute and deliver this Amendment, Seller hereby
represents to Buyer that as of the date hereof, (i) Seller is in full compliance with all of the terms and conditions of the Principal Agreements and remains bound by the terms thereof and (ii) no Potential Default or Event of Default has
occurred and is continuing under the Principal Agreements. 


  

	5.	 Governing Law. This Amendment shall be construed in accordance with the laws of the State
of New York without regard to any conflicts of law provisions (except for Section 5-1401 of the New York General Obligations Law which shall govern). All legal actions between or among the parties
regarding the Agreement, including, without limitation, legal actions to enforce the Agreement or because of a dispute, breach or default of the Agreement, shall be brought in the federal or state courts located in New York County, New York, which
courts shall have sole and exclusive in personam, subject matter and other jurisdiction in connection with such legal actions and the parties acknowledge and agree that venue in such courts shall be convenient and appropriate for all purposes.



  

	6.	 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. 



 

	7.	 Counterparts. For the purpose of facilitating the execution of this Amendment, and for other
purposes, this Amendment may be executed simultaneously in any number of counterparts. Each counterpart shall be deemed to be an original, and all such counterparts shall constitute one and the same instrument. Facsimile signatures shall be deemed
valid and binding to the same extent as the original. 


 [signature page follows] 

  
 6 













 IN WITNESS WHEREOF, Buyer and Seller have caused their names to be signed hereto by their respective
officers thereunto duly authorized as of the date first written above. Buyer shall have no obligation to honor the terms and conditions of this Amendment if Seller fails to fully execute and return this document to Buyer within three (3) days
after the date hereof. 
  

									
	BANK OF AMERICA, N.A.	  		  	LOANDEPOT.COM, LLC 
					
	By:	 	  
	  		  	By:	 	
                     
                                         
   

	Name:	 		  	    	  	Name:	 	
	Title:	 		  		  	Title: