EX-10.22.6





 Exhibit 10.22.6 

EXECUTION VERSION 

AMENDMENT NO. 6 
 TO
MASTER REPURCHASE AGREEMENT 
 Amendment No. 6 to Master Repurchase Agreement, dated as of April 25, 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, and Amendment No. 5, dated as of March 21, 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: 

1.1 deleting the definition of “Maximum Committed Purchase Price” in its entirety and all references to “Maximum
Committed Purchase Price” shall be deemed references to “Maximum Aggregate Purchase Price”; 
 1.2 deleting the
definitions of “Netting Agreement”, “Servicing Term” and “Reporting Date” in their entirety and all references thereto; 

1.3 adding the following definitions of “HomePath Mortgage Loan”, “HomePath Renovation Mortgage Loan”,
“HomeStyle Renovation Mortgage Loan” and “Warehouse Facility” in their proper alphabetical order: 

“HomePath Mortgage Loan” shall mean a Mortgage Loan that is originated in compliance with Fannie Mae’s HomePath mortgage
loan program (as such program is amended, supplemented or otherwise modified, from time to time). 
 “HomePath Renovation Mortgage
Loan” shall mean a Mortgage Loan that is originated in compliance with Fannie Mae’s HomePath mortgage loan program (as such program is amended, supplemented or otherwise modified, from time to time). 

“HomeStyle Renovation Mortgage Loan” shall mean a Mortgage Loan that is originated in compliance with Fannie Mae’s
HomeStyle Renovation mortgage loan program (as such program is amended, supplemented or otherwise modified, from time to time). 

  
 1 













 “Warehouse Facility” shall have the meaning set forth in
the Pricing Letter. 
 1.4 deleting the definitions of “Agency Approval” and “Change in
Control” in their entirety and replacing it with the following: 
 “Agency Approval” shall mean the
approvals of Seller from the relevant Agencies as set forth on Schedule 4 hereof. 
 “Change in
Control” shall mean: 
 (A) any transaction or event as a result of which (i) Parthenon Capital Partners ceases
to own, directly or indirectly, at least 50% of the membership interests of Seller or (ii) Anthony Hsieh ceases to own, directly or indirectly, at least 5% of the membership interests of Seller; or 

(B) the sale, transfer, or other disposition of all or substantially all of any Seller Party’s assets (excluding any such
action taken in connection with any securitization transaction); or 
 (C) the consummation of a merger or consolidation of a
Seller Party with or into another entity or any other corporate reorganization (in one transaction or in a series of transactions), if 50% or more of the combined voting power of the continuing or surviving entity’s stock outstanding
immediately after such merger, consolidation or such other reorganization is owned by persons who were not stockholders of Seller Party immediately prior to such merger, consolidation or other reorganization; or 

(D) Mr. Anthony Hsieh shall (i) no longer be employed by Seller or (ii) shall no longer be involved in the day
to day operations of Seller; or 
 (E) there is a change in the majority of the board of directors of Seller during any
twelve month period. 
 SECTION 2. Representations. Section 10 of the Existing Repurchase Agreement is hereby amended by
deleting subsection (w) in its entirety and replacing it with the following: 
 (w) Agency Approvals. With
respect to each Agency Approval, Seller is in good standing, with no event having occurred or Seller having any reason whatsoever to believe or suspect will occur, including, without limitation, a change in insurance coverage which would either make
Seller unable to comply with the eligibility requirements for maintaining all such Agency Approvals or require notification to the relevant Agency. 

SECTION 3. Covenants. Section 11 of the Existing Repurchase Agreement is hereby amended by: 

3.1 deleting the first paragraph of subsection (c)(i) in its entirety and replacing it with the following: 

  
 2 













 (i) immediately after a Responsible Officer, president, vice president,
chief executive officer, chief financial officer, chief operating officer, secretary, treasurer or controller of Seller Party has any knowledge of: 

3.2 deleting subsection (d)(iv) in its entirety and replacing it with the following: 

