EX-10.22.7





 Exhibit 10.22.7 

EXECUTION 
 AMENDMENT NO.
7 
 TO MASTER REPURCHASE AGREEMENT 

Amendment No. 7 to Master Repurchase Agreement, dated as of December 15, 2017 (this “Amendment”), between UBS AG,
by and through its branch office at 1285 Avenue of the Americas, New York, New York (the “Buyer”) and loanDepot.com, LLC (the “Seller”). 

RECITALS 
 The Buyer and
Seller are parties to that certain (a) Master Repurchase Agreement, dated as of June 1, 2015 (as amended by Amendment No. 1, dated as of September 4, 2015, Amendment No. 2, dated as of October 30, 2015, Amendment
No. 3, dated as of April 26, 2016, Amendment No. 4, dated as of July 26, 2016, Amendment No. 5, dated as of March 21, 2017 and Amendment No. 6, dated as of April 25, 2017, the “Existing Repurchase
Agreement”; as further amended by this Amendment, the “Repurchase Agreement”) and (b) Pricing Letter, dated as of June 1, 2015 (as amended, restated, supplemented or otherwise modified from time to time, the
“Pricing Letter”). Capitalized terms used but not otherwise defined herein shall have the meanings given to them in the Existing Repurchase Agreement. 

Accordingly, the Buyer and Seller hereby agree, in consideration of the mutual promises and mutual obligations set forth herein, that the
Existing Repurchase Agreement is hereby amended as follows: 
 SECTION 1. Definitions. Section 2 of the Existing Repurchase
Agreement is hereby amended by adding the following definition of “Maximum Committed Purchase Price” in its proper alphabetical order: 

“Maximum Committed Purchase Price” shall have the meaning set forth in the Pricing Letter. 

SECTION 2. Initiation; Termination. Section 3(c) of the Existing Repurchase Agreement is hereby amended by deleting subclause
(iii) in its entirety and replacing it with the following: 
 (iii) Following receipt of such request, Buyer shall agree to enter into
such requested Transaction so long as the conditions set forth herein are satisfied and after giving effect to the requested Transaction the aggregate outstanding Purchase Price does not exceed the Maximum Committed Purchase Price, in which case
Buyer shall remit the Purchase Price pursuant to the Seller’s Wiring Instructions 
 SECTION 3. Exhibits. The Existing
Repurchase Agreement is hereby amended by deleting Exhibit G in its entirety and replacing it with Annex A attached hereto. 

SECTION 4. Conditions Precedent. This Amendment shall become effective as of the date hereof, subject to the satisfaction of
the following conditions precedent: 
 (w) Buyer shall have received this Amendment, executed and delivered by duly authorized officers of
the Buyer and Seller; and 

  
 1 













 (x) such other documents as the Buyer or counsel to the Buyer may reasonably request. 

SECTION 5. Ratification of Agreement. As amended by this Amendment, the Existing Repurchase Agreement is in all respects ratified
and confirmed and the Existing Repurchase Agreement as so modified by this Amendment shall be read, taken, and construed as one and the same instrument. 

SECTION 6. Representations and Warranties. Seller hereby represents and warrants to the Buyer that, giving effect to this
Amendment, it is in compliance with all the terms and provisions set forth in the Repurchase Agreement on its part to be observed or performed, and that no Default or Event of Default has occurred or is continuing, and hereby confirms and reaffirms
the representations and warranties contained in Section 10 of the Repurchase Agreement. Seller hereby represents and warrants that this Amendment has been duly and validly executed and delivered by it, and constitutes its legal, valid and
binding obligation, enforceable against it in accordance with its terms. 
 SECTION 7. Limited Effect. Except as expressly
amended and modified by this Amendment, the Existing Repurchase Agreement shall continue to be, and shall remain, in full force and effect in accordance with its terms. 

SECTION 8. 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. 

SECTION 9. Counterparts. This Amendment may be executed in any number of counterparts, all of which taken together shall
constitute one and the same instrument, and any of the parties hereto may execute this Amendment by signing any such counterpart. The parties agree that this Amendment, any documents to be delivered pursuant to this Amendment and any notices
hereunder may be transmitted between them by email and/or by facsimile. Delivery of an executed counterpart of a signature page of this Amendment in Portable Document Format (PDF) or by facsimile shall be effective as delivery of a manually executed
original counterpart of this Amendment. The original documents shall be promptly delivered, if requested. 
 SECTION 10. Binding
Effect. This Amendment shall be binding upon and inure to the benefit of the parties hereto and their respective successors and assigns. 

