EX-10.22.2





 Exhibit 10.22.2 

EXECUTION 
 AMENDMENT NO. 2

 TO MASTER REPURCHASE AGREEMENT 

Amendment No. 2 to Master Repurchase Agreement, dated as of October 30, 2015 (this “Amendment”), between UBS Bank
USA (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, 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. 

Seller has notified Buyer pursuant to that certain Notification of Certain Changes in Ownership of loanDepot.com, LLC; Request for Certain
Consents and Amendments, dated as of October 5, 2015 (the “Restructuring Notice”) that the Seller is considering the possibility of undertaking an initial public offering and will undergo a restructuring of its ownership group.
In connection therewith, Buyer and Seller have agreed, subject to the terms and conditions of this Amendment, that the Existing Repurchase Agreement be amended to reflect certain agreed upon revisions to the terms of 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. Consent to IPO and Restructuring
Transactions. Buyer hereby (a) consents to the IPO, the Restructuring Transactions and the Use of IPO Proceeds and (b) agrees and confirms that none of the IPO, the Restructuring Transactions or the Use of IPO Proceeds constitutes or
shall constitute a violation, breach, Default or Event of Default under the Repurchase Agreement. Without limiting the generality of the foregoing, the Buyer hereby acknowledges and agrees that the IPO and the Restructuring Transactions shall not
constitute a Change of Control. 
 SECTION 2. New Definitions. Section 2 of the Existing Repurchase Agreement is hereby
amended by adding the following definitions in the correct alphabetical order: 
 “Equity Investors” shall mean the holders
of the equity interests in the Seller immediately prior to the Restructuring Transactions, and their respective Family Members and Family Trusts. “Family Member” means, with respect to any individual, any other individual having a
relationship by blood, marriage, or adoption to such individual. “Family Trust” means, with respect to any individual, any trust or other estate planning vehicle established for the benefit of such individual or Family Members of such
individual. 

  
 1 













 “IPO” shall mean the initial public offering of shares of Class A
common stock of LD Corp. on the terms and conditions set forth in the S-1 Filing, and the transactions related thereto as set forth in the S-1 Filing. 

“LD Corp.” shall mean loanDepot, Inc., a Delaware corporation. 

“LD Holdings” shall mean loanDepot Holdings, LLC, a Delaware limited liability company. 

“LD Intermediate” shall mean LD Intermediate, LLC, a Delaware limited liability company. 

“Permitted Distributions” means (a) distributions made from the proceeds of the IPO as set forth in the section entitled
“Use of Proceeds” in the S-1 Filing, (b) distributions to LD Corp., LD Holdings or LD Intermediate or any of their respective subsidiaries to pay for or reimburse any them for (i) customary
compensation, fees and expense reimbursements to their respective directors, officers and managers, (ii) costs and expenses related to (A) compliance with Sarbanes-Oxley and other applicable securities laws (including, without limitation,
the costs of any reporting requirements in connection with such compliance), (B) investor relations, shareholder meetings and shareholder reporting, (C) the acquisition and maintenance of customary directors and officers insurance,
(D) listing fees, (E) corporate overhead costs (including, without limitation, the costs of audits) and costs related to maintenance of corporate existence, and (F) executive, legal and professional fees associated with the foregoing,
and (c) Permitted Tax Distributions. 
 “Permitted Tax Distributions” means distributions to the extent necessary to
enable LD Holdings to make distributions under Section 4.1(a) of its Limited Liability Company Agreement. 
 “Restructuring
Transactions” shall mean the following transactions undertaken in connection with the IPO: (a) the creation of LD Holdings and LD Intermediate, a wholly-owned subsidiary of LD Holdings, (b) the assignment to LD Holdings and LD
Intermediate of all of the equity of Seller, such that following such assignment LD Holdings would own not less than 99% of the equity in Seller, and LD Intermediate would own 1% or less of the equity in Seller, (c) the ownership of all of the
equity of LD Holdings by (i) LD Corp., and (ii) certain of the pre-IPO owners of Seller, and (d) the ownership of LD Corp. by certain of the pre-IPO
owners of Seller and the investors in the public shares under the IPO. 
 “S-1
Filing” shall mean the Form S-1 Registration Statement dated as of October 8, 2015, filed by LD Corp. with the Securities and Exchange Commission, as amended, restated, supplemented or otherwise
modified from time to time prior to the IPO. 
 “Use of IPO Proceeds” means the use of proceeds from the IPO set forth in
the section entitled “Use of Proceeds” in the S-1 Filing. 

  
 2 













 SECTION 3. Changed Definitions. Effective as of the date of the IPO,
Section 2 of the Existing Repurchase Agreement is hereby amended by deleting the definitions of “Affiliate”, “Change in Control” and “Material Adverse Effect” in their entirety and replacing
them with the following: 
   “Affiliate” shall mean with respect to any Person, any
“affiliate” of such Person, as such term is defined in the Bankruptcy Code; provided, however, that, with respect to the Seller, the term “Affiliate” shall not include any Person holding publicly-traded shares in LD Corp. (or any
Person which controls, is controlled by or is under common control with, such Person holding publicly-traded shares in LD Corp.) unless such Person would qualify as an Affiliate without taking into account its ownership of any publicly-traded shares
in LD Corp; for the avoidance of doubt LD Corp., LD Holdings and LD Intermediate shall be deemed Affiliates. 

  “Change in Control” shall mean: 

  (A) any event or series of events by which any “person” or “group” (as such terms are used in
Sections 13(d) and 14(d) of the Securities Exchange Act of 1934, but excluding any employee benefit plan of such person or its subsidiaries, and any person or entity acting in its capacity as trustee, agent or other fiduciary or administrator of any
such plan), other than the Equity Investors, LD Corp., LD Holdings and LD Intermediate, becomes the “beneficial owner” (as defined in Rules 13d-3 and 13d-5
under the Securities Exchange Act of 1934), directly or indirectly, of 50.1% or more of the equity securities of the Seller entitled to vote for members of the board of directors or equivalent governing body of the Seller on a fully-diluted basis;
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). 
   “Material Adverse
