Document:

EX-10.41.1

 [***] – Confidential portions of this document have been redacted and filed separately with
the Commission. 
 Exhibit 10.41.1 

AMENDMENT TO MASTER REPURCHASE AGREEMENT 

September 15, 2011 
 This
Amendment (the “Amendment”) to the Master Repurchase Agreement (defined below), is entered into on September 15, 2011 by and between Wells Fargo Bank, N.A. (the “Buyer”) and loanDepot.com, LLC, a Delaware limited liability
company (the “Seller”). 
 W I T N E S S E T H: 

WHEREAS, Buyer and Seller have entered into a repurchase agreement pursuant to which the Seller agrees to sell certain mortgage loans to the
Buyer in exchange for the transfer of funds by the Buyer to the Seller, with a simultaneous agreement by the Buyer to transfer to the Seller such mortgage loans at a date certain or on demand, in exchange for the transfer of funds by the Seller to
the Buyer; and 
 WHEREAS, Buyer has delivered to the Seller the Master Repurchase Agreement, dated as of September 15, 2011, Version
4.1 (the “Master Repurchase Agreement”), along with the related Addendum dated as of September 15, 2011, as such Addendum may be amended from time to time (the “Addendum”); and 

WHEREAS, Buyer and Seller wish to amend certain provisions of the Master Repurchase Agreement in order to tailor the contract as follows; 

NOW, THEREFORE, in consideration of the premises and mutual agreements set forth herein and for other good and valuable consideration, the
receipt and sufficiency of which are hereby acknowledged, Seller and Buyer agree as follows: 
  

	 	1.	Section 2 of the Master Repurchase Agreement is hereby amended as follows: 

  

	 	(i)	The definition of “Pricing Rate” is amended by deleting the numerical expression “[***]%” therefrom and substituting the numerical expression “[***]%” in lieu thereof. 

2. Any capitalized term used but not defined herein shall have the meaning assigned to such term in the Master Repurchase Agreement. 

3. The foregoing amendment only relates to the Master Repurchase Agreement between the Buyer and the Seller. Except as expressly amended above,
all of the terms and conditions of the Master Repurchase Agreement remain in full force and effect and are hereby reaffirmed. 
 5. 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. 

 IN WITNESS WHEREOF, Seller and Buyer have caused their names to be signed to this Amendment to
Master Repurchase Agreement by their respective officers thereunto duly authorized as to the date first above written. 
  

			
	 WELLS FARGO BANK, N.A.
  

	By:	 	 /s/ Kenneth D. Logan

		 	Name:     Kenneth D. Logan
		 	Title:       Managing Director
	  
 LOANDEPOT.COM, LLC

 

	By:	 	 /s/ Anthony L. Hsieh

		 	Name:     Anthony L. Hsieh
		 	Title:       Chief Executive OfficerEX-10.41.2

 [***] – Confidential portions of this document have been redacted and filed separately with
the Commission. 
  
 Exhibit 10.41.2 

AMENDMENT TO MASTER REPURCHASE AGREEMENT 

November 1, 2012 
 This
Amendment (the “Amendment”) to the Master Repurchase Agreement (defined below), is entered into on November 1, 2012, by and between Wells Fargo Bank, N.A. (the “Buyer”) and loanDepot.com, LLC, a Delaware limited liability
company (the “Seller”). 
 W I T N E S S E T H: 

WHEREAS, Buyer and Seller have entered into a Master Repurchase Agreement, dated as of September 15, 2011, Version 4.1, as amended by the
Amendment to Master Repurchase Agreement, dated September 15, 2011 (the “Master Repurchase Agreement”), along with the related Addendum dated as of September 15, 2011, as such Addendum may be amended from time to time (the
“Addendum”) pursuant to which the Seller agrees to sell certain mortgage loans and/or securities to the Buyer in exchange for the transfer of funds by the Buyer to the Seller, with a simultaneous agreement by the Buyer to transfer to the
Seller such mortgage loans and/or securities at a date certain or on demand, in exchange for the transfer of funds by the Seller to the Buyer; and 

WHEREAS, the Master Repurchase Agreement provides for the possible purchase of the Mortgage Loans by a Takeout Investor, and the Parties
intend to additionally provide for the issuance of Agency Securities (as defined below) to the Federal Book Account (as defined below) of the Buyer in exchange for consideration as more fully described herein, and the subsequent sale of the
Purchased Agency Securities (as defined below) to a Takeout Broker Dealer (as defined below).; and 
 NOW, THEREFORE, in consideration of
the premises and mutual agreements set forth herein and for other good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, Seller and Buyer agree as follows: 

1. Section 1 of the Master Repurchase Agreement is hereby deleted in its entirety and replaced as follows: 

“From time to time the parties hereto may enter into transactions in which Seller agrees to sell all right, title and interest (including,
without limitation, the Servicing Rights (as hereinafter defined)) in and to the Mortgage Loans and Agency Securities (each as hereinafter defined) to Buyer in exchange for the transfer of funds by Buyer to Seller, with a simultaneous agreement by
Buyer to transfer to Seller such Mortgage Loans and Agency Securities at a date certain or on demand, in exchange for the transfer of funds by Seller to Buyer. Each such transaction shall be referred to herein as a “Transaction”
and, unless otherwise agreed in writing, shall be governed by this Agreement. All sales of Mortgage Loans from Seller to Buyer will be on a servicing-released basis.” 

  
 Page 1 of 20 

 2. Section 2 (Definitions) of the Master Repurchase Agreement is hereby amended by adding
