EX-10.38





 Exhibit 10.38 

CERTAIN IDENTIFIED INFORMATION HAS BEEN EXCLUDED FROM THE EXHIBIT BECAUSE IT IS BOTH NOT MATERIAL AND WOULD LIKELY CAUSE COMPETITIVE HARM TO
THE REGISTRANT IF PUBLICLY DISCLOSED. [***] INDICATES THAT INFORMATION HAS BEEN REDACTED. 
 EXECUTION VERSION 

AMENDMENT NO. 5 TO 

SECOND AMENDED AND RESTATED MASTER REPURCHASE AGREEMENT 

Amendment No. 5 to Second Amended and Restated Master Repurchase Agreement, dated as of June 4, 2018, among CREDIT SUISSE FIRST
BOSTON MORTGAGE CAPITAL LLC (“Administrative Agent”), CREDIT SUISSE AG, a company incorporated under the laws of Switzerland, acting through its Cayman Islands Branch (“CS Cayman” and a “Buyer”),
ALPINE SECURITIZATION LTD (“Alpine” and a “Buyer”) and CALIBER HOME LOANS, INC. (the “Seller”). 

RECITALS 
 The
Administrative Agent, the Buyers and the Seller are parties to that certain Second Amended and Restated Master Repurchase Agreement, dated as of August 26, 2016 (as amended, restated, supplemented or otherwise modified from time to time, the
“Existing Repurchase Agreement”; as further amended by this Amendment, the “Repurchase Agreement”) and the related Amended and Restated Pricing Side Letter, dated as of August 26, 2016 (as amended, restated,
supplemented or otherwise modified from time to time, the “Pricing Side Letter”). Capitalized terms used but not otherwise defined herein shall have the meanings given to them in the Existing Repurchase Agreement. 

The Administrative Agent, the Buyers and the 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 Administrative Agent, the Buyers and the 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. Applicability. Section 1 of the Existing Repurchase Agreement is hereby amended by deleting such section in its
entirety and replacing it with the following: 
  

	 	1.	 Applicability 



From time to time the parties hereto may enter into transactions in which Seller agrees to transfer to a Buyer, or
Administrative Agent on behalf of Buyers, Mortgage Loans (as hereinafter defined) on a servicing released basis against the transfer of funds by such Buyer, or Administrative Agent on behalf of such Buyer, with a simultaneous agreement by such
Buyer, or the Administrative Agent on behalf of such Buyer to transfer to Seller such Mortgage Loans on a servicing released basis at a date certain or on demand, against the transfer of funds by Seller. This Agreement is a commitment by Committed
Buyers and/or Administrative Agent on behalf of Committed Buyers to engage in the Transactions as set forth herein up to the Maximum Committed Purchase Price; provided, that Committed Buyers and Administrative Agent on behalf of Committed Buyers
shall have no commitment to enter into any Transaction requested that would result in the aggregate Purchase Price of then-outstanding Transactions exceeding the Maximum Committed Purchase Price, and in no event













 
shall the aggregate Purchase Price of outstanding Transactions exceed the Maximum Aggregate Purchase Price at any time. Each such transaction shall be referred to herein as a
“Transaction” and, unless otherwise agreed in writing, shall be governed by this Agreement, including any supplemental terms or conditions contained in any annexes identified herein, as applicable hereunder. For the avoidance of doubt, and
for administrative and tracking purposes, (a) the purchase and sale of each Purchased Mortgage Loan shall be deemed a separate Transaction and (b) with respect to each Designated Mortgage Loan, such Designated Mortgage Loan may, at
Buyers’ option, be sold to different Buyers on a pro rata basis, such that one Buyer pays the Base Purchase Price and another Buyer pays the Incremental Purchase Price, in which case, the Administrative Agent shall own the Designated Mortgage
Loan, for the benefit of the purchasing Buyers, on a pro rata, pari passu basis. 
 SECTION 2. Definitions. (a) Section 2
of the Existing Repurchase Agreement is hereby amended by deleting the definitions of “Margin Call”, “Margin Deficit”, “Price Differential” and “Purchase Price” in their entirety
and replacing them with the following: 
 “Margin Call” has the meaning specified in Section 6(b)
hereof. 
 “Margin Deficit” has the meaning specified in Section 6(b) hereof. 

“Price Differential” means with respect to any Transaction as of any date of determination, an amount equal to
the sum of (a) the product of (1) (A) the Base Pricing Rate for such Transaction and (B) the Base Purchase Price for such Transaction and (b) the product of (1) (A) the Incremental Pricing Rate for such Transaction and (B) the
Incremental Purchase Price for such Transaction, calculated daily on the basis of a 360-day year for the actual number of days during the period commencing on (and including) the Purchase Date for such
Transaction and ending on (but excluding) the Repurchase Date. 
 “Purchase Price” means the price at which