Effect” shall mean a material adverse effect on (a) the Property, business, operations, financial condition or prospects of Seller, LD Corp., LD Holdings or LD Intermediate, (b) the ability of Seller, LD Corp., LD Holdings or LD
Intermediate to perform its obligations under any of the Program Documents to which it is a party, (c) the validity or enforceability of any of the Program Documents, (d) the rights and remedies of Buyer or LD Corp., LD Holdings or LD
Intermediate under any of the Program Documents, (e) the timely payment of any amounts payable under the Program Documents or (f) the Asset Value of the Purchased Assets taken as a whole. 

SECTION 4. Notice of Proceedings or Adverse Change. Effective as of the date of the IPO, Section 11(c) of the Existing
Repurchase Agreement is hereby amended by adding the following subclause (iii) thereto with the following: 

  (iii) Promptly, notice that LD Corp. has incurred Indebtedness, individually or in the aggregate, of $100,000,000
or more. 

  
 3 













 SECTION 5. Notice of Proceedings or Adverse Change. Effective as of the date of
the IPO, Section 11(c)(i)(D)(E) of the Existing Repurchase Agreement is hereby amended and restated in its entirety as follows: 
 (E)
any Change in Control occurs; 
 SECTION 6. Financial Reporting. Effective as of the date of the IPO, Section 11(d)(v) of
the Existing Repurchase Agreement is hereby amended and restated in its entirety as follows: 
 (v) If applicable and at the request of
Buyer, and provided such documents are not available on the SEC’s EDGAR website, copies of any 10-Ks, 10-Qs, 8-Ks,
registration statements and other “corporate finance” SEC filings by Seller Party within five (5) Business Days of their filing with the SEC; 

SECTION 7. Limitations on Dividends and Distributions. Effective as of the date of the IPO, Section 11(o) of the Existing
Repurchase Agreement is hereby amended and restated in its entirety as follows: 
 (o) Limitation on Dividends and Distributions.
Following the occurrence and during the continuance of an Event of Default, Seller shall not make any payment on account of, or set apart assets for, a sinking or other analogous fund for the purchase, redemption, defeasance, retirement or other
acquisition of any equity interest of Seller, whether now or hereafter outstanding, or make any other distribution or dividend in respect of any of the foregoing or to any shareholder or equity owner of Seller, either directly or indirectly, whether
in cash or property or in obligations of Seller or any of Seller’s consolidated Subsidiaries; provided, however, notwithstanding the foregoing, the Seller shall be permitted at all times (regardless of whether or not a Default or Event of
Default exists) to make Permitted Distributions. 
 SECTION 8. Transactions with Affiliates. Effective as of the date of the