the following definitions thereto, in correct alphabetical order: 
 “Agency Custodian” means the custodian designated in
(i) the Master Ginnie Mae Custodial Agreement, (ii) the Master Fannie Mae Custodial Agreement or (iii) the Master Freddie Mac Custodial Agreement, as applicable, which will be Wells Fargo Bank, N.A. or any other Agency Custodian
approved by Buyer in its sole discretion. 
 “Agency Document Custodian Manual” means (i) the Ginnie Mae
Mortgage-Backed Securities Program Document Custodian Manual (as found in Appendix V-1 of the Guide), (ii) the Fannie Mae Requirements for Document Custodians or (iii) the Freddie Mac Document Custody Procedures Handbook, as applicable.

 “Agency Security” means a Ginnie Mae Security, a Fannie Mae Security or a Freddie Mac Security, as applicable. 

“Agency Security Limit” means the amount set forth on the Addendum for such term. 

“Agency Security Margin” means the margin set forth on the Addendum for such term. 

“Agency Security Purchase Commitment” means a written commitment, in form and substance satisfactory to Buyer, issued in favor
of Seller by a Takeout Broker Dealer pursuant to which that Takeout Broker Dealer commits to purchase one or more Agency Securities. 

“Agency Security Purchase Price Percentage” means the percentage set forth on the Addendum for such term. 

“Fannie Mae Security” means a mortgage-backed security received in exchange for mortgage loans sold by the Seller to Fannie
Mae and issued by Fannie Mae. 
 “Fannie Mae Seller” means a business organization that is approved to sell mortgages to
Fannie Mae. 
 “Federal Book Account” means the following securities clearing account owned by the Buyer: 

Wells Fargo Bank, NA 
 ABA
account # 121-000-248 
 For Credit to CDO Clearing A/C 6355067033 

Further Credit To: WF MBS I 

A/C 80417400 

  
 Page 2 of 20 

 “Freddie Mac Security” means a mortgage-backed security received in exchange for
mortgage loans sold by the Seller to Freddie Mac and issued by Freddie Mac. 
 “Freddie Mac Seller” means a business
organization that is approved to sell mortgages to Freddie Mac. 
 “Ginnie Mae Issuer” or the “Issuer”
means a business organization that, having met certain criteria, has been approved to issue securities guaranteed by Ginnie Mae. 

“Ginnie Mae Security” means a mortgage-backed security issued by the Seller for which the timely payment of principal and
interest is guaranteed by Ginnie Mae. 
 “Guide” means (i) the Ginnie Mae Mortgage-Backed Securities Guide,
(ii) the Fannie Mae Single Family Selling Guide or (iii) the Freddie Mac Single-Family Seller/Servicer Guide, as applicable and including the applicable Agency Document Custodian Manual, as such Guide may hereafter from time to time be
amended. 
 “Master Agency Custodial Agreement” means (i) the Master Fannie Mae Custodial Agreement, (ii) the
Master Freddie Mac Custodial Agreement or (iii) the Master Ginnie Mae Custodial Agreement, as applicable. 
 “Master Fannie Mae
Custodial Agreement” means Fannie Mae Form 2003. 
 “Master Freddie Mac Custodial Agreement” means Freddie Mac Form
1035. 
 “Master Ginnie Mae Custodial Agreement” means form HUD-11715. 

“Purchased Agency Securities” means the collective reference to Agency Securities sold by Seller to Buyer in a Transaction
hereunder. 
 “Release of Security Interest” means form HUD-11711A, Fannie Mae Form 2004A or Freddie Mac Form 996, as
applicable. 
 “Takeout Broker Dealer” means any broker dealer pre-approved in writing by Buyer, in its sole discretion, to
purchase mortgage backed securities from Seller and who issues an Agency Security Purchase Commitment relating to an Agency Security. Takeout Broker Dealers approved by Buyer may be listed in the Manual or specifically approved in an electronic
communication sent by Buyer to Seller. 
 3. Section 2 of the Master Repurchase Agreement is further amended by adding the following
definition thereto, in correct alphabetical order: 
 “NY Committed Amount” shall mean $1,000,000 in aggregate Purchase
Price of Mortgage Loans, including all right, title and interest in and to certain Mortgage Loans (including, without limitation, the Servicing Rights) originated by Seller. 

  
 Page 3 of 20 

 4. The definition of “Agency” is hereby deleted in its entirety and replaced as
follows: 
 “Agency” means GNMA, Fannie Mae or Freddie Mac, as applicable. 

5. The definition of “Collection Account” is hereby amended by replacing the reference to “Mortgage Loans” therein with
“Purchased Assets.” 
 6. The definition of “Income” is hereby amended by replacing the reference to “Purchased
Mortgage Loan” therein with “Purchased Asset.” 
 7. The definition of “Market Value” is hereby deleted in its
entirety and replaced as follows: 
 “Market Value” means, with respect to (i) any Purchased Agency Security, and as of