each Purchased Mortgage Loan is transferred by Seller to the Administrative Agent, for the benefit of Buyers, which shall equal: 

(i) on the Purchase Date, the Base Purchase Price plus, with respect to Designated Mortgage Loans, the Incremental Purchase
Price, if any; 
 (ii) on any day after the Purchase Date, except where Buyers or Administrative Agent and the Seller agree
otherwise, the amount determined under the immediately preceding clause (i) decreased by the amount of any cash transferred by the Seller to Administrative Agent or applied to reduce the Seller’s obligations under clause (ii) of
Section 4(b) hereof or Section 6 hereof. 
 (b) Section 2 of the Existing Repurchase Agreement is hereby amended by adding the following
definitions of “Base Purchase Price”, “Designated Mortgage Loan”, “Designated Mortgage Loan Event”, “Disqualification Event”, “Incremental Purchase Price”,
“LIBOR”, “Participant”, “Participation Agreement”, “Take-out Commitment” and “Take-out
Price” in proper alphabetical order: 

  
 -2- 













 “Base Purchase Price” has the meaning assigned to such term
in the Pricing Side Letter. 
 “Designated Mortgage Loan” means a Mortgage Loan that is an Agency Mortgage
Loan, a Non-Agency QM Mortgage Loan or a Non-Agency Non-QM Mortgage Loan. 

“Designated Mortgage Loan Event” means the failure of a Participant to purchase the participation interest
pursuant to a Participation Agreement with respect to a Designated Mortgage Loan. 
 “Disqualification
Event” has the meaning assigned to such term in the Pricing Side Letter. 
 “Incremental Purchase
Price” has the meaning assigned to such term in the Pricing Side Letter. 
 “LIBOR” has the meaning
assigned to such term in the Pricing Side Letter. 
 “Participant” means any participant as contemplated by
Section 22(b) hereof. 
 “Participation Agreement” means a participation agreement by and among a
Participant, the Administrative Agent and the Buyers in form and substance acceptable to Administrative Agent, as the same may be amended, restated, supplemented or otherwise modified from time to time. 

“Take-out Commitment” has the meaning assigned to such term in the
Pricing Side Letter. 
 “Take-out Price” has the meaning assigned to
such term in the Pricing Side Letter. 
 SECTION 3. Margin Maintenance. Section 6 of the Existing Repurchase Agreement is hereby
amended by deleting such section in its entirety and replacing it with the following: 
  

	 	6.	 Margin Maintenance 



a. If at any time the outstanding Purchase Price of any Purchased Mortgage Loan subject to a Transaction is greater than the
Asset Value of such Purchased Mortgage Loan subject to a Transaction (a “Mark-to-Market Margin Deficit”), then Administrative Agent may by notice to Seller require Seller to transfer to Administrative Agent for the benefit of Buyers
cash in an amount at least equal to the Mark-to-Market Margin Deficit (such requirement, a
“Mark-to-Market Margin Call”). 

  
 -3- 













 b. Without duplication, if at any time a Designated Mortgage Loan Event has
occurred, then Administrative Agent may by notice to Seller require Seller to transfer to Administrative Agent for the benefit of Buyers (a “Designated Mortgage Loan Margin Call”, together with a Mark-to-Market Margin Call, collectively, a “Margin Call”) cash in an amount to reduce the Purchase Price for all Designated Mortgage Loans for which a Designated Mortgage Loan Event has
occurred to the Base Purchase Price for each such Designated Mortgage Loan (a “Designated Mortgage Loan Margin Deficit”, together with a Mark-to-Market
Margin Deficit, collectively, a “Margin Deficit”). 
 c. Notice delivered pursuant to Section 6(a) or
Section 6(b) may be given by any written or electronic means. Any notice given before [***] (New York City time) on a Business Day shall be met, and the related Margin Call satisfied, no later than [***] (New York City time) on such Business
Day; notice given after [***] (New York City time) on a Business Day shall be met, and the related Margin Call satisfied, no later than [***] (New York City time) on the following Business Day (the foregoing time requirements for satisfaction of a
Margin Call are referred to as the “Margin Deadlines”). The failure of Buyers or Administrative Agent, on any one or more occasions, to exercise its rights hereunder, shall not change or alter the terms and conditions to which this
Agreement is subject or limit the right of Buyers or Administrative Agent to do so at a later date. Seller, Buyers and Administrative Agent each agree that a failure or delay by Administrative Agent to exercise its rights hereunder shall not limit
or waive Administrative Agent’s or Buyers’ rights under this Agreement or otherwise existing by law or in any way create additional rights for Seller. 