IPO, Section 11(r) of the Existing Repurchase Agreement is hereby amended and restated in its entirety as follows: 
 (r)
Transactions with Affiliates. Except for (i) the transactions described in the section entitled “Certain Relationships and Related Party Transactions” in the S-1 Filing and
(ii) transactions (including, without limitation, under one or more service agreements or management agreements) with LD Corp., LD Holdings or LD Intermediate or any of their respective subsidiaries pursuant to which Seller agrees to pay or
reimburse any one or more of them for costs, fees and expenses of the type described in clause (b) of the definition of Permitted Distributions, Seller Party shall not enter into any transaction, including, without limitation, the purchase,
sale, lease or exchange of property or assets or the rendering or accepting of any service with any Affiliate unless such transaction is (i) not otherwise prohibited in this Agreement, (ii) in the ordinary course of Seller Party’s
business and (iii) upon fair and reasonable terms no less favorable to Seller Party, as the case may be, than it would obtain in a comparable arm’s length transaction with a Person which is not an Affiliate. 

  
 4 













 SECTION 9. Events of Default. Effective as of the date of the IPO,
Section 12 of the Existing Repurchase Agreement is hereby amended by deleting subclauses (m), (n) and (p) thereto in their entirety and replacing them with the following: 

(m) Going Concern. Seller’s, LD Corp.’s, LD Holdings’ or LD Intermediate’s audited Financial Statements or notes
thereto or other opinions or conclusions stated therein shall be qualified or limited by reference to the status of Seller, LD Corp., LD Holdings or LD Intermediate as a “going concern” or reference of similar import; or 

(n) Investigations. There shall occur the initiation of any investigation, audit, examination or review of a Seller Party, LD Corp., LD
Holdings or LD Intermediate by an Agency, any Governmental Authority, any trade association or consumer advocacy group relating to the origination, sale or servicing of mortgage loans by such Seller Party, LD Corp., LD Holdings or LD Intermediate or
the business operations of such Seller Party, LD Corp., LD Holdings or LD Intermediate is likely to cause a Material Adverse Effect, with the exception of normally scheduled audits or examinations by such Seller Party’s, LD Corp.’s, LD
Holdings’ or LD Intermediate’s regulators; or 
 (p) Governmental Action. Seller Party, LD Corp., LD Holdings or LD
Intermediate shall become the subject of a cease and desist order of the Appropriate Federal Banking Agency or any other Governmental Authority or enter into a memorandum of understanding or consent agreement with the Appropriate Federal Banking
Agency or other Governmental Authority, any of which, would have, or is purportedly the result of any condition which would be reasonably likely to have, a Material Adverse Effect; or 

SECTION 10. Conditions Precedent. This Amendment shall become effective as of the date hereof, subject to the satisfaction of
the following conditions precedent: 
   (a) No Default or Event of Default shall have occurred and be continuing;

 (b) Seller shall have received consents to the IPO from all of the required counterparties to Seller’s material repurchase
agreements, material loan and security agreements or similar material credit facilities or agreements for borrowed funds entered into by Seller and such counterparties, if the failure to receive such a consent results in a default or event of
default under any such agreement or facility; 
   (c) Buyer shall have received this Amendment, executed and
delivered by duly authorized officers of the Buyer and Seller; 
   (d) Amendment No. 4 to the Pricing Letter,
executed and delivered by duly authorized officers of the Buyer and Seller; and 
   (e) such other documents as
the Buyer or counsel to the Buyer may reasonably request. 

  
 5 













 For the avoidance of doubt, Buyer’s consent to the IPO, the Restructuring Transactions
and the Use of IPO Proceeds and this Amendment shall be ineffective to the extent that any of the foregoing conditions in this Section 10 are not satisfied. 

SECTION 11. 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 12. 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 13. 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 14. 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 15. 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 16. Binding
Effect. This Amendment shall be binding upon and inure to the benefit of the parties hereto and their respective successors and assigns. 

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


  
 6 













 
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] 

  
 7 













 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 BANK USA, as Buyer
		
	By:	 	  



 
			
	Name:	 	
	Title:	 	
		
	By:	 	 


 
			
	Name:	 	
	Title:	 	
	
	LOANDEPOT.COM, LLC, as Seller


 
			
		
	By:	 	  



 
			
	Name:	 	
	Title:	 	


 Signature Page to Amendment No. 2 to Master Repurchase Agreement