any date of determination, the value ascribed to such Purchased Agency Security by Buyer in its sole discretion, using methodology and parameters customarily used by Buyer to value similar assets or (ii) any Purchased Mortgage Loan as of any
date of determination, the whole loan servicing released fair market value of such Purchased Mortgage Loan on such date as determined by Buyer (or an Affiliate thereof) in its sole reasonable discretion; provided, however, that the methodology for
such determination is consistent with Buyer’s determination with respect to its own portfolio of mortgage loans to which such a determination would be applicable. Without limiting the generality of the foregoing, Seller acknowledges that the
Market Value of a Purchased Asset may be reduced to zero by Buyer if: 
 (i) a breach of a representation, warranty or covenant made by
Seller in this Agreement (including, without limitation, any representation, warranty or covenant made on a Schedule or Exhibit including, without limitation, Schedule 1-A and Schedule 1-B) with respect to such Purchased Mortgage Loan
has occurred and is continuing; 
 (ii) such Purchased Mortgage Loan is or becomes a Sub-Performing Mortgage Loan; 

(iii) such Purchased Mortgage Loan has been released from the possession of the Custodian under the Custodial Agreement for a period in excess
of ten (10) calendar days for a servicing-related issue or twenty (20) calendar days if provided under a bailee letter; 
 (iv)
such Purchased Mortgage Loan or Purchased Agency Security has been subject to a Transaction hereunder for a period of greater than the Maximum Transaction Duration identified on the Addendum for the relevant asset type, provided however, in no event
shall a Mortgage Loan or Agency Security be subject to a Transaction for greater than three hundred and sixty four (364) days; 

  
 Page 4 of 20 

 (v) such Purchased Mortgage Loan is a Wet-Ink Mortgage Loan for which the Mortgage File has not
been delivered to the Custodian on or prior to the Wet-Ink Mortgage Loan_Document Receipt Date after the related Purchase Date; 
 (vi) such
Purchased Mortgage Loan is no longer acceptable for purchase by the Takeout Investor under any of the flow purchase or conduit programs for which Seller has been approved, or a Takeout Investor conditions the purchase of such Purchased Mortgage Loan
and, in Buyer’s sole determination, such conditions demonstrate an impairment of the marketability of such Purchased Mortgage Loan, or, if such Purchased Mortgage Loan has not been offered to a Takeout Investor, Buyer determines that there is a
flaw in such Purchased Mortgage Loan which materially impacts the marketability of such Purchased Mortgage Loan; provided that, in the case of a Purchased Mortgage Loan that has not been offered to a Takeout Investor, if Buyer determines that there
is a flaw that materially impacts the marketability of such Purchased Mortgage Loan, Buyer shall notify Seller of such flaw and allow the Seller two Business Days to cure such flaw if, in Buyer’s sole determination, allowing Seller time to cure
such flaw does not materially impact Buyer’s interests in, or marketability of, such Purchase Mortgage Loan; 
 (vii) when the Purchase
Price for such Purchased Mortgage Loan is added to other Purchased Mortgage Loans, the aggregate Purchase Price of all Jumbo Mortgage Loans that are Purchased Mortgage Loans exceeds the Jumbo Mortgage Loan Limit; 

(viii) when the Purchase Price for such Purchased Mortgage Loan is added to other Purchased Mortgage Loans, the aggregate Purchase Price of all
Second Lien Mortgage Loans (including HELOCs, if any) that are Purchased Mortgage loans exceeds the Second Lien Mortgage Loan Limit; 
 (ix)
when the Purchase Price for such Purchased Mortgage Loan is added to other Purchased Mortgage Loans, the aggregate Purchase Price of all Sub-Prime Mortgage Loans that are Purchased Mortgage loans exceeds the Sub-Prime Mortgage Loan Limit; 

(x) when the Purchase Price for such Purchased Mortgage Loan is added to other Purchased Mortgage Loans, the aggregate Purchase Price of all
Wet-Ink Mortgage Loans that are Purchased Mortgage Loans exceeds the Wet-Ink Mortgage Loan Limit; 

  
 Page 5 of 20 

 [***] – Confidential portions of this document have been redacted and filed separately with
the Commission. 
  
 (xi) when the Purchase Price for such Purchased
Mortgage Loan is added to other Purchased Mortgage Loans, the aggregate Purchase Price of all Cooperative Loans that are Purchased Mortgage Loans exceeds the Cooperative Loan Limit; 

(xii) when the Purchase Price for such Purchased Mortgage Loan is added to other Purchased Mortgage Loans, the aggregate Purchase Price of all
Commercial Loans that are Purchased Mortgage Loans exceeds the Commercial Loan Limit; 
 (xiii) when the Purchase Price for such Purchased
Mortgage Loan is added to other Purchased Mortgage Loans, the aggregate Purchase Price of all Purchased Mortgage Loans exceeds the Maximum Aggregate Purchase Price; or 

(xiv) when the Purchase Price for such Purchased Agency Security is added to other Purchased Agency Securities, the aggregate Purchase Price
for all Purchased Agency Securities exceeds the Agency Security Limit. 
 8. The definition of “Obligations” is hereby amended by
replacing the references to “Purchased Mortgage Loan” therein with “Purchased Assets.” 
 9. The definition of