d. In the event that a Margin Deficit exists with respect to any Purchased Mortgage Loan, Buyers or Administrative Agent may
retain any funds received by it to which the Seller would otherwise be entitled hereunder, which funds (i) shall be held by Administrative Agent against the related Margin Deficit and (ii) may be applied by Buyers or Administrative Agent
against the Repurchase Price of any Purchased Mortgage Loan for which the related Margin Deficit remains otherwise unsatisfied. Notwithstanding the foregoing, Buyers and the Administrative Agent retain the right, in their sole discretion, to make a
Margin Call in accordance with the provisions of this Section 6. 
 SECTION 4. Conditions Precedent to All Transactions.
(a) Subclause (5) of Section 10.b. of the Existing Repurchase Agreement is hereby amended by deleting such subclause in its entirety and replacing it with the following: 

(5) Requirements of Law. Neither Administrative Agent, a Participant nor a Buyer shall have determined that the
introduction of or a change in any Requirement of Law or in the interpretation or administration of any Requirement of Law applicable to Administrative Agent, any Participant or any Buyer has made it unlawful, and no Governmental Authority shall
have asserted that it is unlawful, for Administrative Agent, any Participant or any Buyer to enter into Transactions. 

  
 -4- 













 (b) Section 10.b. of the Existing Repurchase Agreement is hereby amended by adding subclause (12) at
the end of such section: 
 (12) Designated Mortgage Loans. With respect to each proposed Transaction with respect to
a Designated Mortgage Loan, (x) no Disqualification Event shall have occurred and be continuing and (y) the Seller shall sell such Designated Mortgage Loan to Buyers at the full Purchase Price (and not some lesser amount). 

SECTION 5. Program; Costs. Section 11.b. of the Existing Repurchase Agreement is hereby amended by deleting such subparagraph in
its entirety and replacing it with the following: 
 b. If Administrative Agent or any Buyer determines that, due to the
introduction of, any change in, or the compliance by Administrative Agent or such Buyer with (i) any eurocurrency reserve requirement or (ii) the interpretation of any law, regulation or any guideline or request from any central bank or
other Governmental Authority (whether or not having the force of law), there shall be an increase in the cost (other than Indemnified Taxes or Excluded Taxes) to Administrative Agent or such Buyer in engaging in the present or any future
Transactions, then Seller agrees to pay to Administrative Agent or such Buyer, from time to time, upon demand by Administrative Agent or such Buyer (with a copy to Custodian) the actual cost of additional amounts as specified by Administrative Agent
or such Buyer to compensate Administrative Agent or such Buyer for such increased costs; provided that such Buyer shall provide Seller with an explanation for such increase in cost and that such increase in cost shall not otherwise be included in or
the direct cause of any increase in the Base Rate or 
 LIBOR. 

SECTION 6. No Waivers, Etc. Section 25 of the Existing Repurchase Agreement is hereby amended by deleting such section in its
entirety and replacing it with the following: 
 25. No Waivers, Etc. 

No express or implied waiver of any Event of Default by either party shall constitute a waiver of any other Event of Default
and no exercise of any remedy hereunder by any party shall constitute a waiver of its right to exercise any other remedy hereunder. No modification or waiver of any provision of this Agreement and no consent by any party to a departure herefrom
shall be effective unless and until such shall be in writing and duly executed by both of the parties hereto. Without limitation on any of the foregoing, the failure to give a notice pursuant to Section 6(a), 6(b), 16(a) or otherwise, will not
constitute a waiver of any right to do so at a later date. 

  
 -5- 













 SECTION 7. Confidentiality. Section 32 of the Existing Repurchase Agreement is
hereby amended by deleting the first paragraph of such section in its entirety and replacing it with the following: 
 This