(iv) Unless otherwise waived by Buyer in writing, simultaneously with the furnishing of each of the Financial Statements to be
delivered pursuant to subsections (i) and (iii) above, submission of a certificate in the form of Exhibit A to the Pricing Letter and certified by the president, chief financial officer or designee as approved by Buyer of the Financial
Reporting Party, which includes detailed reporting to the materials set forth therein including without limitation, any request for repurchase of or indemnification for a Mortgage Loan purchased by a third party investor, the valuation of the
Seller’s Capitalized Mortgage Servicing Rights by any third-party evaluator and quarterly a legal and compliance questionnaire certified by the general counsel or chief/head of compliance; 

3.3 deleting subsection (p) in its entirety and replacing it with the following: 

(p) Scheduled Indebtedness. Without the prior written (i) consent of Buyer (which consent shall not be unreasonably
withheld), Financial Reporting Party shall not incur any additional material Indebtedness (other than (x) the Scheduled Indebtedness listed under the definition thereof and (y) usual and customary accounts payable for a mortgage company)
and (ii) notice to Buyer, Seller shall not incur Indebtedness under a Warehouse Facility. 
 3.4 deleting subsection (w) in its
entirety and replacing it with the following: 
 (w) Agency Approvals; Servicing. To the extent previously approved,
Seller shall maintain all Agency Approvals and in each case shall remain in good standing with respect to such Agency Approvals. Should Seller, for any reason, cease to possess all such applicable Agency Approvals to the extent necessary, should
Seller experience any change in its delegated underwriting authority from any Agency, or should notification of an adverse occurrence to the relevant Agency or to HUD, FHA, VA or RD be required, Seller shall so notify Buyer immediately in writing.
Notwithstanding the preceding sentence and to the extent previously approved, Seller shall take all necessary action to maintain all of its applicable Agency Approvals at all times during the term of this Agreement and each outstanding Transaction.
Seller shall maintain adequate financial standing, servicing facilities, procedures and experienced personnel necessary for the sound servicing of mortgage loans of the same types as may from time to time constitute Mortgage Loans and in accordance
with Accepted Servicing Practices. 
 SECTION 4. Servicing. Section 15 of the Existing Repurchase Agreement is hereby
amended by deleting subsection (c) in its entirety and replacing it with the following: 
 (c) Seller shall transfer
actual servicing of each Purchased Mortgage Loan, together with all of the related Records in its possession, to Buyer’s designee and designate Buyer’s designee as the servicer in the MERS System upon the earliest of (i) the
occurrence of a Default or Event of Default hereunder, (ii) the termination of Seller as interim servicer 

  
 3 













 
by Buyer pursuant to this Agreement or (iii) transfer of servicing to any entity approved by Buyer and the assumption thereof by such entity. Buyer shall have the right to terminate Seller
as interim servicer of any of the Purchased Mortgage Loans, which right shall be exercisable at any time in Buyer’s sole discretion, upon written notice. Seller’s transfer of the Records and servicing under this Section 15 shall be in
accordance with customary standards in the industry and such transfer shall include the transfer of the gross amount of all escrows held for the related mortgagors (without reduction for unreimbursed advances or “negative escrows”). 

SECTION 5.    Notices. Section 23 of the Existing Repurchase Agreement is hereby amended by deleting the
notices to the Buyer and to the Seller in their entirety and replacing them with the following: 
 If to Seller:     

loanDepot.com, LLC 

26642 Towne Centre Drive 

Foothill Ranch, CA 92610 

Attention: Michelle Richardson 

Email: MRichardson@loandepot.com 

Telephone: (949) 707-9462 

Facsimile: (949) 707-9462 

loanDepot.com, LLC 

26642 Towne Centre Drive 

Foothill Ranch, CA 92610 

Attention: Bryan Sullivan 

Email: BSullivan@loandepot.com 

If to Buyer:     

UBS AG 

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 

With a copy to: 

UBS AG 

153 West 51st Street 