“Pricing Rate” is hereby amended by adding a new paragraph (i) at the end thereto as follows: 
 [***] 

10. The definition of “Purchase Date” is hereby amended by adding “or Purchased Agency Securities, as applicable” after
the reference to “Purchased Mortgage Loans” therein. 
 11. The definition of “Purchased Assets” is hereby deleted in
its entirety and replaced as follows: 
 “Purchased Assets” means the Purchased Mortgage Loans, the Records, and all related
Servicing Rights, the Purchased Agency Securities, the Program Agreements (to the extent such Program Agreements and Seller’s right thereunder relate to the Purchased Mortgage Loans), any Property relating to the Purchased Mortgage Loans, all
insurance policies and insurance proceeds relating to any Purchased Mortgage Loan or the related Mortgaged Property, including, but not limited to, any payments or proceeds under any related primary insurance, hazard insurance and FHA Mortgage
Insurance Contracts (if any) and VA Loan Guaranty Agreements (if any), Income, all amounts in the Collection Account, all amounts in the Seller’s Clearing Account and the Reserve Account, and any account to which such amount is deposited,
Interest Rate Protection Agreements, 

  
 Page 6 of 20 

 [***] – Confidential portions of this document have been redacted and filed separately with
the Commission. 
  
 accounts (including any interest of Seller in
escrow accounts) and any other contract rights, instruments, accounts, payments, rights to payment (including payments of interest or finance charges) general intangibles and other assets relating to the Purchased Assets (including, without
limitation, any other accounts) or any interest in the Purchased Assets, and any proceeds (including the related securitization proceeds) and distributions with respect to any of the foregoing and any other property, rights, title or interests as
are specified on a Transaction Request and/or Trust Receipt, in all instances, whether now owned or hereafter acquired, now existing or hereafter created.” 

12. The definition of “Purchase Price” is hereby deleted in its entirety and replaced as follows: 

“Purchase Price” means, [***] 

[***] 
 [***] 

[***] 
 [***] 

  
 Page 7 of 20 

 [***] – Confidential portions of this document have been redacted and filed separately with
the Commission. 
  
 [***] 

[***] 
 [***] 

[***] 
 [***] 

[***] 

  
 Page 8 of 20 

 13. The definition of “Records” is hereby deleted in its entirety and replaced as
follows: 
 “Records” means all instruments, agreements and other books, records, and reports and data generated by other
media for the storage of information maintained by Seller, Servicer or any other person or entity with respect to a Purchased Mortgage Loan and/or Purchased Agency Security. Records shall include the Mortgage Notes, any Mortgages, the Mortgage
Files, the credit files related to the Purchased Mortgage Loan, the Purchased Agency Security and any other instruments necessary to document or service a Mortgage Loan. 

14. The definition of “Repurchase Price” is hereby deleted in its entirety and replaced as follows: . 

““Repurchase Price” means the price at which Purchased Assets are to be transferred from Buyer to Seller upon termination
of a Transaction, on the Repurchase Date or at any other time specified in this Agreement, which will be determined in each case (including Transactions terminable upon demand) as the sum of the Purchase Price for such Purchased Assets and the
accrued but unpaid Price Differential as of the date of such determination and any fees and expenses charged by the Buyer and payable by the Seller as set forth on Schedule 1 to the Addendum and any custodial fees as set forth on Schedule 2 to the
Addendum with respect to such Purchased Assets and all other fees and expenses incurred by the Buyer.” 
 15. Section 2 of the
Master Repurchase Agreement is hereby amended by deleting the definition of “Termination Date” in its entirety and replacing it as follows: 

“Termination Date” has the meaning set forth on the Addendum or such earlier date in the case of an Event of Default hereunder
or any other earlier date determined by the Buyer in its sole discretion; provided, however, if no Default or Event of Default has occurred and is continuing or is likely to occur, Buyer agrees that the Termination Date with respect to the NY
Committed Amount shall be the later of (i) 364 days from the Effective Date, and (ii) thirty (30) calendar days following written notice from Buyer to Seller. 

  
 Page 9 of 20 

 16. Section 3(a) of the Master Repurchase Agreement is hereby amended by deleting the
section in its entirety and replacing it as follows: 
  

	 	a.	Subject to the to the terms and conditions of this Agreement and provided that no Default has occurred and is continuing or is likely to occur, Buyer agrees, from time to time during the term of this agreement to