Agreement and its terms, provisions, supplements and amendments, and notices hereunder, are confidential and shall be held by the parties hereto in strict confidence and shall not be disclosed to any third party without the written consent of the non-disclosing party except for (i) disclosure to any party’s direct and indirect affiliates and Subsidiaries, representatives, attorneys or accountants, but only to the extent such disclosure is necessary
to do so in working with legal counsel, auditors, taxing authorities, rating agencies or other governmental agencies or regulatory bodies or in order to comply with any applicable federal or state laws and such parties agree to hold all information
in strict confidence, (ii) disclosure required in its financial statements in accordance with GAAP, (iii) disclosure required by law, rule, regulation or order of a court or other regulatory body or rating agency or otherwise required in
connection with any securities issued by a Buyer or an Affiliate of a Buyer, (iv) disclosure as is appropriate for Administrative Agent and Buyers to do so in working with Administrative Agent’s and Buyers’ affiliates, Subsidiaries
and representatives in connection with the management and/or review of the Transactions or performing rights or obligations under this facility, (v) disclosure of any confidential terms that are in the public domain other than due to a breach
of this covenant, (vi) disclosure made to an assignee, Repledgee or any of their direct and indirect affiliates and Subsidiaries, representatives, attorneys or accountants, but only to the extent such disclosure is necessary in connection with
the transactions or performing rights or obligations under this facility, and provided that, to the extent such disclosure involves information regarding the Seller or Confidential Information related to a Mortgagor’s name, address or social
security number, such information shall be subject to a confidentiality agreement that will require materially the same confidentiality requirements as set forth herein or (vii) disclosure as Administrative Agent and Buyers deem appropriate in
connection with the enforcement of Administrative Agent’s and Buyers’, any assignee’s or Repledgee’s respective rights hereunder or under any Transaction, including in connection with disposition of Repurchase Assets as permitted
hereunder. Notwithstanding the foregoing or anything to the contrary contained herein or in any other Program Agreement, the parties hereto may disclose to any and all Persons, without limitation of any kind, the federal, state and local tax
treatment of the Transactions, any fact relevant to understanding the federal, state and local tax treatment of the Transactions, and all materials of any kind (including opinions or other tax analyses) relating to such federal, state and local tax
treatment and that may be relevant to understanding such tax treatment; provided that Seller may not disclose the name of or identifying information with respect to Administrative Agent and Buyers or any pricing terms (including, without limitation,
the Pricing Rate, Base Pricing Rate, Incremental Pricing Rate, 

  
 -6- 













 
Commitment Fee, Purchase Price Percentage, Purchase Price, Base Purchase Price and Incremental Purchase Price) or other nonpublic business or financial information (including any sublimits and
financial covenants) that is unrelated to the federal, state and local tax treatment of the Transactions and is not relevant to understanding the federal, state and local tax treatment of the Transactions, without the prior written consent of Buyers
or Administrative Agent. 
 SECTION 8. Conditions Precedent to Amendment. This Amendment shall become effective as of the date hereof
(the “Amendment Effective Date”), subject to the receipt by Administrative Agent of the following, each of which shall be satisfactory to the Administrative Agent in form and substance: 

(a) this Amendment, duly executed and delivered by the Administrative Agent, the Buyers and the Seller; and 

(b) an amendment to the Pricing Side Letter, duly executed and delivered by the parties thereto. 

SECTION 9. Representations and Warranties. The Seller hereby represents and warrants to the Administrative Agent and the Buyers that 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 Event of Default has occurred or is continuing, and hereby confirms and reaffirms the representations and
warranties contained in Section 13 of the Repurchase Agreement. 
 SECTION 10. 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 11. 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 12.
Counterparts. This Amendment may be executed by each of the parties hereto on any number of separate counterparts, each of which shall be an original and all of which taken together shall constitute one and the same instrument. Delivery of an
executed counterpart of a signature page of this Amendment in a Portable Document Format (PDF) or by facsimile shall be effective as delivery of a manually executed original counterpart of this Amendment. 

SECTION 13. GOVERNING LAW. THIS AMENDMENT SHALL BE GOVERNED BY, AND CONSTRUED IN ACCORDANCE WITH, THE LAWS OF THE
STATE OF NEW YORK WITHOUT REFERENCE TO THE CHOICE OF LAW PROVISIONS THEREOF. 
 [SIGNATURE PAGE FOLLOWS] 

  
 -7- 













 IN WITNESS WHEREOF, the undersigned have caused this Amendment to be duly executed as of the
date first above written. 
  

			
	CREDIT SUISSE FIRST BOSTON MORTGAGE CAPITAL LLC, as Administrative Agent
		
	By:	 	 /s/ Margaret Dellafera

	Name:	 	Margaret Dellafera
	Title:	 	Vice President
	
	 CREDIT SUISSE AG, CAYMAN ISLANDS BRANCH,

as a Buyer

		
	By:	 	 /s/ Margaret Dellafera

	Name:	 	Margaret Dellafera
	Title:	 	Authorized Signer
		
	By:	 	 /s/ Elie Chau

	Name:	 	Elie Chau
	Title:	 	Authorized Signatory
	
	ALPINE SECURITIZATION LTD, as a Buyer, by Credit Suisse AG, New York Branch, as Attorney-in-Fact
		
	By:	 	 /s/ Elie Chau

	Name:	 	Elie Chau
	Title:	 	Authorized Signatory
		
	By:	 	 /s/ Patrick J. Hart

	Name:	 	Patrick J. Hart
	Title:	 	Vice President


 Signature Page to Amendment No. 5 to Second A&R MRA 












 
			
	CALIBER HOME LOANS, INC., as Seller
		
	By:	 	 /s/ William Dellal

	Name:	 	William Dellal
	Title:	 	CFO


 Signature Page to Amendment No. 5 to Second A&R MRA