New York, NY 10019 

Attention: Chad Eisenberger 

Telephone: (212) 821-4885 

Email: Chad.Eisenberger@ubs.com 

And: 

OL-SGMF-Business@ubs.com 

  
 4 













 SECTION 6. General Interpretive Principals. Section 35 of the Existing
Repurchase Agreement is hereby amended by deleting the reference to Section 1-201(19) and replacing it with a reference to Section 5-102(7). 

SECTION 7. Representations and Warranties. Schedule 1 to the Existing Repurchase Agreement is hereby amended by deleting
subparagraphs (o) and (fff) in their entirety and replacing it with the following: 
 (o) Full Disbursement of
Proceeds. The Mortgage Loan has been closed and, except with respect to, Homestyle Renovation Mortgage Loans or HomePath Renovation Mortgage Loans, the proceeds of the Mortgage Loan have been fully disbursed and there is no requirement for
future advances thereunder, and any and all requirements as to completion of any on-site or off-site improvement and as to disbursements of any escrow funds therefor
have been complied with. With respect to Homestyle Renovation Mortgage Loans and HomePath Renovation Mortgage Loans, Seller has made all advances and disbursements in accordance with the terms of the Mortgage and/or the terms and conditions of the
related mortgage loan program, and such additional amounts have been advanced or disbursed from Seller’s own funds and not from the funds representing any Purchase Price paid by Buyer to Seller hereunder. All costs, fees and expenses incurred
in making or closing the Mortgage Loan and the recording of the Mortgage were paid, and the Mortgagor is not entitled to any refund of any amounts paid or due under the Mortgage Note or Mortgage. All points and fees related to each Mortgage Loan
were disclosed in writing to the Mortgagor in accordance with applicable state and federal law and regulation. No Mortgagor was charged “points and fees” (whether or not financed) in an amount that exceeds 3% of the total loan amount (or
such other applicable limits for lower balance Mortgages) as specified under 12 CFR 1026.43(e)(3), and the points and fees were calculated using the calculation required for qualified mortgages under 12 CFR 1026.32(b) to determine compliance with
applicable requirements. 
 (fff) Regarding the Mortgagor. The Mortgagor is one or more natural persons and/or
trustees for an Illinois land trust or a trustee under a “living trust” or “revocable trust” and such “living trust” or “revocable trust” is in compliance with Fannie Mae or Freddie Mac guidelines, as
applicable, for such trusts. 
 SECTION 8. Schedules. The Existing Repurchase Agreement is hereby amended by adding Schedule
4 attached here to as Annex A in its proper numerical order. 
 SECTION 9. 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; 
 (x) Amendment
No. 10 to the Pricing Letter, executed and delivered by duly authorized officers of the Buyer and Seller; and 

  
 5 













 (y) such other documents as the Buyer or counsel to the Buyer may reasonably
request. 
 SECTION 10. 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 11. 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 12. 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 13.    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 14. 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 15. Binding
Effect. This Amendment shall be binding upon and inure to the benefit of the parties hereto and their respective successors and assigns. 

SECTION 16. 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 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] 

  
 6 













 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. 6 to Master Repurchase Agreement 












 ANNEX A TO THE AMENDMENT 

SCHEDULE 4 
 LIST OF AGENCY
APPROVALS 
  

					
	AGENCY	  	APPROVAL TYPE/NAME	  	APPROVAL NUMBER
	 Fannie Mae
	  	         Seller/Servicer
	  	        27152-000-00
			
	FHA/HUD	  	        Seller/Servicer	  	        30096 0000 5
			
	Freddie Mac	  	        Seller/Servicer	  	        156827
			
	Ginnie Mae	  	        Seller/Servicer	  	        4180
			
	USDA/RD	  	        Seller Approved	  	        26-4599244
	  	        Servicing Approved	  	        26-4599244
			
	VA	  	        Auto	  	        902584-00-00
	  	        Prior Approval Lender	  	        902584-00-00

 Schedule 4 -1