purchase the NY Committed Amount from Seller, provided Seller has satisfied all of the conditions set forth in Section 9(b) of the Agreement at all times the Mortgage Loans are subject to a Transaction; provided further, however, the Buyer
shall not have any obligation to enter into Transactions which will cause the total aggregate Transactions outstanding at any one time to exceed the Maximum Aggregate Purchase Price or the aggregate type of Transactions outstanding at any one time
to exceed the applicable limits set forth herein. Except as otherwise provided above with respect to the NY Committed Amount, this Agreement is not a commitment by Buyer to enter into Transactions with Seller but rather sets forth the procedures to
be used in connection with periodic requests for Buyer to enter into Transactions with Seller. Except as otherwise provided above, Seller hereby acknowledges that Buyer is under no obligation to agree to enter into, or to enter into, any Transaction
pursuant to this Agreement. The Mortgage Loans shall be sold on a servicing-released basis, and shall be serviced by Servicer while subject to a Transaction. All Purchased Mortgage Loans shall exceed or meet the Underwriting Guidelines, and the
Seller has satisfied all of the conditions set forth in Section 9(b) of the Agreement at all times the Mortgage Loans are subject to a Transaction. For the avoidance of doubt, the Buyer hereby acknowledges that this is a simultaneous agreement
by Buyer to purchase Mortgage Loans from Seller, including Transactions to which Buyer delivers funds to the applicable closing agent prior to its receipt by Buyer or its custodian, subject to applicable Wet-Ink Mortgage Loan Limits for such Wet-Ink
Mortgage Loan. 

 17. Section 3(a) is hereby further amended by adding the following sentence to the end of the
paragraph: 
 “The sum of the aggregate Purchase Price of Purchased Mortgage Loans and Purchase Price of Purchased Agency Securities
subject to outstanding Transactions shall not exceed the Maximum Aggregate Purchase Price.” 
 18. Section 3(b) of the Master
Repurchase Agreement is hereby amended by deleting the following second sentence thereof: 
 “Following receipt of such request, Buyer
may enter into such requested Transaction or may notify Seller of its intention not to enter into such Transaction for any reason.” 

  
 Page 10 of 20 

 and replacing it as follows: 

Following receipt of such request, Buyer may enter into such requested Transaction or may notify Seller of its intention not to enter into such
Transaction for any reason; provided, however, if (i) no Default or Event of Default has occurred and is continuing or is likely to occur and (ii) the applicable conditions precedent set forth in Section 9 hereof have been
satisfied, then Buyer agrees, from time to time during the term of this Agreement to purchase the NY Committed Amount, in accordance with Section 3(a) above. 

19. Section 4 of the Master Repurchase Agreement is hereby amended by adding a new paragraph (c) as follows: 

(c) Seller shall repurchase the related Purchased Agency Securities from Buyer on each related Repurchase Date at the Repurchase Price so long
as the Purchased Agency Securities remain on the Buyer’s Federal Book Account and have not previously been purchased by a Takeout Broker Dealer. 

20. Section 5 of the Master Repurchase Agreement is hereby amended by replacing the reference to “Mortgage Loan” therein with
“Purchased Asset.” 
 21. Section 6 of the Master Repurchase Agreement regarding Margin Maintenance shall be amended as
follows: 
  

	 	a.	Section 6(a) shall be deleted in its entirety and replaced with the following: 

 “If
at any time the aggregate Market Value of all Purchased Assets is less than the aggregate Buyer’s Margin Amount for all such Transactions (such event, a “Margin Deficit”), then Buyer may, by notice to Seller, require Seller to
transfer to Buyer, cash or, at Buyer’s option and in its sole discretion, additional Purchased Assets (and provided that Buyer will accept additional Purchased Assets to cure a Margin Deficit in the event that (i) no Event of Default has
occurred and (ii) Seller has additional Purchased Assets the characteristics of which meet all applicable Buyer eligibility requirements then-applicable to Purchased Assets) within one (1) Business Day of such notice by Buyer, so that the
cash and aggregate Market Value of the Purchased Assets will thereupon equal or exceed the aggregate Buyer’s Margin Amount (such requirement upon such notice, a “Margin Call”), provided that, notwithstanding the foregoing,
Buyer may determine the Market Value and any related Margin Deficit on an individual basis for any Purchased Asset. If additional Mortgage Loans or Agency Securities are provided by Seller to satisfy a Margin Deficit, they shall be considered
Purchased Assets hereunder.” 

  
 Page 11 of 20 

	 	b.	Section 6(c) is hereby amended by replacing the reference to “Purchased Mortgage Loan” therein with “Purchased Asset.” 

22. Section 7 of the Master Repurchase Agreement is hereby deleted in its entirety and replaced as follows: 

a. If Income is paid in respect of any Purchased Asset during the term of a Transaction, such Income shall be the property of Buyer and shall
be deposited in the Collection Account by either the Seller or the applicable Servicer. All deposits contained in the Collection Account (other than any Income relating to prepayments of principal in full which will be paid in accordance with
Section 7(d) below) will be transferred to the Settlement Account on a bi-monthly basis in accordance with Section 11 (c) or by the Buyer at any other time. 

b. Prior to an Event of Default, upon the termination of any Transaction, Buyer shall apply payments received from a Takeout Investor or
Takeout Broker Dealer or otherwise, including those payments contemplated in Sections 6(a) and 7(a) above, as follows (provided that Buyer shall have no obligation to apply payments in the event that it is unable to identify the Mortgage Loans to
which such payments correspond or there are insufficient funds in the Settlement Account or the Seller’s Clearing Account, and the related Repurchase Price will continue to accrue interest as if no payment had been made): 

First, to the payment of the outstanding Repurchase Price owed by the Seller under this Agreement; 

Second, to the payment of related costs and expenses owed under this Agreement, including reasonable compensation to
Buyer’s agents and counsel, and all expenses, liabilities and advances made or incurred by or on behalf of Buyer in connection therewith; 

Third, to the payment of all other amounts owed by the Seller under this Agreement; 