SECTION 11. GOVERNING LAW. THIS AMENDMENT AND ANY CLAIM, CONTROVERSY OR DISPUTE ARISING UNDER OR RELATED TO THIS
AMENDMENT, THE RELATIONSHIP OF THE PARTIES TO THIS AMENDMENT, AND/OR THE INTERPRETATION AND ENFORCEMENT OF THE RIGHTS AND DUTIES OF THE PARTIES TO THIS AMENDMENT SHALL BE GOVERNED BY AND CONSTRUED IN ACCORDANCE WITH THE INTERNAL LAWS AND DECISIONS
OF THE STATE OF NEW YORK, WITHOUT REGARD TO THE CHOICE OF LAW RULES THEREOF. THE PARTIES HERETO INTEND THAT THE PROVISIONS OF SECTION 5-1401 OF THE NEW YORK GENERAL OBLIGATIONS LAW SHALL APPLY TO THIS
AMENDMENT. NOTWITHSTANDING ANYTHING TO THE CONTRARY, THE  

  
 2 













 
EFFECTIVENESS, VALIDITY AND ENFORCEABILITY OF ELECTRONIC CONTRACTS, OTHER RECORDS, ELECTRONIC RECORDS AND ELECTRONIC SIGNATURES USED IN CONNECTION WITH ANY ELECTRONIC TRANSACTION BETWEEN BUYER
AND SELLER SHALL BE GOVERNED BY E-SIGN. 
 [SIGNATURE PAGE FOLLOWS] 

  
 3 













 IN WITNESS WHEREOF, the parties have caused their names to be signed hereto by their
respective officers thereunto duly authorized as of the day and year first above written. 
  

			
	 UBS AG, BY AND THROUGH ITS BRANCH OFFICE AT 1285 AVENUE OF THE AMERICAS, NEW YORK, NEW
YORK, as Buyer



 
			
		
	By:	 	  

		 	Name:
		 	Title:
		
	By:	 	  

		 	Name:
		 	Title:


 
			
	
	LOANDEPOT.COM, LLC, as Seller


 
			
		
	By:	 	  

		 	Name:
		 	Title:



  
 Signature Page to
Amendment No. 7 to Master Repurchase Agreement 













 ANNEX A TO THE AMENDMENT 

EXHIBIT G 
 FORM OF
TEMPORARY INCREASE REQUEST 
 UBS AG, by and through its branch office at 1285 Avenue of the Americas, New York, New York 

1285 Avenue of the Americas 
 New York, NY 10019 

Attention: Gary Timmerman 
 Telephone: (212) 649-8156 
 Facsimile: (212) 713-9640 

Email: Gary.Timmerman@ubs.com 
 Re: The Master
Repurchase Agreement, dated as of June 1, 2015 (the “Repurchase Agreement”), between UBS AG, by and through its branch office at 1285 Avenue of the Americas, New York, New York (“Buyer”) and loanDepot.com, LLC
(“Seller”) 
 Ladies and Gentlemen: 

In accordance with Section 3(f) of the Repurchase Agreement, Buyer hereby consents to a Temporary Increase of the Maximum Aggregate
Purchase Price or the Maximum Committed Purchase Price as further set forth below: 
 Amount of Temporary Increase: $__________________. 

Temporary Maximum Aggregate Purchase Price: $__________________. 

Temporary Maximum Committed Purchase Price: $__________________. 

Effective date: [                ] 

Expiration date: [                ] 

On and after the effective date indicated above and until the expiration date indicated above, the Maximum Aggregate Purchase Price and/or
Maximum Committed Purchase Price (if applicable) shall equal the Temporary Maximum Aggregate Purchase Price and/or Temporary Maximum Committed Purchase Price, respectively, indicated above for all purposes of the Repurchase Agreement and all
calculations and provisions relating to the Maximum Aggregate Purchase Price and/or Maximum Committed Purchase Price shall refer to the Temporary Maximum Aggregate Purchase Price and/or Temporary Maximum Committed Purchase Price, respectively,
including without limitation, Concentration Limits. 

  
 Exhibit G 













 Unless otherwise terminated pursuant to the Repurchase Agreement, this Temporary Increase
shall terminate on the expiration date indicated above. Upon the termination of this Temporary Increase, Seller shall repurchase Purchased Assets such that (i) the aggregate outstanding Purchase Price of all Transactions does not exceed the
Maximum Aggregate Purchase Price and (ii) the applicable portion of the aggregate outstanding Purchase Price of all Transactions does not exceed any Concentration Limit. 

All terms used herein and not otherwise defined herein shall have the respective meanings ascribed to such terms in the Repurchase Agreement.

  

			
	 LOANDEPOT.COM, LLC, as
Seller



 
			
		
	 By:
	 	  

		 	 Name:

		 	 Title:



 Agreed and Consented by: 
  

			
	 UBS AG, BY AND THROUGH ITS BRANCH OFFICE AT 1285 AVENUE OF THE AMERICAS, NEW YORK, NEW
YORK, as Buyer



 
			
		
	By:	 	  

		 	Name:
		 	Title:
		
	By:	 	  

		 	Name:
		 	Title:


 Date: ________________ 

  
 Exhibit G