Fourth, to the payment of any other amounts owed by the Seller or any Affiliate to the Buyer under any other instrument
or agreement, in accordance with Section 24; 
 Fifth, to the Servicer, if and only if such party is a third
party, costs and fees it is entitled to under the related Servicing Agreement; and 
 Sixth, to the Seller, any
remainder, by remittance to the Seller’s Clearing Account. 

  
 Page 12 of 20 

 c. In the event that an Event of Default has occurred and is continuing, notwithstanding any
provision set forth herein, Buyer may, in its sole discretion, distribute to Seller its share of Income received with respect to each Purchased Asset after all Obligations under this Agreement have been paid in full. 

d. Seller shall, or cause Servicer to, deposit within two (2) Business Days of the receipt of any prepayment of principal in full into the
Collection Account, with respect to a Purchased Mortgage Loan. Buyer shall apply any such amount to reduce the amount of the Repurchase Price due upon termination of the related Transaction. 

e. Notwithstanding anything to the contrary set forth herein, to the extent that any Income (excluding principal prepayments in full) is not
deposited in the Collection Account, upon notice by Buyer to Seller, Seller shall immediately remit to the Settlement Account all such Income received by Servicer or Seller in respect of the Purchased Assets. 

23. Section 8 of the Master Repurchase Agreement is hereby amended by adding “or the Takeout Broker Dealer” after the
references to “Takeout Investor” therein. 
 24. Section 15 of the Master Repurchase Agreement is hereby amended by deleting
such section in its entirety and replacing it as follows: 
 “In the event that an Event of Default shall have occurred: 

a. Buyer may, at its option, declare an Event of Default to have occurred hereunder and, upon the exercise or deemed exercise of such option,
the Repurchase Date for each Transaction hereunder shall, if it has not already occurred, be deemed immediately to occur (except that, in the event that the Purchase Date for any Transaction has not yet occurred as of the date of such exercise or
deemed exercise, such Transaction shall be deemed immediately canceled). Buyer shall (except upon the occurrence of an Act of Insolvency) give written notice to Seller of the exercise of such option as promptly as practicable. (For purposes of this
provision, notice provided by electronic mail shall constitute written notice.) 
 b. If Buyer exercises or is deemed to have exercised the
option referred to in paragraph (a) of this Section, (i) Seller’s obligations in such Transactions to repurchase all Purchased Mortgage Loans and Purchased Agency Securities, at the Repurchase Price therefor on the Repurchase Date
determined in accordance with paragraph (a) of this Section, shall thereupon become immediately due and payable, (ii) all Income paid after such exercise or deemed exercise shall be retained by Buyer, or, to the extent not yet transferred
to the Collection Account, the Seller’s Clearing Account or the Reserve Account, remitted to Buyer, and in any case 

  
 Page 13 of 20 

 
applied, in Buyer’s sole discretion, to the aggregate unpaid Repurchase Prices for all outstanding Transactions and any other amounts owing by any Seller hereunder, and (iii) Seller
shall immediately comply with the further instructions of Buyer with respect to holding or delivering any of the Mortgage Files relating to any Purchased Mortgage Loans subject to such Transactions then in Seller’s possession or control. In
addition, Buyer shall have the right to satisfy any Obligations with funds remaining in the Seller’s Clearing Account or the Reserve Account. 

c. Buyer also shall have the right to obtain physical possession, and to commence an action to obtain physical possession, of all Records and
files of Seller relating to the Purchased Mortgage Loans, Purchased Assets and all documents relating to the Purchased Mortgage Loans (including, without limitation, any legal, credit or servicing files with respect to the Purchased Mortgage Loans)
which are then or may thereafter come in to the possession of Seller or any third party acting for Seller. Buyer shall be entitled to specific performance of all agreements of Seller contained in this Agreement. 

d. Buyer shall have the right to direct all Servicers then servicing any Purchased Mortgage Loans to remit all collections thereon to Buyer to
the extent that any such Servicer is not currently remitting to the Buyer, and if any such payments are received by Seller, Seller shall not commingle the amounts received with other funds of Seller and shall promptly pay them over to Buyer. Buyer
shall also have the right to terminate any one or all of the Servicers then servicing any Purchased Mortgage Loans with or without cause. 

e. In addition, Buyer shall have the right to immediately sell the Purchased Mortgage Loans (including, without limitation, the Servicing
Rights), Purchased Agency Securities and liquidate all Purchased Assets. Such disposition of Purchased Mortgage Loans may be, at Buyer’s option, on either a servicing-released or a servicing-retained basis. Buyer shall not be required to give
any warranties as to the Purchased Mortgage Loans or Purchased Agency Securities with respect to any such disposition thereof. Buyer may specifically disclaim or modify any warranties of title or the like relating to the Purchased Mortgage Loans or
Purchased Agency Securities. The foregoing procedure for disposition of the Purchased Mortgage Loans and Purchased Agency Securities and liquidation of the Purchased Assets shall not be considered to adversely affect the commercial reasonableness of
any sale thereof. Seller agrees that it would not be commercially unreasonable for Buyer to dispose of the Purchased Mortgage Loans, Purchased Agency Securities or the Purchased Assets or any portion thereof by using Internet sites that provide for
the auction of assets similar to the Purchased Mortgage Loans, Purchased Agency Securities or the Purchased Assets, or that have the reasonable capability 

  
 Page 14 of 20 

 
of doing so, or that match buyers and sellers of assets. Buyer shall be entitled to place the Purchased Mortgage Loans in a pool for issuance of mortgage-backed securities at the then-prevailing
price for such securities and to sell such securities for such prevailing price in the open market. Buyer shall also be entitled to sell any or all of such Purchased Assets individually for the prevailing price. Buyer shall also be entitled, in its
sole discretion to elect, in lieu of selling all or a portion of such Purchased Assets, to give the Seller credit for such Purchased Assets in an amount equal to the Market Value of the Purchased Assets against the aggregate unpaid Repurchase Price
and any other amounts owing by the Seller hereunder. 
 f. Upon the happening and continuation of one or more Events of Default, Buyer may
apply any proceeds from the liquidation of the Purchased Assets to the Repurchase Prices hereunder and all other Obligations in the manner Buyer deems appropriate in its sole discretion. 

g. Seller shall be liable to Buyer for (i) the amount of all reasonable legal or other expenses (including, without limitation, all costs
and expenses of Buyer in connection with the enforcement of this Agreement or any other agreement evidencing a Transaction, whether in action, suit or litigation or bankruptcy, insolvency or other similar proceeding affecting creditors’ rights
generally, further including, without limitation, the reasonable fees and expenses of counsel (including the costs of internal and external counsel of Buyer) incurred in connection with or as a result of an Event of Default, (ii) damages in an
amount equal to the cost (including all fees, expenses and commissions) of entering into replacement transactions and entering into or terminating hedge transactions in connection with or as a result of an Event of Default, and (iii) any other
loss, damage, cost or expense directly arising or resulting from the occurrence of an Event of Default in respect of a Transaction. 
 h. To
the extent permitted by applicable law, Seller shall be liable to Buyer for interest on any amounts owing by Seller hereunder, from the date Seller becomes liable for such amounts hereunder until such amounts are (i) paid in full by Seller or
(ii) satisfied in full by the exercise of Buyer’s rights hereunder. Interest on any sum payable by Seller under this paragraph shall be at a rate equal to the Post Default Rate. 

i. Buyer shall have, in addition to its rights hereunder, any rights otherwise available to it under any other agreement or applicable law,
including, without limitation, any equitable remedies and Buyer shall have the right to terminate this Agreement. 

  
 Page 15 of 20 

 j. Buyer may exercise one or more of the remedies available to Buyer immediately upon the
occurrence of an Event of Default and, except to the extent provided in paragraph (a) of this Section, at any time thereafter without notice to Seller. All rights and remedies arising under this Agreement as amended from time to time
hereunder are cumulative and not exclusive of any other rights or remedies which Buyer may have. 
 k. Buyer may enforce its rights and
remedies hereunder without prior judicial process or hearing, and as permitted by law Seller hereby expressly waives any defenses Seller might otherwise have to require Buyer to enforce its rights by judicial process. Seller also waives any defense
(other than a defense of payment or performance) Seller might otherwise have arising from the use of nonjudicial process, enforcement and sale of all or any portion of the Purchased Assets, or from any other election of remedies. Seller recognizes
that nonjudicial remedies are consistent with the usages of the trade, are responsive to commercial necessity and are the result of a bargain at arm’s length. 
  

	 	25.	The Master Repurchase Agreement is hereby amended by adding the following Section 39 thereto: 

  

	 	39.	Agency Security Takeout 

 a. Prior to an Event of Default, from time to
time, the Seller, as an approved Issuer of Ginnie Mae Securities, may issue Ginnie Mae Securities backed by certain of the Purchased Mortgage Loans or, as an approved Fannie Mae Seller or Freddie Mac Seller, may sell Purchased Mortgage Loans to
Fannie Mae or Freddie Mac, as applicable, in exchange for Fannie Mae Securities or Freddie Mae Securities, as applicable. Buyer will agree to sell the related Purchased Mortgage Loans back to the Seller in satisfaction of the related Repurchase
Price and will simultaneously purchase the related Agency Securities (the proceeds from such sale will be used to satisfy the Repurchase Price with respect to the Purchased Mortgage Loans) from the Seller in a new Transaction. The Agency Securities
will be delivered to the Federal Book Account of Buyer, at which time they will be considered Purchased Assets hereunder. The Seller shall arrange for the sale of the Purchased Agency Securities to a Takeout Broker Dealer, the proceeds of such sale
to be credited to Buyer’s account as further provided herein to satisfy the Repurchase Price with respect to the Purchased Agency Securities. 

b. As a condition precedent to Buyer agreeing to accept such Agency Securities as Purchased Assets hereunder, the Seller must
comply with all of the following conditions: (i) the Seller shall at all times be (A) a Ginnie Mae Issuer in good standing with the authority to issue securities, (B) a Fannie Mae Seller in good standing with the authority to sell
mortgages or (C) a Freddie Mac Seller in good standing with the authority to sell mortgages, as applicable; (ii) the Agency Custodian shall be the same entity 

  
 Page 16 of 20 

 
that serves as Custodian under the Agreement for so long as the Purchased Assets are subject to the Agreement; (iii) the Agency Custodian and the Seller shall have entered into the Master
Agency Custodial Agreement, which shall be in full force and effect at all times; (iv) Seller and the Agency Custodian shall comply with all applicable requirements set forth in the Guide and the Master Agency Custodial Agreement as hereafter
amended, modified or superceded and (v) the related Purchased Mortgage Loans must be subject to a Agency Security Purchase Commitment with a Takeout Broker Dealer. 

c. The Seller agrees to comply with the following additional protocol with respect to the issuance of Purchased Agency
Securities: 
  

	 	(1)	The Agency Security Purchase Commitment will not describe specific Purchased Mortgage Loans that will underlie the Purchased Agency Security, but instead shall solely provide for delivery of a Purchased Agency Security.

  

	 	(2)	Seller shall inform Buyer of the Purchased Mortgage Loans that Seller intends to pool in a related Purchased Agency Security. Buyer shall cause the Custodian to make available to the Agency Custodian the Mortgage Files
related to such Purchased Mortgage Loans to enable the Agency Custodian to complete the initial certification(s) pursuant to the Guide. Such Mortgage Files shall at all times remain in the custody of the Custodian or the Agency Custodian.

  

	 	(3)	Seller shall designate on (i) the Schedule of Subscribers and Ginnie Mae Guaranty Agreement (HUD-11705) (A) the Buyer exclusively as the Subscriber/Participant, (B) the Buyer exclusively as the Name of
the Individual or Organization Authorized to Take Delivery, and (C) the Buyer’s Fed Member Bank Information and no other; (ii) the Fannie Mae Delivery Schedule (Fannie Mae Form 2014) the Buyer’s Depository Institution and
Telegraphic Abbreviation, ABA Number and Account Name and Account Number and no other and (iii) the Freddie Mac Delivery Authorization (Freddie Mac Form 939) (A) the Buyer exclusively as the Warehouse Lender and (B) the Buyer’s
Security Wire Instructions and no other. Seller shall ensure that the Agency Securities are delivered to the Buyer’s Federal Book Account free from obligation or repayment. Seller shall cause a copy of the final completed Schedule of
Subscribers and Ginnie Mae Guaranty Agreement, Freddie Mac Delivery Authorization and Fannie Mae Delivery Schedule to be delivered to the Buyer upon its request. 

  
 Page 17 of 20 

	 	(4)	The Buyer shall provide an executed copy of the Release of Security Interest to the Ginnie Mae Agency Custodian, in the case of Ginnie Mae, and to Fannie Mae or Freddie Mac, as applicable, in the case of Fannie Mae and
Freddie Mac, to be held in escrow with respect to any pool of mortgage loans prior to the issuance of the related Purchased Agency Securities. Any Purchased Mortgage Loans that are not included in the related Purchased Agency Security shall continue
to be Purchased Mortgage Loans under the Agreement and the release of security interest shall not apply to such Purchased Mortgage Loans. 

  

	 	(5)	All pool and loan packages relating to Purchased Assets are required to be submitted in electronic form using (i) the GinnieNET system, (ii) MIDANET or the Selling System (Freddie) or (iii) MORNET
or Loan Delivery (Fannie), as applicable (such terms as defined in the Guide). 

  

	 	(6)	Simultaneously upon the delivery of the Purchased Agency Security to the Buyer, (i) the Seller shall be deemed to have paid the Repurchase Price for the related pooled Purchased Mortgage Loans backing such
Purchased Agency Security through the delivery of such Purchased Agency Security; (ii) the Seller and Buyer shall have entered into a new Transaction with respect such Purchased Agency Security and (iii) the Buyer shall be deemed to
automatically release the Release of Security Interest from escrow. 

  

	 	(7)	Buyer shall deliver the related Purchased Agency Security to the Takeout Broker Dealer, in accordance with the “delivery vs. payment” procedures of DTC, simultaneously upon payment for such Purchased Agency
Security to the Buyer’s Federal Book Account. 

 24. Any capitalized term used but not defined herein shall have the
meaning assigned to such term in the Master Repurchase Agreement. 
 25. This Amendment only relates to the Master Repurchase Agreement
between the Buyer and the Seller. Except as expressly amended above, all of the terms and conditions of the Master Repurchase Agreement remain in full force and effect and are hereby reaffirmed. 

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

  
 Page 18 of 20 

 [THE REMAINDER OF THIS PAGE WAS LEFT BLANK INTENTIONALLY] 

  
 Page 19 of 20 

 IN WITNESS WHEREOF, Seller and Buyer have caused their names to be signed to this Amendment to
Master Repurchase Agreement by their respective officers thereunto duly authorized as to the date first above written. 
  

			
	WELLS FARGO BANK, N.A.
		
	By:	 	 /s/ Kenneth D. Logan

		 	Name: Kenneth D. Logan
		 	Title: Managing Director
	
	LOANDEPOT.COM, LLC
		
	By:	 	 /s/ Anthony L. Hsieh

		 	Name: Anthony L. Hsieh
		 	Title: Chief Executive Officer

  
 Page 20 of 20

Source: [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00250-of-00352.parquet"}, [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00250-of-00352.parquet"}]]