Document:

Performance Guaranty

 Exhibit 10.4 
 Execution Copy 
 PERFORMANCE GUARANTY 
 This Performance Guaranty (this “Guaranty”), dated as of February 28, 2007, is executed by American Home Mortgage Holdings, Inc., a
Delaware corporation, and American Home Mortgage Investment Corp., a Maryland corporation (each, a “Performance Guarantor” and together, the “Performance Guarantors”), in favor of ABN AMRO Bank N.V. (“ABN AMRO”), as
agent for the Purchasers, Group Agents and other Indemnified Parties under the Repurchase Agreement referred to below (the “Agent”). 
 WHEREAS, American Home Mortgage Corp., American Home Mortgage Acceptance, Inc., American Home Mortgage Investment Corp., and American Home Mortgage Servicing, Inc., (collectively, the “Sellers” and each a
“Seller”) have entered into a Master Repurchase Agreement (the “Repurchase Agreement”) dated as of February 28, 2007 with the Agent, as Buyer pursuant to which the Sellers, subject to the terms and conditions
therein and in the Letter Agreement, may sell certain Mortgage Loans and related property to the Agent for the benefit of the Purchasers and pursuant to the Letter Agreement American Home Mortgage Servicing, Inc. (the “Servicer”)
has agreed to perform the duties and obligations as “Servicer” thereunder. 
 WHEREAS, as an inducement for the Purchasers to enter
into the Letter Agreement and the Transactions contemplated by the Repurchase Agreement, the Performance Guarantors have agreed to guaranty the due and punctual performance of the Sellers and the Servicer under the Repurchase Agreement, the Letter
Agreement and the other Transaction Documents; 
 WHEREAS, it is a condition precedent to the Purchasers agreeing to enter into the Letter
Agreement and the Transactions contemplated by the Repurchase Agreement that the Performance Guarantors execute and deliver to the Agent a performance guaranty substantially in the form hereof; and 
 WHEREAS, the Performance Guarantors wish to guaranty the due and punctual performance of the Sellers’ obligations as “Sellers” and of the
Servicer’s obligations as “Servicer” to the Agent, the Group Agents and the Purchasers under or in respect of the Repurchase Agreement as provided herein, and the Performance Guarantors, as the owners, directly or indirectly, of all
of the outstanding shares of capital stock of the Sellers and of the Servicer, will derive substantial benefit from the transactions contemplated under the Repurchase Agreement and the other Transaction Documents; 
 NOW, THEREFORE, each of the Performance Guarantors hereby agrees with the Agent for the benefit of itself, each Group Agent, each Purchaser and each
Indemnified Party as follows: 
 Section 1. Definitions. 
 As used herein: 
 “Bankruptcy Code” means the United States Bankruptcy Code, 11 U.S.C. Sections 101 et seq., as amended. 
  

 1 

 “Obligations” means, collectively, all Seller Obligations of each Seller
and all Servicer Obligations. 
 “Seller Obligations” means collectively, all covenants, agreements, terms,
conditions and indemnities to be performed and observed by a Seller solely in its capacity as a “Seller” under and pursuant to the Repurchase Agreement, the Letter Agreement, each other Transaction Document and each other document executed
and delivered by such Seller as a “Seller” pursuant to the Repurchase Agreement or the Letter Agreement, including, without limitation, the due and punctual payment of all sums which are or may become due and owing by such Seller as a
“Seller” under the Repurchase Agreement, the Letter Agreement or any other Transaction Document, whether for the payment of any Repurchase Price, the deposit of collections received by it or for fees, expenses (including counsel fees),
indemnified amounts or otherwise, whether upon any termination or for any other reason, including any renewals, extensions and modifications thereof. 
 “Servicer Obligations” means collectively, all covenants, agreements, terms, conditions and indemnities to be performed and observed by AHMS solely in its capacity as “Servicer” under and
pursuant to the Repurchase Agreement, the Letter Agreement, each other Transaction Document and each other document executed and delivered by the Servicer as “Servicer” pursuant to the Repurchase Agreement or the Letter Agreement,
including, without limitation, the due and punctual payment of all sums which are or may become due and owing by the Servicer as “Servicer” under the Repurchase Agreement, the Letter Agreement or any other Transaction Document, whether for
the deposit of collections received by it or for fees, expenses (including counsel fees), indemnified amounts or otherwise, whether upon any termination or for any other reason, including any renewals, extensions and modifications thereof.

 All capitalized terms used herein, and not otherwise herein defined shall have their respective meanings as defined in the Repurchase
Agreement or the Letter Agreement, as applicable. 
 Section 2. Guaranty of Performance of Obligations. Each of the Performance
Guarantors, jointly and severally, hereby unconditionally guarantees to the Agent, the Group Agents, the Purchasers and each other Indemnified Party, the full and punctual payment and performance by each Seller of the Seller Obligations and by the
Servicer of the Servicer Obligations. 
 This Guaranty is an absolute, unconditional and continuing guaranty of the full and punctual
performance of all of the Obligations and is in no way conditioned upon any requirement that the Agent, the Group Agents or the Purchasers first take any action against any Seller or the Servicer with respect to the Obligations or attempt to collect
any of the amounts owing by any Seller or the Servicer to the Purchasers, the Group Agents or the Agent from any Seller or the Servicer or resort to any collateral security, any balance of any deposit account or credit on the books of any Purchasers
in favor of any Seller or the Servicer, any guarantor of the Obligations or any other Person. Should any Seller or the Servicer default in the payment or performance of any of the Obligations, the Agent or the Required Group Agents may cause the

  

 2 

 
immediate performance by each of the Performance Guarantors of the Obligations and cause any payment Obligations to become forthwith due and payable to the
Agent, the Group Agents and the Purchasers, without demand or notice of any nature (other than as expressly provided herein), all of which are expressly waived by each of the Performance Guarantors. 
 Each of the Performance Guarantor’s liability under this Guaranty shall be absolute and unconditional irrespective of (i) any lack of validity
or enforceability of the Repurchase Agreement, the Letter Agreement or any other document executed in connection therewith or delivered thereunder, (ii) any change in the time, manner or place of payment of, or in any other term of, all or any
of the Obligations, or any other amendment or waiver of or any consent to departure from the Repurchase Agreement, the Letter Agreement or any other document executed in connection therewith or delivered thereunder, (iii) any taking, exchange,
release or non-perfection of any collateral, or any taking, release or amendment or waiver of or consent to departure from any other guaranty, for all or any of the Obligations, (iv) any law, regulation or order of any jurisdiction affecting
any term of all or any Obligations or the rights of the Agent, any Group Agent, any of the Purchasers or any other Indemnified Party, (v) any manner of application of collateral, or proceeds thereof, to all or any of the Obligations, or any
manner of sale or other disposition of any collateral for all or any of the Obligations or any other assets of any Seller or the Servicer, (vi) any change, restructuring or termination of the corporate structure or existence of any Seller or
the Servicer, or (vii) any other circumstance which might otherwise constitute a defense available to, or a discharge of, any Seller, the Servicer or a guarantor. In the event that performance of any of the Obligations is stayed upon the
insolvency, bankruptcy or reorganization of any Seller or the Servicer, or for any other reason, all such Obligations shall be immediately performed by the Performance Guarantors. 
 Section 3. Performance Guarantors’ Further Agreements to Pay. Each of the Performance Guarantors further agrees, jointly and severally,
in the event the Performance Guarantors fail to perform their obligations under this Guaranty, to pay to the Agent, the Group Agents, the Purchasers and any other Indemnified Party, forthwith upon demand all reasonable costs and expenses (including
court costs and legal expenses) incurred or expended by the Agent, the Group Agents, the Purchasers or any Indemnified Party in connection with the enforcement of this Guaranty. 
 Section 4. Waivers by Performance Guarantors; Agent’s, Group Agents’ and Purchasers’ Freedom to Act. Each of the Performance
Guarantors waives notice of (a) acceptance of this Guaranty, (b) any action taken or omitted by the Agent, any Group Agent, any Purchaser or any Indemnified Party in reliance on this Guaranty, and (c) any requirement that the Agent,
the Group Agents, the Purchasers or any Indemnified Party be diligent or prompt in making demands under this Guaranty, giving notice of any Incipient Event of Default or Event of Default, default or omission by any Seller or the Servicer or
asserting any other rights of the Agent, any Group Agent, any Purchaser or any Indemnified Party under this Guaranty. To the maximum extent permitted by applicable law, each of the Performance Guarantors also irrevocably waives all defenses that at
any time may be available in respect of the Obligations by virtue of any statute of limitations, valuation, stay, moratorium law or other similar law now or thereafter in effect. 
  

 3 

 The Agent shall be at liberty, upon its own initiative or at the request of the Required Group Agents,
without giving notice to or obtaining the assent of the Performance Guarantors and without relieving either of the Performance Guarantors of any liability under this Guaranty, to deal with the Sellers and the Servicer and with each other party who
now is or after the date hereof becomes liable in any manner for any of the Obligations, in such manner as the Agent in its sole discretion deems fit or the Required Group Agents in their sole discretion deem fit, and to this end each of the
Performance Guarantors agrees that the validity and enforceability of this Guaranty, including without limitation, the provisions of Section 8 hereof, shall not be impaired or affected by any of the following: (a) any extension,
modification or renewal of, or indulgence with respect to, or substitutions for, the Obligations or any part thereof or any agreement relating thereto at any time; (b) any failure or omission to enforce any right, power or remedy with respect
to the Obligations or any part thereof or any agreement relating thereto, or any collateral securing the Obligations or any part thereof; (c) any waiver of any right, power or remedy or of any Incipient Event of Default or Event of Default or
default with respect to the Obligations or any part thereof or any agreement relating thereto; (d) any release, surrender, compromise, settlement, waiver, subordination or modification, with or without consideration, of any other obligation of
any person or entity with respect to the Obligations or any part thereof; (e) the enforceability or validity of the Obligations or any part thereof or the genuineness, enforceability or validity of any agreement relating thereto or with respect
to the Obligations or any part thereof; (f) the application of payments received from any source to the payment of any payment Obligations of any Seller or of the Servicer, any part thereof or amounts which are not covered by this Guaranty even
though the Agent, the Group Agents or the Purchasers might lawfully have elected to apply such payments to any part or all of the payment Obligations of any Seller or the Servicer or to amounts which are not covered by this Guaranty; (g) the
existence of any claim, setoff or other rights which either of the Performance Guarantors may have at any time against any Seller or the Servicer in connection herewith or any unrelated transaction; (h) any assignment or transfer of the
Obligations or any part thereof; or (i) any failure on the part of any Seller or the Servicer to perform or comply with any term of the Repurchase Agreement or any other document executed in connection therewith or delivered thereunder, all
whether or not the Performance Guarantors shall have had notice or knowledge of any act or omission referred to in the foregoing clauses (a) through (i) of this Section. 
 Section 5. Unenforceability of Obligations Against the Sellers or the Servicer. Notwithstanding (a) any change of ownership of any
Seller or the Servicer or the insolvency, bankruptcy or any other change in the legal status of any Seller or the Servicer; (b) the change in or the imposition of any law, decree, regulation or other governmental act which does or might impair,
delay or in any way affect the validity, enforceability or the payment when due of the Obligations; (c) the failure of any Seller, the Servicer or either of the Performance Guarantors to maintain in full force, validity or effect or to obtain
or renew when required all governmental and other approvals, licenses or consents required in connection with the Obligations or this Guaranty, or to take any other action required in connection with the performance of all obligations pursuant to
the Obligations or this Guaranty; or (d) if any of the moneys included in the Obligations have become unrecoverable from any Seller or the Servicer for any reason other than final payment in full of the payment Obligations in accordance with
their terms, this Guaranty shall nevertheless be binding on each of the Performance Guarantors. This Guaranty shall be in addition to any other guaranty or other security for the Obligations, and it shall not be rendered unenforceable by the
invalidity of any such other guaranty or security. 
  

 4 

 Section 6. Representations and Warranties. 
 Section 6.1. Existence and Standing. Each of the Performance Guarantors is a corporation duly incorporated, validly existing and in good
standing under the laws of its jurisdiction of incorporation and has all requisite corporate authority to conduct its business in each jurisdiction in which its business is conducted. 
 Section 6.2. Authorization; Validity. Each of the Performance Guarantors has the corporate power and authority to execute and deliver this
Guaranty, perform its obligations hereunder and consummate the transactions herein contemplated. The execution and delivery by each of the Performance Guarantors of this Guaranty, the performance of its obligations and consummation of the
transactions contemplated hereunder have been duly authorized by proper corporate proceedings, and this Guaranty constitutes the legal, valid and binding obligation of each of the Performance Guarantors, enforceable against such Performance
Guarantor in accordance with its terms, except as enforceability may be limited by bankruptcy, insolvency or similar laws affecting the enforcement of creditors’ rights generally and by general equity principles (whether considered as a
proceeding at law or in equity). 
 Section 6.3. No Conflict; Government Consent. Neither the execution and delivery by either of
the Performance Guarantors of this Guaranty, nor the consummation of the transactions herein contemplated, nor compliance with the provisions hereof will contravene or conflict with any law, rule, regulation, order, writ, judgment, injunction,
decree or award binding on such Performance Guarantor or any of its Subsidiaries, except where such contravention or conflict would not reasonably be expected to have a Material Adverse Effect, or such Performance Guarantor’s certificate of
incorporation or by-laws or the provisions of any indenture, instrument or agreement to which such Performance Guarantor is a party or is subject, or by which it, or its property, is bound, except where such contravention or conflict would not
reasonably be expected to have a Material Adverse Effect, or result in the creation or imposition of any Lien in, of or on the property of such Performance Guarantor or any of its subsidiaries pursuant to the terms of any such indenture, instrument
or agreement. 
 Section 6.4. Financial Statements. The consolidated financial statements of American Home Mortgage Investment
Corp. and the Sellers and the Servicer, heretofore delivered to the Purchasers as required by the Letter Agreement, were prepared in accordance with generally accepted accounting principles in effect on the date such statements were prepared and
fairly present the consolidated financial condition and operations of American Home Mortgage Investment Corp. and the Sellers and the Servicer at such date and the consolidated results of their operations for the period then ended. 
 Section 6.5. Material Adverse Change. Since September 30, 2006, there has been no change in the business, properties, financial
condition or results of operations of either of the Performance Guarantors and the Sellers and the Servicer which is reasonably likely to have a Material Adverse Effect on (i) the business, properties, financial condition or results of
operations of such Performance Guarantor and the Sellers and the Servicer taken as a whole, (ii) the ability of such Performance Guarantor to perform its obligations under this Guaranty, or (iii) the validity or enforceability of any
portion of this Guaranty or the rights or remedies of the Agent, the Group Agents or the Purchasers hereunder. 
  

 5 

 Section 6.6. Taxes. Each of the Performance Guarantors and the Sellers and the Servicer have
filed all United States federal tax returns and all other tax returns which are required to be filed, except where the failure to file would not reasonably be expected to have a Material Adverse Effect, and have paid all taxes due pursuant to said
returns or pursuant to any assessment received by either of the Performance Guarantors or any Seller or the Servicer, except such taxes, if any, as are being contested in good faith and as to which adequate reserves have been provided. No tax liens
have been filed which are reasonably likely to have a Material Adverse Effect on (i) the business, properties, financial condition or results of operations of the Performance Guarantors and the Sellers and the Servicer taken as a whole,
(ii) the ability of either of the Performance Guarantors to perform its obligations under this Guaranty, or (iii) the validity or enforceability of any portion of this Guaranty or the rights or remedies of the Agent, the Group Agents or
the Purchasers hereunder, and no claims are being asserted in writing with respect to any such taxes. The charges, accruals and reserves on the books of each of the Performance Guarantors and the Sellers and the Servicer in respect of any taxes or
other governmental charges are adequate. 
 Section 6.7. Litigation and Contingent Obligations. There is no litigation,
arbitration, governmental investigation, proceeding or inquiry pending or, to the knowledge of any of their officers, threatened against or affecting either Performance Guarantor or any Seller or the Servicer which is reasonably likely to have a
material adverse effect on (i) the business, properties, financial condition or results of operations of such Performance Guarantor and the Sellers and the Servicer taken as a whole, (ii) the ability of such Performance Guarantor to
perform its obligations under this Guaranty, or (iii) the validity or enforceability of any portion of this Guaranty or the rights or remedies of the Agent, the Group Agents or the Purchasers hereunder. Neither of the Performance Guarantors
have any material contingent obligations not provided for or disclosed in the financial statements referred to in Section 6.4. 
 Section 7. Covenants. Each of the Performance Guarantors hereby covenants and agrees, jointly and severally, for the benefit of the Agent, the Group Agents and the Purchasers, until the Obligations have been satisfied in full
and the Repurchase Agreement and the Letter Agreement have been terminated, as follows: 
 (a) to promptly notify the Agent upon (i) any
dispute between such Performance Guarantor and any Governmental Authority or any other Person that, if adversely determined, would have a Material Adverse Effect; (ii) any material adverse change in the business, operations or financial
condition of such Performance Guarantor, including, without limitation, such Performance Guarantor’s insolvency; (iii) any event or condition known to it that, if adversely determined, would have a Material Adverse Effect; and
(iv) the receipt of any notice of any final judgment or order for payment of money applicable to such Performance Guarantor in excess of $1,500,000; 
 (b) to pay and discharge promptly all taxes, assessments and governmental charges or levies imposed upon it or upon its income or upon any of its Property as well as all claims of any kind (including claims for labor,
materials, supplies and rent) that, if unpaid, might become a Lien upon any or all of its Property; provided, however, such Performance Guarantor shall not be required to pay any such tax, assessment, charge, levy or claim if the
amount, applicability or validity thereof shall currently be contested in good faith by appropriate proceedings diligently conducted by it or on its behalf and if it shall have set up reserves therefor adequate under GAAP; 
  

 6 

 (c) to maintain its corporate existence, rights and franchises; and 
 (d) to observe and comply in all material respects with all Governmental Requirements; and 
 Section 8. Subrogation; Subordination. Each of the Performance Guarantors shall not enforce or otherwise exercise any right of subrogation to
any of the rights of the Agent, any Group Agent, any Purchaser or any Indemnified Party against any Seller or the Servicer, until the Obligations have been indefeasibly paid in full; notwithstanding anything to the contrary contained herein, until
the Obligations have been indefeasibly paid in full, each of the Performance Guarantors hereby waives all rights of subrogation (whether contractual, under Section 509 of the United States Bankruptcy Code, at law or in equity or otherwise) to
the claims of the Agent, any Group Agent, any Purchaser or any Indemnified Party against any Seller or the Servicer and all contractual, statutory or legal or equitable rights of contribution, reimbursement, indemnification and similar rights and
“claims” (as that term is defined in the United States Bankruptcy Code) which such Performance Guarantor might now have or hereafter acquire against any Seller or the Servicer that arises from the existence or performance of such
Seller’s or the Servicer’s Obligations; until the Obligations have been indefeasibly paid in full, neither Performance Guarantor will claim any setoff, recoupment or counterclaim against any Seller or the Servicer in respect of any
liability of such Performance Guarantor to any Seller or the Servicer; and such Performance Guarantor waives any benefit of and any right to participate in any collateral security which may be held by the Agent, any Group Agent, any Purchaser or any
Indemnified Party. The payment of any amounts due with respect to any indebtedness for borrowed money of any Seller or the Servicer now or thereafter owed to either of the Performance Guarantors is hereby subordinated to the prior payment in full of
all of the Obligations. Each of the Performance Guarantors agrees that, after the occurrence, and during the continuation, of any default in the payment or performance of any of the Obligations, such Performance Guarantor will not demand, sue for or
otherwise attempt to collect any such indebtedness of any Seller or the Servicer to such Performance Guarantor until all of the Obligations shall have been paid and performed in full. If, notwithstanding the foregoing sentence, either of the
Performance Guarantors shall collect, enforce or receive any amounts in respect of such indebtedness while any Obligations are still unperformed or outstanding, such amounts shall be collected, enforced and received by such Performance Guarantor as
trustee for the Agent, the Group Agents, the Purchasers and the Indemnified Parties and be paid over to the Agent on account of the Obligations without affecting in any manner the liability of such Performance Guarantor under the other provisions of
this Guaranty. The provisions of this Section 8 shall be supplemental to and not in derogation of any rights and remedies of the Agent, the Group Agents, the Purchasers or the Indemnified Parties under any separate subordination agreement which
the Agent, the Group Agents, the Purchasers or the Indemnified Parties may at any time and from time to time enter into with either of the Performance Guarantors. 
 Section 9. Termination of Guaranty. Each of the Performance Guarantor’s obligations hereunder shall continue in full force and effect until all Obligations are finally paid and satisfied in full and
the Repurchase Agreement and the Letter Agreement are terminated; 

  

 7 

 
provided, however, that this Guaranty shall continue to be effective or shall be reinstated, as the case may be, if at any time payment or
other satisfaction of any of the Obligations is rescinded or must otherwise be restored or returned upon the bankruptcy, insolvency, or reorganization of any Seller or the Servicer, as applicable, or otherwise, as though such payment had not been
made or other satisfaction occurred, whether or not the Agent is in possession of this Guaranty. No invalidity, irregularity or unenforceability by reason of the Bankruptcy Code or any insolvency or other similar law, or any law or order of any
government or agency thereof purporting to reduce, amend or otherwise affect the Obligations shall impair, affect, be a defense to or claim against the obligations of each of the Performance Guarantors under this Guaranty. 
 Section 10. Effect of Bankruptcy. This Guaranty shall survive the insolvency of any Seller or the Servicer and the commencement of any case
or proceeding by or against any Seller or the Servicer under the federal Bankruptcy Code or other federal, state or other applicable bankruptcy, insolvency or reorganization statutes. No automatic stay under the federal Bankruptcy Code or other
federal, state or other applicable bankruptcy, insolvency or reorganization statutes to which any Seller or the Servicer is subject shall postpone the obligations of the Performance Guarantors under this Guaranty. 
 Section 11. Setoff. Regardless of the other means of obtaining payment of any of the Obligations, each of the Agent, the Group Agents and the
Purchasers is hereby authorized at any time and from time to time during the existence of an Event of Default, with prompt notice to the Performance Guarantors (any prior notice being expressly waived by the Performance Guarantors) and to the
fullest extent permitted by law, to set off and apply such deposits and other sums of either Performance Guarantor held by it against the obligations of each of the Performance Guarantors under this Guaranty, whether or not the Agent, such Group
Agent or such Purchaser shall have made any demand under this Guaranty and although such obligations may be contingent or unmatured. 
 Section 12. Taxes. All payments to be made by each of the Performance Guarantors hereunder shall be made free and clear of any deduction or withholding. If either of the Performance Guarantors is required by law to make any
deduction or withholding on account of tax or otherwise from any such payment, the sum due from it in respect of such payment shall be increased to the extent necessary to ensure that, after the making of such deduction or withholding, the Agent,
the Group Agents, the Purchasers and the Indemnified Parties receive a net sum equal to the sum which they would have received had no deduction or withholding been made. 
 Section 13. Further Assurances. Each of the Performance Guarantors agrees that it will permit the Agent, the Group Agents and the Purchasers or any of their duly authorized representatives, during normal
business hours, and upon reasonable notice to consult and discuss with such Performance Guarantor’s Treasurer or Controller, with respect to such Performance Guarantor’s business, finances, accounts and affairs. Each Performance Guarantor
agrees that it will, from time to time, at the request of the Agent, the Group Agents and the Purchasers, provide to the Agent, the Group Agents and the Purchasers information relating to the business and affairs of such Performance Guarantor as the
Agent, the Group Agents or the Purchasers may reasonably request. Each of the Performance Guarantors also agrees to do all such things and execute all such documents as the Agent, the Group Agents or the Purchasers may reasonably consider necessary
or desirable to give full effect to this Guaranty and to perfect and preserve the rights and powers of the Agent, the Group Agents and the Purchasers hereunder. 
  

 8 

 Section 14. Successors and Assigns. This Guaranty shall be binding upon each of the
Performance Guarantors, its successors and assigns, and shall inure to the benefit of and be enforceable by the Agent, the Group Agents, the Purchasers, the Indemnified Parties and their successors, transferees and assigns. Neither of the
Performance Guarantors may assign or transfer any of its obligations hereunder without the prior written consent of each of the Group Agents and any attempted assignment shall be null and void. 
 Section 15. Amendments and Waivers. No amendment or waiver of any provision of this Guaranty nor consent to any departure by either of the
Performance Guarantors therefrom shall be effective unless the same shall be in writing and signed by the Agent and the Performance Guarantors. No failure on the part of the Agent or any other Indemnified Party to exercise, and no delay in
exercising, any right hereunder shall operate as a waiver thereof; nor shall any single or partial exercise of any right hereunder preclude any other or further exercise thereof or the exercise of any other right. 
 Section 16. Notices. All notices and other communications called for hereunder shall be made in writing and, unless otherwise specifically
provided herein, shall be deemed to have been duly made or given when delivered by hand or mailed first class, postage prepaid, or, in the case of telegraphic, telecopied or telexed notice, when transmitted, answer back received, addressed as
follows: if to the Performance Guarantors, at the address set forth beneath their respective signatures hereto, and if to the Agent, the Group Agents or any Purchaser at its address specified in the Repurchase Agreement or the Letter Agreement, as
applicable, or at such other address as either party may designate in writing to the other. 
 Section 17. GOVERNING LAW; CONSENT TO
JURISDICTION; WAIVER OF JURY TRIAL 
 (a) THIS GUARANTY SHALL BE GOVERNED BY AND CONSTRUED IN ACCORDANCE WITH THE LAWS OF THE STATE OF
NEW YORK. EACH PERFORMANCE GUARANTOR HEREBY SUBMITS TO THE NONEXCLUSIVE JURISDICTION OF THE UNITED STATES DISTRICT COURT FOR THE SOUTHERN DISTRICT OF NEW YORK AND OF ANY NEW YORK STATE COURT SITTING IN THE CITY OF NEW YORK FOR PURPOSES OF ALL LEGAL
PROCEEDINGS ARISING OUT OF OR RELATING TO THIS GUARANTY OR THE TRANSACTIONS CONTEMPLATED HEREBY. EACH PERFORMANCE GUARANTOR HEREBY IRREVOCABLY WAIVES, TO THE FULLEST EXTENT IT MAY EFFECTIVELY DO SO, ANY OBJECTION WHICH IT MAY NOW OR HEREAFTER HAVE
TO THE LAYING OF THE VENUE OF ANY SUCH PROCEEDING BROUGHT IN SUCH A COURT AND ANY CLAIM THAT ANY SUCH PROCEEDING BROUGHT IN SUCH A COURT HAS BEEN BROUGHT IN AN INCONVENIENT FORUM. NOTHING IN THIS SECTION 17 SHALL AFFECT THE RIGHT OF AGENT TO BRING
ANY ACTION OR PROCEEDING AGAINST ANY PERFORMANCE GUARANTOR OR ITS PROPERTY IN THE COURTS OF OTHER JURISDICTIONS. EACH PARTY HERETO CONSENTS TO THE SERVICE OF ANY AND ALL PROCESS IN ANY SUCH ACTION OR PROCEEDING BY THE MAILING OF COPIES OF
SUCH PROCESS TO IT AT ITS ADDRESS FOR NOTICES HEREUNDER SPECIFIED IN SECTION 16. 
  

 9 

 (b) EACH OF THE PARTIES HERETO HEREBY WAIVES ANY RIGHT TO HAVE A JURY PARTICIPATE IN RESOLVING ANY
DISPUTE, WHETHER SOUNDING IN CONTRACT, TORT OR OTHERWISE AMONG ANY OF THEM ARISING OUT OF, CONNECTED WITH, RELATING TO OR INCIDENTAL TO THE RELATIONSHIP BETWEEN THEM IN CONNECTION WITH THIS GUARANTY OR THE OTHER TRANSACTION DOCUMENTS.

 Section 18. Miscellaneous. This Guaranty constitutes the entire agreement of the Performance Guarantors with respect to the
matters set forth herein. The rights and remedies herein provided are cumulative and not exclusive of any remedies provided by law or any other agreement, and this Guaranty shall be in addition to any other guaranty of or collateral security for any
of the Obligations. The provisions of this Guaranty are severable, and in any action or proceeding involving any state corporate law, or any state or federal bankruptcy, insolvency, reorganization or other law affecting the rights of creditors
generally, if the obligations of either of the Performance Guarantors hereunder would otherwise be held or determined to be avoidable, invalid or unenforceable on account of the amount of such Performance Guarantor’s liability under this
Guaranty, then, notwithstanding any other provision of this Guaranty to the contrary, the amount of such liability shall, without any further action by such Performance Guarantor, the Agent, any Group Agent, any Purchaser or any Indemnified Party,
be automatically limited and reduced to the highest amount that is valid and enforceable as determined in such action or proceeding. The invalidity or unenforceabihty of any one or more sections of this Guaranty shall not affect the validity or
enforceability of its remaining provisions. Captions are for the ease of reference only and shall not affect the meaning of the relevant provisions. The meanings of all defined terms used in this Guaranty shall be equally applicable to the singular
and plural forms of the terms defined. 
 [Signatures Follow] 
  

 10 

 IN WITNESS WHEREOF, the Performance Guarantors have caused this Guaranty to be executed and delivered as
of the date first above written. 
  

			
	AMERICAN HOME MORTGAGE HOLDINGS,
INC.
		
	By: 	 	 /s/ Alan B. Horn

	Name:	 	Alan B. Horn
	Title:	 	Executive Vice President General Counsel & Secretary
	Address:	 	 538 Broadhollow Road
 Melville, New York
11747

	
	AMERICAN HOME MORTGAGE INVESTMENT CORP.
		
	By:	 	 /s/ Alan B. Horn

	Name:	 	Alan B. Horn
	Title:	 	Executive Vice President General Counsel & Secretary
	Address:	 	 538 Broadhollow Road
 Melville, New York
11747

 Signature Page 
 to 
 Performance Guaranty 

 Agreed to: 
  

			
	ABN AMRO BANK N.V. in its capacity as
Agent, as Buyer
		
	By:	 	 /s/ Kevin J. Hayes

	Name:	 	Kevin J. Hayes
	Title:	 	Director
		
	By:	 	 /s/ Therese Gremley

	Name:	 	Therese Gremley
	Title:	 	Vice President

 Signature Page 
 to 
 Performance GuarantyCustodial Agreement

 Exhibit 10.5 
 Execution Copy 
 CUSTODIAL AGREEMENT 
 By and Among: 
 AMERICAN HOME MORTGAGE ACCEPTANCE, INC., 
 as a Seller, 
 AMERICAN HOME MORTGAGE
CORP., 
 as a Seller, 
 AMERICAN HOME MORTGAGE INVESTMENT CORP., 
 as a Seller, 
 AMERICAN HOME MORTGAGE SERVICING, INC., 
 as a Seller and as the Servicer,

 ABN AMRO BANK N.V., 
 as the
Agent, 
 and 
 DEUTSCHE BANK
NATIONAL TRUST COMPANY, 
 As the Custodian 
 Dated as of February 28, 2007 

 TABLE OF CONTENTS 
  

					
	 	  	 	  	Page
		
	 ARTICLE I GENERAL TERMS
	  	1
			
	 1.1.
	  	Certain Definitions.	  	1
		
	 ARTICLE II APPOINTMENT OF CUSTODIAN
	  	2
			
	 2.1.
	  	Appointment.	  	2
	 2.2.
	  	Custodial Fees.	  	2
		
	 ARTICLE III LOAN FILE PROCEDURES
	  	2
			
	 3.1.
	  	Delivery of the Loan File to the Custodian.	  	2
	 3.2.
	  	Power of Attorney.	  	5
	 3.3.
	  	Transfer and Shipping of Mortgage Loans.	  	6
	 3.4.
	  	Releases of Mortgage Loans for Servicing.	  	8
	 3.5.
	  	Wet Loans.	  	8
	 3.6.
	  	Delivery of Trust Receipt.	  	8
	 3.7.
	  	Mortgage Loans Reporting.	  	9
	 3.8.
	  	Further Obligations of the Custodian.	  	9
	 3.9.
	  	Segregation of the Loan File.	  	9
	 3.10.
	  	Delivery of Required Documents to the Agent.	  	10
		
	 ARTICLE IV THE CUSTODIAN
	  	10
			
	 4.1.
	  	Instructions to the Custodian.	  	10
	 4.2.
	  	Reliance by the Custodian; Responsibility of the Custodian.	  	10
	 4.3.
	  	Agents and Affiliates.	  	14
	 4.4.
	  	Successor Custodian.	  	14
	 4.5.
	  	Right of Inspection.	  	15
	 4.6.
	  	Accounting in Certain Circumstances.	  	15
		
	 ARTICLE V INDEMNIFICATION
	  	16
			
	 5.1.
	  	Indemnities by the Servicer	  	16
		
	 ARTICLE VI MISCELLANEOUS
	  	16
			
	 6.1.
	  	Notices.	  	16
	 6.2.
	  	Amendments, Etc.	  	16
	 6.3.
	  	Invalidity.	  	17
	 6.4.
	  	Survival of Agreements.	  	17
	 6.5.
	  	Termination.	  	17
	 6.6.
	  	Cumulative Rights.	  	17
	 6.7.
	  	Successors and Assigns.	  	17

  

 i 

					
	 6.8.
	  	The Custodian Representations and Warranties.	  	17
	 6.9.
	  	Sellers, Servicer and Agent Representations and Warranties.	  	18
	 6.10.
	  	Counterparts.	  	18
	 6.11.
	  	No Proceedings.	  	18
	 6.12.
	  	Electronic Counterparts.	  	18
	 6.13.
	  	Governing Law.	  	18
	 6.14.
	  	Waiver of Jury Trial.	  	19
	 6.15.
	  	References to Repurchase Documents	  	19

 SCHEDULES AND EXHIBITS 
  

			
	 Schedule I
	  	Loan File Review Functions
	 Schedule II
	  	Addresses and Notices
		
	 Exhibit A
	  	Definitions
	 Exhibit B
	  	Form of Shipping Request
	 Exhibit C-1
	  	Form of Bailee and Security Agreement Letter (Takeout Investor)
	 Exhibit C-2
	  	Form of Bailee and Security Agreement Letter (Takeout Lender)
	 Exhibit D
	  	Form of Servicer Trust Receipt and Security Agreement
	 Exhibit E
	  	Form of Custodian Daily Report
	 Exhibit F
	  	Form of Trust Receipt
	 Exhibit F-1
	  	Form of Wet Loan Trust Receipt
	 Exhibit G
	  	Form of Purchase Date Notice Schedule
	 Exhibit H
	  	[Reserved]
	 Exhibit I
	  	Authorized Representatives of the Sellers
	 Exhibit J
	  	Authorized Representatives of the Servicer
	 Exhibit K
	  	Authorized Representatives of the Agent
	 Exhibit L
	  	Authorized Representatives of the Custodian

  

 ii 

 CUSTODIAL AGREEMENT 
 Dated as of February 28, 2007 
 THIS CUSTODIAL AGREEMENT (as amended, restated, supplemented or
otherwise modified from time to time, this “Agreement”), among AMERICAN HOME MORTGAGE ACCEPTANCE, INC. a Maryland corporation (“AHMA”), AMERICAN HOME MORTGAGE CORP., a New York corporation
(“AHMC”), AMERICAN HOME MORTGAGE INVESTMENT CORP., a Maryland corporation (“AHMIC”) and AMERICAN HOME MORTGAGE SERVICING, INC., a Maryland corporation (“AHMS” and together with AHMA,
AHMC and AHMIC, the “Sellers” and each, a “Seller”), AHMS, in its capacity as the Servicer (the “Servicer”), ABN AMRO BANK N.V. (“ABN AMRO”), in its capacity as the
“Agent” for the “Purchasers” under and as defined in the Master Repurchase Agreement referred to below (the “Agent”), and DEUTSCHE BANK NATIONAL TRUST COMPANY, in its capacity as custodian hereunder (the
“Custodian”). 
 WHEREAS, the Sellers have entered into (i) that certain Master Repurchase Agreement dated as of the
date hereof (as the same may be amended, restated, supplemented or otherwise modified from time to time, the “Repurchase Agreement”), among the Sellers and the Agent, as Buyer, and (ii) that certain Letter Agreement dated as of
the date hereof (as the same may be amended, restated, supplemented or otherwise modified from time to time, the “Letter Agreement” and together with the Repurchase Agreement, the “Repurchase Documents”), among the
Sellers, AHMS, in its capacity as Servicer, the entities party thereto as Conduit Purchasers (the “Conduit Purchasers”), the entities party thereto as Committed Purchasers (the “Committed Purchasers”; the Committed
Purchasers and the Conduit Purchasers, each a “Purchaser”), the entities party thereto as Group Agents (the “Group Agents”), and ABN AMRO, as the Agent, pursuant to which the Purchasers may purchase Mortgage Loans
from the Sellers from time to time; and 
 WHEREAS, the parties now desire to enter into this Agreement to provide for the holding and
monitoring of the Mortgage Loans and the Loan Files to be furnished pursuant to the Repurchase Agreement and the Letter Agreement; 
 NOW,
THEREFORE, the parties agree as follows: 
 ARTICLE I 
 GENERAL TERMS 
 1.1. Certain Definitions. 
 Unless otherwise defined herein, in the Repurchase Agreement or the Letter Agreement, terms are used herein as defined in Exhibit A hereto.

 ARTICLE II 
 APPOINTMENT OF CUSTODIAN 
  

	 	2.1.	Appointment. 

 (a) The Agent, on behalf of the
Purchasers, hereby appoints Deutsche Bank National Trust Company, as “Custodian” under this Agreement and authorizes the Custodian to take such action on the Agent’s behalf and to exercise such powers and perform such duties as
are hereby expressly delegated to the Custodian by the terms of this Agreement, together with such powers as are reasonably incidental thereto. 
 (b) The Custodian hereby accepts such appointment and agrees to hold, maintain, and administer for the exclusive benefit of the Agent and the Purchasers all Loan Documents at any time delivered to it by or on behalf of any Seller as herein
provided. The Custodian acknowledges and agrees that it is acting and will act with respect to the Loan Files for the exclusive benefit of the Agent and the Purchasers and shall not be subject with respect to the Loan Files in any manner or to any
extent to the direction or control of any Seller except as expressly permitted hereunder. The Custodian (or its designee) for the benefit of the Agent and the Purchasers, agrees to act in accordance with this Agreement and in accordance with any
written instructions of the Agent as provided in this Agreement. Under no circumstances shall the Custodian deliver possession of the Loan Files to any Seller except in accordance with the express terms of this Agreement or otherwise upon the
written instruction of the Agent as provided in this Agreement. 
  

	 	2.2.	Custodial Fees. 

 The Servicer agrees to pay such
fees and expenses (including reasonable attorneys’ fees and expenses) of the Custodian as shall be agreed to in writing between the Custodian and the Servicer. The obligation of the Servicer to pay the Custodian’s fees and expenses for its
services under this Agreement shall survive the termination of this Agreement and the earlier resignation or removal of the Custodian. 
 ARTICLE III 
 LOAN FILE PROCEDURES 
  

	 	3.1.	Delivery of the Loan Documents to the Custodian. 

 (a) Periodically, the Sellers may deliver Mortgage Loans and the related Loan Documents to the Custodian to hold as bailee for the Agent. For any Mortgage Loan delivered to the Custodian after the date hereof in connection with a financing
facility (other than the Repurchase Agreement) to which a Seller is a party, but which such Seller intends to subsequently finance under the Repurchase Agreement, such Seller shall: (1) clearly identify on the outside of the file containing the
Loan Documents that such mortgage Loan is a construction loan; (2) properly mark the Mortgage, as applicable, that such Mortgage Loan is a construction loan; and (3) provide an updated Purchase Date Notice Schedule identifying the Mortgage
Loans as construction loans. The Sellers may deliver from time to time such other documents as shall 

  

 2 

 
be specified in a notice by the Agent to the Custodian as documents that are required to be delivered to the Custodian pursuant to this Agreement in order to
meet the requirements of the Repurchase Documents or agreements required by the Repurchase Documents. Each delivery shall be made in association with the sale of a Mortgage Loan to the Agent, for the benefit of the Purchasers. In connection with the
sale, pledge or other transfer of each Mortgage Loan to the Agent, the applicable Seller shall deliver to the Custodian, via electronic transmission, the related Purchase Date Notice Schedule(s). 
 (b) In connection with each Mortgage Loan sold, pledged or otherwise transferred to the Agent, the applicable Seller shall deliver to the Custodian the
following items (collectively, the “Principal Mortgage Documents”): 
 (i) the original of each Mortgage
Note, endorsed in blank (without recourse) and all intervening endorsements thereto; 
 (ii) an original executed assignment
in blank for each Mortgage securing such Mortgage Loan, in recordable form, executed by the applicable Seller, in the case of each Mortgage Loan that is not a MERS Designated Mortgage Loan; 
 (iii) a certified copy of the executed Mortgage related to such Mortgage Note, certified by the Servicer, escrow agent, title company,
closing attorney or an Affiliate of the Servicer as a true and correct copy; and 
 (iv) the “Construction Loan
Agreement”, or comparable agreement identified as such by Seller, including all exhibits and addendums attached thereto (provided, however, that with respect to any such Mortgage Loans sold, pledged or otherwise transferred to the Agent on the
date hereof, the applicable Seller shall not be obligated to deliver such documents until the date that is five (5) Business Days following the date hereof). 
 (c) The Servicer shall hold in trust for the Agent for the benefit of the Purchasers, with respect to each Mortgage Loan and related Purchased Assets sold, pledged or otherwise transferred pursuant to the Repurchase
Agreement (the following being referred to, collectively, as the “Other Mortgage Documents”): 
 (i) the
original filed Mortgage relating to such Mortgage Loan; provided, however, that until an original Mortgage is received from the public official charged with its filing and recordation, a copy, certified by the closing agent to be a
true and correct copy of the filed and recorded original, may be used by the applicable Seller to satisfy this requirement; 
 (ii) other than with respect to a HUD repossessed property that is sold to a consumer, a mortgagee’s policy of title insurance (or binding unexpired commitment to issue such insurance if the policy has not yet been delivered to the
Servicer) insuring that the original mortgagee and its successors and assigns have a perfected, first-priority Lien created by the Mortgage securing such Mortgage Loan (subject to title exceptions that conform to the related Takeout Commitment,

  

 3 

 
if applicable) in a policy amount not less than the principal commitment amount of such Mortgage Loan and all endorsements thereof bringing down such policy
to the date of each Mortgagor Advance; 
 (iii) the original hazard insurance policy and other insurance policies referred to
in Paragraph 11(f) of the Letter Agreement which relate to such Mortgage Loan, appropriately indicating that all insurance proceeds will be paid to the original mortgagee and its successors and assigns, or other evidence of insurance
acceptable to the Agent; 
 (iv) the form of current appraisal of the Mortgaged Property described in the Mortgage, prepared
by a state licensed appraiser, that complies with all applicable Governmental Requirements, provided, however, that no appraisal shall be required for Mortgage Loans (x) financing HUD repossessed property that is sold to a
consumer, financed with an FHA loan, fully insurable and in accordance with FHA guidelines, but for which an appraisal is not required, or (y) representing so called “VA Rate Reduction” or FHA streamline refinances, insurable in
accordance with VA and FHA guidelines, but for which an appraisal is not required; 
 (v) the itemized project budget or other
comparable document; 
 (vi) the sources and uses of funds statement or other comparable document; 
 (vii) the plans and specifications or other comparable document; 
 (viii) all inspection sheets prepared by the applicable construction inspector; 
 (ix) all surveys of the Mortgaged Property; 
 (x) all lien waivers, certificates related to construction payments and other documents showing proof of construction bill payments; 
 (xi) all construction agreements, construction notes and other documents between the Mortgagor and the related contractor or builder; and

 (xii) all other documents necessary to underwrite, sell, enforce or service such Mortgage Loan. 
 Upon (3) three Business Days’ prior written notice by the Agent to the Custodian and the Servicer, the Servicer will deliver and the Custodian will receive
from the Servicer all Other Mortgage Documents, held in trust. The Custodian shall hold such items received as bailee for the Agent or such other party as may be designated in such notice, but shall not be obligated to review or verify the contents
of any file of Other Mortgage Documents. 
  

 4 

 (d) The Servicer shall provide the Custodian and the Agent with full access to all Other Mortgage
Documents held in trust for the Agent at all times upon reasonable prior notice. 
 (e) With respect to each Mortgage Loan subject to a
Transaction, the related Principal Mortgage Documents (other than with respect to Wet Loans), and the related Purchase Date Notice Schedule that are received by the Custodian by (i) 11:30 a.m. (eastern time) on a Business Day prior to a
Purchase Date for Newly Delivered Mortgage Loans and Pre-Closing Mortgage Loans and (ii) 10:00 a.m. (eastern time) two (2) Business Days prior to a Purchase Date for Previously Delivered Mortgage Loans, the Custodian shall include the
Mortgage Loans identified in such Purchase Date Notice Schedules on the Custodian Daily Report to be delivered electronically on such Purchase Date, even if the Custodian has not completed its review of the related Principal Mortgage Documents.
Mortgage Loans for which the Principal Mortgage Documents (other than with respect to Wet Loans) and the related Purchase Date Notice Schedules are received by the Custodian subsequent to the foregoing times shall be deemed received on the next
succeeding Business Day. The Custodian shall prepare by 12:00 noon (eastern time) on such Purchase Date, the Custodian Daily Report provided for in Section 3.7 hereof, and furnish it electronically to the Agent, the Group Agents (who are
identified to the Custodian in writing by the Agent) and the Sellers. The Custodian shall review the Principal Mortgage Documents for up to 250 Mortgage Loans delivered with any such Purchase Date Notice Schedule no later than the opening of
business of the Custodian on the Business Day following delivery of the Purchase Date Notice Schedule related to Previously Delivered Mortgage Loans and/or Newly Delivered Mortgage Loans. The Custodian shall have one (1) additional Business Day
to review each additional set of 250 Mortgage Loans in excess of the initial set of 250 Previously Delivered Mortgage Loans and/or Newly Delivered Mortgage Loans. The Custodian’s responsibility to review such Loan Files is limited to the review
steps described on Schedule I hereto. 
 (f) The Custodian shall, acting on behalf of the Agent for the benefit of the Purchasers, and
as agent and bailee of, and as custodian for, the Agent for the benefit of the Purchasers, retain possession and custody of the documents delivered to the Custodian pursuant hereto, which documents shall, subject to Section 4.2(k) and
Section 4.4, remain in the state of California for all purposes (including but not limited to the perfection of the security interest of the Agent, for the benefit of the Purchasers, in such collateral) until the Mortgage Loan related
thereto is released pursuant to Section 3.3 hereof or the termination of this Agreement. 
 (g) Notwithstanding the foregoing
provisions of this Section 3.1, the Servicer on behalf of the Agent may ship Other Mortgage Documents to Takeout Investors or Takeout Lenders under bailment for review prior to the pledge of a Mortgage Loan or the purchase of a Mortgage
Loan under a Takeout Commitment, in each case subject to and in accordance with the provisions of Section 3.3. 
  

	 	3.2.	Power of Attorney. 

 (a) Subject to subsection
(b) below, each Seller hereby irrevocably appoints the Agent, for the benefit of the Purchasers, as its attorney in fact, with full power of substitution, for and on behalf and in the name of each Seller, to: (i) endorse and deliver to any
Person any 

  

 5 

 
check, instrument or other paper coming into the Custodian’s, the Agent’s or any Purchaser’s possession and representing payment made in
respect of any Mortgage Note or Takeout Commitment or in respect of the Mortgage Loans or the Loan Documents; (ii) prepare, complete, execute, deliver and record any assignment to be delivered to the Custodian, the Agent or to any other Person
of any Mortgage relating to any Mortgage Note delivered hereunder; (iii) endorse and deliver any Mortgage Note and do every other thing necessary or desirable to effect transfer of all or any part of the Loan Documents to the Agent, for the
benefit of the Purchasers, or to any other Person; (iv) take all necessary and appropriate action with respect to all Loan Documents to be delivered to the Custodian or the Agent or held by any Seller or the Servicer in trust for the Agent for
the benefit of the Purchasers; (v) commence, prosecute, settle, discontinue, defend, or otherwise dispose of any claim relating to any Takeout Commitment, Mortgage Loan or any other part of the Loan Documents; and (vi) sign any
Seller’s name wherever appropriate to effect the performance of this Agreement. 
 (b) This Section 3.2 shall be liberally,
not restrictively, construed so as to give the greatest latitude to the Agent’s powers, as each Seller’s attorney-in-fact, to collect, sell, and deliver any of the Loan Documents and all other documents relating thereto. The powers and
authorities herein conferred on the Agent may be exercised by the Agent through any Person who, at the time of the execution of a particular instrument, is an authorized officer or agent of the Agent. The power of attorney conferred by this
Section 3.2 shall become effective upon the date hereof and is granted for a valuable consideration and is coupled with an interest and irrevocable so long as the Repurchase Documents shall remain in effect; provided, that the
Agent agrees that it shall not exercise such power of attorney until after the occurrence and during the continuance of an Event of Default. All Persons dealing with the Agent, any officer thereof, or any substitute attorney, acting pursuant hereto
shall be fully protected in treating the powers and authorities conferred by this Section 3.2 as existing and continuing in full force and effect until advised by the Agent that the Letter Agreement and the Repurchase Agreement have been
terminated. 
  

	 	3.3.	Transfer and Shipping of Mortgage Loans. 

 (a) So
long as no Incipient Event of Default or Event of Default is continuing and there is no Margin Deficit, any Seller or the Servicer (on behalf of the Sellers) may (and while an Incipient Event of Default or Event of Default is continuing, upon the
direction of the Agent, each Seller shall) from time to time submit a Shipping Request that would permit the repurchase by such Seller of Purchased Mortgage Loans from the respective Purchasers and a simultaneous sale or pledge of such Mortgage
Loans to, or the pooling of Mortgage Loans for, a Takeout Investor or Takeout Lender, or to another Person as directed in writing by the Agent. Upon the receipt by the Custodian of a Shipping Request from the Sellers identifying Mortgage Loans to be
delivered to a Takeout Investor or Takeout Lender, as applicable, and so long as either (x) the Custodian has not received written notice from the Agent of the existence of a Margin Deficit, an Incipient Event of Default or an Event of Default
or that such an event would be caused by the actions contemplated by this Section 3.3 (such a notice being referred to as a “Default Notice”) or, (y) the Custodian has received a Default Notice, but the Agent has either
approved the Shipping Request or revoked the Default Notice pursuant to the last sentence of this paragraph (a): 
  

 6 

 (i) The Custodian shall deliver to the Takeout Investor or the Takeout Lender (or such
other person), as applicable, or its designee identified to the Custodian in writing, under the Custodian’s “Bailee and Security Agreement Letter (Takeout Investor)” in the form of Exhibit C-1 hereto or “Bailee
and Security Agreement Letter (Takeout Lender)” substantially in the form of Exhibit C-2 hereto, as applicable, or such other form as may be mutually agreed upon by the Agent and the Custodian, the Loan Files related to the Mortgage
Loans to be sold or pledged which are held by the Custodian as bailee for the Agent pursuant to Section 3.1 hereof, with the release of the Agent’s ownership or security interest for the benefit of the Purchasers in such items being
conditioned upon the Custodian’s receipt of either (A) written notice from the Agent that the applicable Repurchase Price has been received for such Mortgage Loans, or (B) written consent of the Agent; 
 (ii) If required by a Takeout Investor or Takeout Lender, the Servicer shall, as agent for the Agent, deliver to such Takeout Investor or
Takeout Lender, or such Person’s designee, under a letter agreement or other arrangement approved by the Agent the items held by the Servicer pursuant to Section 3.1(c) that are related to the Mortgage Loans to be transferred on the
condition that such Takeout Investor or Takeout Lender or its designee shall hold or control such Other Mortgage Documents as bailee for the Agent for the benefit of the Purchasers until the Sellers have paid the full Repurchase Price (or such other
purchase price amount set forth in the written consent of the Agent) to the Purchasers for such Mortgage Loans in accordance with the Transaction Documents; and 
 (iii) With respect to each Shipping Request that is received by the Custodian by 10:30 a.m. (eastern time) on a Business Day, the
Custodian shall use due diligence and best efforts to review such Shipping Request and prepare the Loan Files related to the Mortgage Loans identified in each Shipping Request, for shipment prior to the close of business on the day the Shipping
Request is received by the Custodian, and, in any event shall review such Shipping Request and prepare the Loan Files related to the Mortgage Loans identified in such Shipping Request no later than 24 hours after such Shipping Request is received by
the Custodian; provided that the Custodian shall not be required to ship more than 500 Loan Files on any Business Day. 
 In the event that
the Agent has delivered a Default Notice to the Custodian and the Margin Deficit, Incipient Event of Default or Event of Default which gave rise to such notice, as applicable, has been cured or remedied by the Sellers and no other Margin Deficit,
Incipient Event of Default or Event of Default has occurred and is continuing at such time, then the Agent shall promptly deliver a notice to the Custodian indicating the Agent’s revocation of such Default Notice. 
 (b) Continuation of Lien. Unless released in writing by the Agent as herein provided, the security interest in favor of the Agent for the benefit
of the Purchasers, in the Mortgage Loans and in the Loan Files delivered to any Person pursuant to this Section 3.3 shall continue in effect until such time as the Agent shall have received payment in full of the amount described in
Section 3.3(a)(i). 
  

 7 

	 	3.4.	Releases of Mortgage Loans for Servicing. 

 The
Servicer may from time to time request in writing that the Custodian deliver items in the Loan File related to a Mortgage Loan so that (a) the Mortgage Note may be replaced by a corrected Mortgage Note, or (b) any servicing action may take
place with respect to such Mortgage Loan. Upon receipt by the Custodian of such a request from the Servicer, and so long as the Custodian has not received a Default Notice, the Custodian shall deliver to the Servicer, upon receipt of the
“Servicer Trust Receipt and Security Agreement Letter,” substantially in the form of Exhibit D, hereto, or such other form as may be approved by the Agent and the Custodian, the items in the Loan File to be corrected or
serviced, such delivery to be conditioned upon the receipt by the Custodian within fourteen (14) calendar days of either a corrected Mortgage Note, in the case of Mortgage Notes delivered for correction, or the items in the Loan File originally
delivered to the Servicer by the Custodian, in the case of a Mortgage Loan delivered for a servicing action; provided, that at no time shall Mortgage Loans having an aggregate original loan amount in excess of $6,000,000 be so delivered to
the Servicer pursuant to this Section 3.4 and remain unreturned by the Servicer at any one time. Notwithstanding the foregoing, in the event that a Mortgage Loan is released to the Servicer pursuant to this Section 3.4 in connection
with the conversion or modification of such Mortgage Loan from a construction loan to a permanent mortgage loan or a repayment of such Mortgage Loan and the Sellers have not paid the Repurchase Price with respect to such Mortgage Loan to the
Purchasers in accordance with the Transaction Documents, then the Sellers shall as soon as possible, but in no event later than 10 days after such release, deliver to the Custodian all of the Principal Mortgage Documents, and if required, all of the
related Other Mortgage Documents, with respect to such converted, modified or replacement permanent mortgage loan related to such Mortgage Loan. 
  

	 	3.5.	Wet Loans. 

 (a) Pursuant to the Repurchase
Documents, the Sellers may from time to time request that the Purchasers purchase certain Mortgage Loans prior to the delivery to the Custodian of the corresponding Principal Mortgage Documents (individually a “Wet Loan”;
collectively the “Wet Loans”). The Sellers and the Agent acknowledge that purchases in respect of Wet Loans are subject to various terms and conditions of the Repurchase Documents. 
 (b) Delivery of Principal Mortgage Documents. Within ten (10) days after the date that a Purchase Date Notice Schedule identifying one or
more Wet Loans which have been sold under the Repurchase Agreement is delivered to the Custodian, the applicable Seller shall deliver to the Custodian all of the Principal Mortgage Documents pertaining to such Wet Loans. 
  

	 	3.6.	Delivery of Trust Receipt. 

 Upon the request of the
applicable Seller, on or before 12:00 noon (New York City time) on each Purchase Date, the Custodian shall deliver to the Servicer, the applicable 

  

 8 

 
Seller and the Agent (i) the cumulative Trust Receipt in the form of Exhibit F covering all Mortgage Loans subject to this Agreement and held by
the Custodian (including the Mortgage Loans being purchased on such Purchase Date, but excluding all Wet Loans being purchased on such Purchase Date) and (ii) the cumulative Trust Receipt in the form of Exhibit F-1 covering all Wet Loans
subject to this Agreement and held by the Custodian (including the Wet Loans being purchased on such Purchase Date), both of which are fully completed and executed by the Custodian. 
  

	 	3.7.	Mortgage Loans Reporting. 

 (a) At the commencement
of each Business Day, and in no event later than 12:00 noon (eastern time), the Custodian shall furnish to the Sellers, the Servicer, each Group Agent identified pursuant to Section 3.1(e) and the Agent electronically a duly completed
report in the form of Exhibit E hereto, (the “Custodian Daily Report”) specifying and certifying the information provided for therein and as set forth on Schedule I hereto, noting, except for any Wet Loans and other Mortgage
Loans with respect to which the Custodian has not completed its review of the Principal Mortgage Documents, any applicable Exceptions to Schedule I thereto. 
 (b) The Custodian may assume the accuracy of all information supplied by any Seller to the Custodian with respect to any Mortgage Loan, or related electronic transmission, received by the Custodian, including but not
limited to the Purchase Date Notice, the applicable Seller’s commitment related to any Mortgage Loan, the unpaid principal balance of any Mortgage Loan as of the Purchase Date and whether a Mortgage Loan is an OTC Loan or a TTC Loan.

 (c) The Custodian may assume the accuracy of the information supplied by any Seller to the Custodian, whether written or in any other form
acceptable to the Custodian, with respect to a determination as to whether amounts remitted to the Group Agents represent the Repurchase Price paid for a specific Mortgage Loan. 
  

	 	3.8.	Further Obligations of the Custodian. 

 The
Custodian shall promptly notify the Agent if the Custodian receives written notice (i) that any Lien (other than for the Agent for the benefit of the Purchasers) has been placed, or attempted to be placed, on any Mortgage Loan or that the
Agent’s ownership interest shall have been challenged or (ii) that any Takeout Investor or Takeout Lender has rejected any items of the Loan File that is related to a Mortgage Loan that has been delivered to the Custodian. 
  

	 	3.9.	Segregation of the Loan File. 

 The Custodian shall
keep and maintain the Mortgage Loans and the Loan Files on its documents, books and records separate and apart from its other property and from any property securing any liabilities of any Seller to any other Person. Without limitation of the
foregoing, the Custodian shall keep and maintain the Mortgage Loans and the Loan Files on its documents, books and records separate and apart from any collateral provided by any Seller in favor of any other person purchasing mortgage loans from or
providing financing to such Seller. This provision does not require physical separation of the Principal Mortgage Documents or Other Mortgage Documents from collateral held for other loans, but each Mortgage Loan must be maintained in a separate
file folder from the documents related to any other mortgage loan. 
  

 9 

	 	3.10.	Delivery of Required Documents to the Agent. 

 Upon
written request of the Agent, after the occurrence and during the continuance of an Event of Default under the Repurchase Documents of which a Responsible Officer of the Custodian has received written notice, the Custodian shall deliver within five
(5) days to the Agent or its designee any or all documents and other items of the Loan File which are then in the possession or control of the Custodian. The Agent shall provide the Sellers with a copy of any such notice delivered to the
Custodian. All special handling and delivery costs shall be paid by the Sellers. 
 ARTICLE IV 
 THE CUSTODIAN 
  

	 	4.1.	Instructions to the Custodian. 

 As to any matter
not expressly provided for by this Agreement, the Custodian shall not be required to exercise any discretion or take any action, but shall be required to act or to refrain from acting (and shall be fully protected in so acting or refraining from
acting) upon the instructions of the Agent acting on behalf of the Purchasers; provided, however, that the Custodian shall not be required to take any action which may expose the Custodian to any liability that the Custodian determines
to be unreasonable in light of the circumstances or that is contrary to this Agreement or any Governmental Requirement. 
  

	 	4.2.	Reliance by the Custodian; Responsibility of the Custodian. 

 (a) The Custodian shall perform its duties hereunder in accordance with the standards followed by the Custodian in dealing with similar property for its own account. Notwithstanding anything to the contrary in this Agreement or any other
Transaction Document, neither the Custodian nor any of its respective directors, officers, agents, representatives, employees, attorneys-in-fact or Affiliates shall be liable for any action taken or omitted to be taken by it or them (in their
capacity as or on behalf of the Custodian) under or in connection with this Agreement or the other Transaction Documents, except for its or their own negligence or willful misconduct, for which the Custodian shall be liable (provided, however, that
the foregoing shall not prevent or otherwise limit the right of the Sellers, the Agent or the Purchasers to bring a breach of contract action against the Custodian). In no event shall the Custodian, its directors, officers, agents or employees be
liable, directly or indirectly, for any special, indirect, punitive or consequential damages. 
 (b) All Loan Files at any time delivered to
the Custodian hereunder shall be held by the Custodian in a fire resistant vault, drawer or other suitable depositary maintained and controlled solely by the Custodian, conspicuously marked to show the interest therein of the Custodian as bailee for
the Agent on behalf of the Purchasers and not commingled with any other assets or property of, or held by the Custodian for any person. The Custodian shall have responsibility only for documents which have been actually delivered to the Custodian in

  

 10 

 
connection herewith and which have not been released to the Agent, the Sellers, the Servicer, a Takeout Investor, a Takeout Lender, a transferee or their
respective agent or designee in accordance with this Agreement. In the event that a Mortgage Note has been delivered to the Custodian and, subsequently, the Custodian cannot locate such Mortgage Note, then the Custodian shall prepare and execute a
lost note affidavit with appropriate indemnification of the Purchasers and the applicable Seller, and shall deliver such lost note affidavit to the party that otherwise would have been entitled to delivery of the related Mortgage Note in accordance
with this Agreement at the time such Mortgage Note would have been delivered. 
 (c) Under no circumstances shall the Custodian be obligated
to verify the authenticity of any signature on any of the documents received or examined by it in connection with this Agreement or the authority or capacity of any person to execute or issue any such document nor shall the Custodian be responsible
for the value, form, substance, validity, perfection (other than by taking and continuing possession of the Loan Files), priority, effectiveness or enforceability of any of such documents nor shall the Custodian be under a duty to inspect, review or
examine the documents to determine whether they are appropriate for the represented purpose or that they have been actually recorded or that they are other than what they purport to be on their face. 
 (d) The Custodian may accept but shall not be responsible for examining, determining the meaning or effect of, or notifying or advising any Seller or the
Agent in any way concerning, any item or document in any file regarding a Mortgage Loan that is not one of the items or documents listed in Section 3.1(b). Each Seller shall be solely responsible for providing to the Custodian each and
every document listed in Section 3.1(b) and for completing or correcting any omission, or incomplete or inconsistent document. 
 (e) The Custodian shall (i) except for Wet Loans for which it has not yet received the Principal Mortgage Documents, hold all Principal Mortgage Documents relating to each Mortgage Loan exclusively for the Agent for the benefit of the
Purchasers under the terms of this Agreement (i.e., is not held by the Custodian for the benefit of any other Person), and (ii) in the case of Wet Loans, monitor and report in each Custodian Daily Report the amount of such Wet Loans and
identify the Wet Loans for which the related Principal Mortgage Documents have not been delivered to the Custodian. Except as otherwise expressly provided in this Agreement, the Custodian shall have no duty to investigate or conduct any due
diligence with respect to such information. 
 (f) In order to comply with laws, rules and regulations applicable to banking institutions,
including those relating to the funding of terrorist activities and money laundering, the Custodian is required to obtain, verify and record certain information relating to individuals and entities which maintain a business relationship with the
Custodian. Accordingly, each of the parties agrees to provide to the Custodian upon its request from time to time such party’s complete name, address, tax identification number and such other identifying information together with copies of such
party’s constituting documentation, securities disclosure documentation and such other identifying documentation as may be available for such party. 
  

 11 

 (g) The Custodian is an agent and bailee only and is not intended to be, nor shall it be construed to be
a trustee or fiduciary under this Agreement of or for any of the Sellers or the Agent. 
 (h) The Custodian shall retain possession and
custody of the Principal Mortgage Documents received from the Sellers and pertaining to each Mortgage Loan as agent and bailee of, and as custodian for, the Agent for all purposes until the Mortgage Loan is released pursuant to
Section 3.3 or 3.4 hereof or otherwise released by the Agent in a written notice to the Custodian in the event of a repurchase or substitution of such Mortgage Loan pursuant to the Repurchase Agreement. 
 (i) Without limitation of the generality of the foregoing, the Custodian: (i) may consult with legal counsel (including counsel for the Sellers),
independent public accountants and other experts selected by the Custodian or the Sellers and shall not be liable for any action taken or omitted to be taken in good faith by it in accordance with the advice of such counsel, accountants or experts;
(ii) except as provided in this Agreement, makes no warranty or representation to the Agent or the Purchasers and shall not be responsible to the Agent or the Purchasers for any statements, warranties or representations made in or in connection
with this Agreement or the other Transaction Documents; (iii) except as provided in Sections 3.1(e), 3.7, 3.8 and this Section 4.2, shall not have any duty to ascertain or to inquire as to the performance or
observance of any of the terms, covenants or conditions of this Agreement on the part of the Sellers or to inspect the property (including the books and records) of the Sellers; (iv) shall not be responsible to the Agent or the Purchasers for
the due execution, legality, validity, suitability, collectability, or enforceability of this Agreement or any other instrument or document furnished pursuant hereto as it relates to any party other than the Custodian, or for the genuineness,
effectiveness, sufficiency, value, perfection or priority of any Mortgage Loan and the related Loan File; (v) shall incur no liability under or in respect of this Agreement by acting upon any notice, consent, certificate or other instrument or
writing (which may be by facsimile or electronic transmission) believed in good faith by the Custodian, to be genuine and signed or sent by the proper Person; (vi) shall be entitled to rely on the terms of this Agreement and shall be under no
obligation to review the terms of the other Transaction Documents, and in the event of any conflict between this Agreement and the Transaction Documents, the terms of this Agreement shall control with respect to the rights and obligations of the
Custodian; and (vii) in the event of any amendment, revision, restatement, waiver or other change to the Transaction Documents which could have the effect of increasing the level of effort or changing the scope of work of the Custodian under
this Agreement and which was not consented to in writing by the Custodian, shall not be given effect so as to modify in quantity or otherwise the obligations of the Custodian under this Agreement; (as an example only of the foregoing, and to avoid
doubt in interpretation of this subsection (vii), an increase in the aggregate commitments of the Purchasers of the Letter Agreement shall not, unless the Custodian receives two weeks’ advance written notice of any such amendment, revision,
restatement, waiver or other change to the Transaction Documents, require the Custodian to review Mortgage Loans that would relate to such increased commitment). 
 (j) The Custodian may execute any of its duties under this Agreement by or through agents, attorneys, custodians, nominees or attorneys-in-fact (which agents, attorneys, custodians, nominees or attorneys-in-fact shall
be accorded the same rights and obligations 

  

 12 

 
applicable to the Custodian) and shall be entitled to rely on advice of counsel concerning all matters pertaining to such duties. The Custodian shall not be
responsible for the actions or non-actions of any agent, attorneys, custodians, nominees or attorneys-in-fact selected by it with due care; provided, however, such appointment shall not relieve the Custodian from performance of its
duties hereunder and, provided, that nothing contained herein shall affect in any manner or any extent the rights of the Sellers or the Agent against such agents or attorneys-in-fact. 
 (k) Any entity into which the Custodian may be merged or converted or with which may be consolidated, or any entity resulting from any merger, conversion
or consolidation to which the Custodian shall be a party, or any entity succeeding to the business of the Custodian, shall be the successor of the Custodian hereunder, without the execution or filing of any paper or any further act on the part of
any of the parties hereto, anything herein to the contrary notwithstanding. 
 (l) Other than for any liability pursuant to Sections 4.2(a)
or (b), none of the provisions of this Agreement shall require the Custodian to expend or risk its own funds or otherwise to incur any liability, financial or otherwise, in the performance of any of its duties hereunder, or in the exercise of any of
its rights or powers if it shall have reasonable grounds for believing that repayment of such funds or indemnity satisfaction to it against such risk or liability is not assured to it. 
 (m) The Custodian may conclusively rely and shall be fully protected in acting or refraining from acting upon any resolution, certificate, statement,
instrument, opinion, report, notice, request, consent, order, approval or other paper or document believed by it to be genuine and to have been signed or presented to the proper party or parties. 
 (n) Custodian is not responsible for preparing or filing any reports or returns relating to federal, state or local income taxes with respect to this
Agreement, other than for Custodian’s compensation or for reimbursement of expenses. 
 (o) The Custodian shall have no duties or
responsibilities except those that are specifically set forth herein, shall not be liable except for the performance of such duties and obligations and no implied covenants or obligations shall be read into this Agreement against the Custodian.

 (p) Each individual designated as an authorized representative of each Seller, the Servicer, the Agent (each, an “Authorized
Representative”) or a Responsible Officer of the Custodian, is authorized to give and receive notices, requests and instructions and to deliver certificates and documents in connection with this Agreement on behalf of such Seller, the
Servicer, the Agent, and the Custodian, respectively, and the specimen signature for each such Authorized Representative or Responsible Officer, as applicable, initially authorized hereunder is set forth on Exhibit I, J, K, and
L, respectively. From time to time, the Custodian, the Sellers, the Servicer and the Agent may, by delivering to the others a revised exhibit, change the information previously given pursuant to this provision, but each of the parties hereto
shall be entitled to rely conclusively on the then current exhibit until receipt of a superseding exhibit. 
  

 13 

 (q) In the absence of the designation of method of shipment and shipper(s) in a Shipping Request, the
Custodian is authorized to use a nationally recognized courier. 
  

	 	4.3.	Agents and Affiliates. 

 The Custodian and its
respective Affiliates may accept deposits from, lend money to, act as trustee under indentures of, and generally engage in any kind of business with, the Sellers, any of the Sellers’ Affiliates and any Person who may do business with or own
securities of the Sellers or any such Affiliate, all as if the Custodian were not the Custodian and without any duty to account therefor to the Agent or the Purchasers. 
  

	 	4.4.	Successor Custodian. 

 The Custodian may resign at
any time by giving not less than, sixty (60) days’ advance written notice thereof to the Sellers and the Agent. The Custodian may be removed at any time with cause, and upon thirty (30) days written notice without cause, by the Agent
on behalf of the Purchasers; provided, that the Agent shall pay as soon as reasonably practical after demand therefor all costs and expenses incurred by the Custodian or the Sellers in connection with the removal of the Custodian by the Agent
without cause. Upon request of the Sellers, so long as no Event of Default or Incipient Event of Default exists, the Custodian shall be removed by the Agent, provided that any removal by the Sellers without cause shall be preceded by thirty
(30) days’ written notice to the Custodian and the Sellers shall pay immediately upon demand all costs and expenses incurred by any Purchaser, the Agent or the Custodian in connection therewith. Upon any such resignation or removal, the
Agent, at the direction of the Required Group Agents, shall have the right to appoint a successor Custodian. Any successor Custodian appointed by the Agent, provided that no Event of Default or Incipient Event of Default exists, shall be
satisfactory to the Sellers at the time of appointment. In the case of a retirement or resignation, if no successor Custodian shall have been so appointed by the Agent (and approved by the Sellers, if applicable), and shall have accepted such
appointment, within 60 days after the retiring Custodian’s giving of notice of resignation, then the retiring Custodian shall deliver all Loan Files in its possession to the Agent and the Custodian shall be discharged from its duties and
obligations under this Agreement. After a notice of retirement or resignation has been given by the Custodian and until a successor Custodian shall have been appointed, the Agent shall pay all reasonable fees and out of pocket expenses owed to the
Custodian by the Servicer pursuant to any written agreement between the Custodian and the Servicer, provided, however, that the Sellers shall reimburse the Agent for all such payments. No such resignation or removal shall be effective
until the earlier of (1) the date on which a successor Custodian shall have been appointed, and accepted such appointment, in accordance with this Section 4.4 or (2) the day upon which a period of 60 days has passed after
notice of such resignation or removal. Upon the acceptance of any appointment of the Custodian hereunder by a successor Custodian, such successor Custodian shall thereupon succeed to and become vested with all the rights, powers, privileges and
duties of the retiring Custodian, and the retiring Custodian shall be discharged from its duties and obligations under this Agreement. The retiring or removed Custodian shall take all steps reasonably necessary to provide for an orderly transfer of
the Loan Files and all related documentation to the successor Custodian at the Servicer’s expense (except in the case of removal of the Custodian by the Agent without cause, which shall be at the Agent’s expense). After any retiring
Custodian’s resignation or removal hereunder as the Custodian, the provisions of this Article IV shall inure to its benefit as to any actions taken or omitted to be taken by it while it was a Custodian under this Agreement. 

 

 14 

	 	4.5.	Right of Inspection. 

 The Custodian shall permit
any officer, employee or agent of the Sellers, the Servicer or the Agent that may so request to visit and inspect the premises on which the custodial duties of the Custodian hereunder are performed, examine the books and records of the Custodian
which pertain to such custodial duties, take copies and extracts therefrom, and discuss the performance of such custodial duties with the officers of the Custodian that are responsible therefor, at such time, after reasonable prior written notice
(which shall be at least two (2) Business Days) to the Custodian, as may be mutually acceptable to the Custodian and such Sellers, Servicer or Agent during the Custodian’s normal business hours. 
  

	 	4.6.	Accounting in Certain Circumstances. 

 Subject to
the provisions of Section 4.2 hereof, in the event that the Custodian, acting in its capacity as custodian for the Agent, shall receive any money in respect of any Mortgage Loan, whether pursuant to Section 3.3 hereof or
otherwise, the Custodian shall provide a statement to the Agent and the Sellers by the end of the Business Day following receipt thereof, which specifies the amount received and shall promptly (but in no event later than the next Business Day)
deposit such amounts into the Buyer’s Account and prior to such deposit to be held for the benefit of the Agent; provided, however, that all expenses of the Custodian reasonably allocable to such statement shall be added to the
expenses of the Custodian reimbursed by the Servicer. All such funds received after 4:00 p.m. (eastern time) shall be considered to have been received on the following Business Day. All such funds received shall be held uninvested (and the Custodian
shall not be liable for interest thereon), unless written instructions are given to the Custodian by the Servicer, and in such case, funds shall be invested in Eligible Investments specified by the Servicer in such instructions; provided, however,
that if the Servicer directs that funds be invested in Eligible Investments, the Servicer shall be required to ensure that all investments must mature on each Settlement Date (as defined in the Letter Agreement). The Servicer agrees that it shall
not give any instruction to invest unless such investment is permitted by the Transaction Documents. The Custodian shall provide such other information in such detail and at such time or times as the Sellers or the Agent may reasonably request. The
Custodian and its affiliates are permitted to receive additional compensation that could be deemed to be in the Custodian’s economic self-interest for (i) serving as investment advisor, administrator, shareholder, servicing agent,
custodian or sub-custodian with respect to certain Eligible Investments, (ii) using affiliates to effect transactions in certain Eligible Investments and (iii) effecting transactions in certain Eligible Investments. Such compensation shall
not be an amount that is reimbursable or payable pursuant to this Agreement. 
  

 15 

 ARTICLE V 
 INDEMNIFICATION 
 5.1. Indemnities by the Servicer. Without limiting any other rights that any such
Person may have hereunder or under applicable law, the Servicer hereby agrees to indemnify the Custodian, its successors, transferees, participants and assigns and all affiliates, officers, directors, shareholders, controlling persons, employees and
agents of any of the foregoing (each an “Indemnified Party”), forthwith on demand, from and against any and all actual damages, losses, claims, liabilities and related costs and expenses, including attorneys’ fees, expenses and
disbursements (all of the foregoing being collectively referred to as “Indemnified Amounts”) awarded against or incurred by any of them arising out of or relating to this Agreement, any other Transaction Document, or the exercise or
performance of any of its or their powers or duties hereunder, or in respect of any Mortgage Loans or Takeout Commitment, or related in any way to their possession of, or dealings with, the Loan Files, excluding, however, Indemnified Amounts to the
extent resulting from negligence or willful misconduct on the part of any such Indemnified Party. This Section 5.1 shall survive the termination of this Agreement and the earlier resignation or removal of the Custodian. 
 ARTICLE VI 
 MISCELLANEOUS 

 

	 	6.1.	Notices. 

 Any notice, demand or request required or
permitted to be given under or in connection with this Agreement, or the other Transaction Documents (except as may otherwise be expressly required therein) shall be in writing and shall be mailed by first class or express mail, postage prepaid, or
sent by facsimile or other similar form of electronic transmission, or personally delivered to an officer of the receiving party. With the exception of certain administrative and collateral reports that may be directed to specific departments of the
Agent, all such communications shall be mailed, sent or delivered to the parties hereto at their respective addresses as set forth in Schedule II hereto, or at such other addresses or to such officer’s, individual’s or
department’s attention as any party may have furnished the other parties in writing. Any communication so addressed and mailed shall be deemed to be given when so mailed; and any notice so sent by electronic transmission shall be deemed to be
given when receipt of such transmission is acknowledged, and any communication so delivered in person shall be deemed to be given when receipted for by, or actually received by, an authorized officer of the Custodian, the Agent or the applicable
Seller, as the case may be. 
  

	 	6.2.	Amendments, Etc. 

 This Agreement may not be
amended, supplemented or modified without the written consent of the Sellers, the Servicer, the Custodian and the Agent. Any such waiver and any such amendment, supplement or modification shall be binding upon the Sellers, the Servicer, the
Custodian, the Agent and all the Purchasers. 
  

 16 

	 	6.3.	Invalidity. 

 In the event that any one or more of
the provisions contained in this Agreement or any other Transaction Document shall, for any reason, be held invalid, illegal or unenforceable in any respect, such invalidity, illegality or unenforceability shall not affect any other provision of
such document. 
  

	 	6.4.	Survival of Agreements. 

 All covenants and
agreements herein shall survive until the termination of the Repurchase Documents. 
  

	 	6.5.	Termination. 

 This Agreement shall terminate upon
the earliest of the written notice to the Custodian of the termination of the Repurchase Agreement, the Letter Agreement or as otherwise consented to in writing by the Agent, and provided that the Custodian has not received a notice that an Event of
Default has occurred, the Sellers and the Servicer. Any Loan Files in the possession of the Custodian at the time of termination shall be delivered as directed by the Agent. 
  

	 	6.6.	Cumulative Rights. 

 The rights, powers, privileges
and remedies of the Custodian and the Agent under this Agreement, and any other Transaction Document shall be cumulative, and the exercise or partial exercise of any such right, power, privilege or remedy shall not preclude the exercise of any other
right or remedy. The exercise of any right, power, privilege or remedy of the Custodian or the Agent under this Agreement or any Transaction Document, shall not exhaust any such right, power, privilege or remedy of the Custodian or the Agent.

  

	 	6.7.	Successors and Assigns. 

 This Agreement is binding
upon and inures to the parties to this Agreement and their respective successors and permitted assigns and shall remain in full force and effect until such time, after the Termination Date, as all obligations to be performed hereunder shall have
been performed. The Sellers’ and the Servicer’s obligations in respect of indemnification and payment provisions shall be continuing and shall survive any termination of this Agreement, subject to any applicable statute of limitations. The
Custodian may not assign its rights or obligations hereunder, except pursuant to Section 4.2(k) or 4.4, and any such attempted assignment shall be null and void. 
  

	 	6.8.	The Custodian Representations and Warranties. 

 The
Custodian represents and warrants that it: (a) is a national banking association; (b) is duly organized, validly existing and in good standing under the laws of the jurisdiction of its organization; (c) fully satisfies the
requirements for acting as a GNMA approved custodian, FNMA approved custodian and FHLMC approved custodian; (d) has the power and authority to transact the business in which it is engaged; and (e) has the power and requisite authority to
execute, deliver and perform this Agreement, and is duly authorized to, and has taken all action necessary to authorize it to, execute, deliver and perform this Agreement. 
  

 17 

	 	6.9.	Sellers, Servicer and Agent Representations and Warranties. 

 Each of the Sellers, the Servicer and the Agent represents and warrants as to itself that it: (a) is duly organized, validly existing and in good standing under the laws of the jurisdiction of its organization; (b) has the power
and authority to transact the business in which it is engaged; and (c) has the power and requisite authority to execute, deliver and perform this Agreement, and is duly authorized to, and has taken all action necessary to authorize it to,
execute, deliver and perform this Agreement. 
  

	 	6.10.	Counterparts. 

 This Agreement may be executed in
two or more counterparts, and it shall not be necessary that the signatures of each of the parties hereto be contained on any one counterpart hereof; each counterpart shall be deemed an original, but all counterparts together shall constitute one
and the same instrument. 
  

	 	6.11.	No Proceedings. 

 The Custodian hereby agrees that
so long as any Conduit Purchaser has any outstanding indebtedness for borrowed money and for one year and one day thereafter, it will not institute against any Conduit Purchaser, or join any other Person in instituting against any Conduit Purchaser,
any bankruptcy, reorganization, arrangement, insolvency or liquidation proceeding, or other proceeding under any federal or state bankruptcy or similar law; provided, however, the foregoing shall not prohibit the Custodian from filing
proofs of claim in such a proceeding instituted by another Person. This Section 6.11 shall survive the termination of this Agreement and the earlier resignation or removal of the Custodian. 
  

	 	6.12.	Electronic Counterparts. 

 Any form or report
contemplated by this Agreement may be furnished to the Custodian electronically and may be formatted in a manner convenient for electronic transmission so long as the required information is provided in an equally useable form to the format, if any,
provided in this Agreement. It being understood and agreed that the Custodian shall not be responsible to verify the identity of the sender of any electronic transmissions received by it. 
  

	 	6.13.	Governing Law. 

 THIS AGREEMENT SHALL
BE GOVERNED BY AND CONSTRUED IN ACCORDANCE WITH THE LAWS OF THE STATE OF NEW YORK. EACH OF THE PARTIES HERETO HEREBY SUBMITS TO THE NONEXCLUSIVE JURISDICTION OF THE UNITED STATES DISTRICT COURT FOR THE SOUTHERN DISTRICT OF NEW YORK AND OF ANY NEW
YORK STATE COURT SITTING IN THE CITY OF NEW YORK FOR PURPOSES OF ALL LEGAL PROCEEDINGS ARISING OUT OF OR RELATING TO THIS AGREEMENT OR THE TRANSACTIONS CONTEMPLATED HEREBY. EACH OF THE PARTIES HERETO HEREBY 

  

 18 

 
IRREVOCABLY WAIVES, TO THE FULLEST EXTENT IT MAY EFFECTIVELY DO SO, ANY OBJECTION WHICH IT MAY NOW OR HEREAFTER HAVE TO THE LAYING OF THE VENUE OF ANY
SUCH PROCEEDING BROUGHT IN SUCH A COURT AND ANY CLAIM THAT ANY SUCH PROCEEDING BROUGHT IN SUCH A COURT HAS BEEN BROUGHT IN AN INCONVENIENT FORUM. NOTHING IN THIS PARAGRAPH 6.13 SHALL AFFECT THE RIGHT OF BUYER TO BRING ANY ACTION OR PROCEEDING
AGAINST ANY SELLER, THE CUSTODIAN OR ANY OF THEIR PROPERTY IN THE COURTS OF OTHER JURISDICTIONS. EACH PARTY HERETO CONSENTS TO THE SERVICE OF ANY AND ALL PROCESS IN ANY SUCH ACTION OR PROCEEDING BY THE MAILING OF COPIES OF SUCH PROCESS TO IT AT ITS
ADDRESS FOR NOTICES HEREUNDER SPECIFIED IN SCHEDULE II HERETO. 
  

	 	6.14.	Waiver of Jury Trial. 

 EACH OF THE PARTIES
HERETO HEREBY WAIVES ANY RIGHT TO HAVE A JURY PARTICIPATE IN RESOLVING ANY DISPUTE, WHETHER SOUNDING IN CONTRACT, TORT OR OTHERWISE AMONG ANY OF THEM ARISING OUT OF, CONNECTED WITH, RELATING TO OR INCIDENTAL TO THE RELATIONSHIP BETWEEN THEM IN
CONNECTION WITH THIS AGREEMENT OR THE OTHER TRANSACTION DOCUMENTS. 
 6.15. References to Repurchase Documents.
Notwithstanding any references herein to the Repurchase Agreement and the Letter Agreement, as applicable, the parties hereto acknowledge that the Custodian is not a party to the Repurchase Agreement or the Letter Agreement and has no obligations or
rights thereunder and shall not be obligated to read the Repurchase Agreement or the Letter Agreement, know the terms and conditions contained therein or to be on notice of any of their provisions except to the extent of terms not otherwise defined
herein but incorporated herein by reference to the Repurchase Agreement and the Letter Agreement, as applicable. 
 * * * * * 
  

 19 

 IN WITNESS WHEREOF, the parties hereto have caused this agreement to be duly executed as of the date
first above written. 
  

			
	 AMERICAN HOME MORTGAGE
 ACCEPTANCE, INC., as a Seller

		
	By:	 	 /s/ Alan B. Horn

	Name:	 	Alan B. Horn
	Title:	 	 Executive Vice President
 General Counsel &
Secretary

	
	AMERICAN HOME MORTGAGE CORP., as a Seller
		
	By:	 	 /s/ Alan B. Horn

	Name:	 	Alan B. Horn
	Title:	 	 Executive Vice President
 General Counsel &
Secretary

	
	AMERICAN HOME MORTGAGE INVESTMENT CORP., as a Seller
		
	By:	 	 /s/ Alan B. Horn

	Name:	 	Alan B. Horn
	Title:	 	 Executive Vice President
 General Counsel &
Secretary

	
	AMERICAN HOME MORTGAGE SERVICING, INC., as a Seller and as Servicer
		
	By:	 	 /s/ Alan B. Horn

	Name:	 	Alan B. Horn
	Title:	 	 Executive Vice President
 General Counsel &
Secretary

 Signature Page to 
 Custodial Agreement 

			
	 ABN AMRO BANK N.V., as Agent

		
	By:	 	 /s/ Kevin J. Hayes

	Name:	 	Kevin J. Hayes
	Title:	 	Director
		
	By:	 	 /s/ Therese Gremley

	Name:	 	Therese Gremley
	Title:	 	Vice President

 Signature Page to 
 Custodial Agreement 

			
	DEUTSCHE BANK NATIONAL TRUST
COMPANY, as Custodian
		
	By:	 	 /s/ Norma L. Catone

	Name:	 	Norma L. Catone
	Title:	 	Vice President
		
	By:	 	 /s/ Angel Sanchez

	Name:	 	Angel Sanchez
	Title:	 	Authorized Signer

 Signature Page to 
 Custodial Agreement 

 SCHEDULE I 
 LOAN FILE REVIEW FUNCTIONS 
 1. Review Functions. In each Custodian Daily Report, the
Custodian shall certify, with respect to each Mortgage Loan listed in the schedule attached thereto, the following, noting any applicable Exceptions on the schedule thereto: 
 (a) all documents required to be delivered to it pursuant to Sections 3.1(b)(i) through 3.1(b)(iv) of this Agreement are in Custodian’s
possession. 
 (b) each assignment of a Mortgage Loan delivered by a Seller pursuant to Section 3.1(b) bears an original signature
of such Seller and appears to be duly completed (including all Schedules thereto). 
 (c) each Mortgage Note and Mortgage bears an original
signature or signatures which appear to be those of the person or persons named as the maker and Mortgagor (trustor) or, in the case of a certified copy of the Mortgage, such copy bears what appears to be a reproduction of such signature or
signatures. 
 (d) except for the endorsement in blank of the Mortgage Note by a Seller, and any intervening endorsements included in the file
delivered to the Custodian, neither the Mortgage Note nor the Mortgage contain any irregular writings and appear regular on their face. 
 (e)
based only on the Custodian’s examination of the documents listed in Sections 3.1(b)(i) through 3.1(b)(iii) of this Agreement, the information set forth with respect to each Mortgage Loan on the applicable Purchase Date
Notice Schedule accurately reflects the following (within the tolerances, if any, shown in parentheses): 
 (i) Mortgage Loan
number, 
 (ii) the note date, 
 (iii) the maturity date, 
 (iv) the original loan amount, 
 (v) the original interest rate, 
 (vi) the name of the borrower(s), and 
 (vii) the property address. 
 (f) if provided, each assignment of mortgage has been assigned as described in Section 3.1(b)(ii) of this Agreement, provided that the
Custodian shall have no obligation to confirm that the assignments are in recordable form. If intervening assignments are included in the file, each such intervening assignment bears the signature of the 

  

 Schedule I-1 

	 	 
mortgagee and/or the assignor (and any other subsequent assignors) that appears to be an original or, if photocopies, that such copies bear a reproduction of
such signature or signatures. 

 (g) the Mortgage Note is endorsed in blank and such endorsement bears an original signature
of the applicable Seller. 
 (h) no Mortgage Note has an original loan amount in excess of $3,000,000. 
 (i) no Mortgage Note or Mortgage bears evidence (on its face or reverse side) that it is subject to any Lien in favor of any Person other than the Agent,
for the benefit of the Purchasers. 
 (j) at least one of the riders or addendums delivered with the related Mortgage Note is a
“construction loan addendum” or “construction loan rider” to the such Mortgage Note. 
 (k) at least one of the riders or
addendums delivered with the Mortgage is a “construction loan addendum” or “construction loan rider” to such Mortgage or the Mortgage contains language to the effect that such loan is a construction loan. 
  

	 	2.	Review Function Limitations. 

  

	 	Notwithstanding	the foregoing: 

 (i) the Custodian shall have no obligation
to determine, certify or note as Exceptions the items described in paragraphs (j) or (k) above with respect to any Pre-Closing Mortgage Loan; 
 (ii) other than the items specified in paragraphs (j) and (k) above with respect to Previously Delivered Mortgage Loans and Newly Delivered Mortgage Loans, the Custodian shall have no obligation to determine
or certify that the documents described in Section 3.1(b)(i) through 3.1(b)(iv) contain all amendments, riders, addendums, modification agreements, extensions or renewals thereto; and 
 (iii) with respect to any Pre-Closing Mortgage Loan, the Custodian shall have no obligation to certify or note as an Exception the Custodian’s
possession of the document described in Section 3.1(b)(iv) until the date which is two (2) Business Days after the date on which the Custodian has received such document from the applicable Seller; provided such document is
delivered to the Custodian on or subsequent to the date hereof. 
  

 Schedule I-2 

 SCHEDULE II 
 ADDRESSES AND NOTICES 
 Sellers: 
 if to AHMA: 
 538 Broadhollow Road 
 Melville, New York, 11747 
 Attention:
General Counsel 
 Facsimile: (800) 209-7276 
 Telephone Confirmation: (516) 396-7703 
 if to AHM: 
 American Home Mortgage Corp. 
 538
Broadhollow Road 
 Melville, New York 11747 
 Attention: General Counsel 
 Facsimile: (800) 209-7276 
 Telephone Confirmation: (516) 396-7703 
 if to AHMIC: 
 American Home Mortgage Investment Corp. 
 538 Broadhollow Road 
 Melville, New York,
11747 
 Attention: General Counsel 
 Facsimile: (800) 209-7276 
 Telephone Confirmation: (516) 396-7703 
 if to AHMS: 
 American Home Mortgage
Servicing, Inc. 
 538 Broadhollow Road 
 Melville, New York, 11747 
 Attention: General Counsel 
 Facsimile: (800) 209-7276 
 Telephone
Confirmation: (516) 396-7703 
  

 Schedule II-1 

			
	Servicer:	  	American Home Mortgage Servicing, Inc.
		  	538 Broadhollow Road
		  	Melville, New York, 11747
		  	Attention: General Counsel
		  	Facsimile: (800) 209-7276
		  	Telephone Confirmation: (516) 396-7703
		
	Agent:	  	ABN AMRO Bank N.V.
		  	540 West Madison Street
		  	Chicago, Illinois 60661
		  	Attention: Therese Gremley
		  	Facsimile: (312) 992-1527
		  	Telephone Confirmation: (312) 904-6263
		
	Custodian:	  	DEUTSCHE BANK NATIONAL TRUST COMPANY
		  	1761 East St. Andrew Place
		  	Santa Ana, California 92705
		  	Telephone: (714) 247-6000
		  	Telecopy: (714) 656-2614
		  	Attention: Mortgage Custody - AH072C

  

 Schedule II-2 

 EXHIBIT A 
 DEFINITIONS 
 As used in this Agreement, the following terms have the following meanings: 

“Account Control Agreement” shall mean the Account Control Agreement dated as of the date hereof among the Sellers, the Servicer, the
Agent and the Bank. 
 “Additional Purchased Mortgage Loans” shall mean Mortgage Loans provided by Seller to Buyer pursuant
to Paragraph 4(a) of the Repurchase Agreement. 
 “Affiliate” shall mean, with respect to any Person, any other Person
directly or indirectly controlling, controlled by, or under common control with, such specified Person. For purposes of this definition, “control” when used with respect to any specified Person means the power to direct the management and
policies of such Person, directly or indirectly, whether through the ownership of voting securities, by contract, or otherwise; and the terms “controlling” and “controlled” have meanings correlative to the foregoing. 

“Agent” has the meaning as set forth in the preamble of this Agreement 
 “Agreement” has the meaning as set forth in the preamble of this Agreement. 
 “Authorized Representatives” is defined in Section 4.2(p). 
 “Bailee and Security Agreement Letter” is defined in Section 3.3(a)(i). 
 “Bank” shall mean Deutsche Bank National Trust Company, in its capacity as the bank which holds the Buyer’s Account. 
 “Business Day” shall mean any day other than (i) a Saturday or Sunday or (ii) any day on which banks in New York City,
Chicago, Illinois, or Los Angeles, California are authorized or obligated by law or executive order to be closed. 
 “Buyer’s
Account” shall mean that certain collection account number 57564 maintained in the name of the Buyer by the Bank for the deposit of cash pursuant to this Agreement and the Repurchase Documents. 
 “Corporate Trust Office” shall mean the principal office of the Custodian at which at any particular time its corporate trust business
shall be administered which office at the date of the execution of this Agreement is located at 1761 East St. Andrew Place, Santa Ana, California 92705, Attention: Mortgage Custody – AH072C or at any other time at such other address as the
Custodian may designate from time to time by written notice to the parties thereto. 
 “Custodian” has the meaning set forth
in the preamble of this Agreement. 
 “Custodian Daily Report” is defined in Section 3.7 of this Agreement.

  

 Exhibit A-1 

 “Default Notice” has the meaning set forth in Section 3.3(a) of this
Agreement. 
 “Eligible Investments” shall mean: 
 (a) direct obligations of, or guaranteed as to the full and timely payment of principal and interest by, the United States or obligations of any agency or
instrumentality thereof, if such obligations are backed by the full faith and credit of the United States; 
 (a) federal funds, certificates
of deposit, time deposits and bankers’ acceptances (which shall each have an original maturity of not more than 90 days and, in the case of bankers’ acceptances, shall in no event have an original maturity of more than 365 days) of any
United States depository institution or trust company organized under the laws of the United States or any state and subject to examination and supervision by federal or state financial institutions regulatory authorities; provided,
however, that the short-term obligations of such depository institution or trust company are rated “A-1+” by Standard & Poor’s, “P-1” by Moody’s and, if rated by Fitch, “F1+” by Fitch;

 (b) commercial paper (having original maturities of not more than 30 days) of any corporation incorporated under the laws of the United
States or any state thereof which on the date of the acquisition are rated “A-1+” by Standard & Poor’s, “P-1” by Moody’s and, if rated by Fitch, “F1+” by Fitch; 
 (c) securities of money market funds rated “Aam” or better by Standard & Poor’s, “Aa” or better by Moody’s and,
the highest such ratings category by Fitch (if rated by Fitch); and 
 (d) any other investment approved in writing by the Agent. 

provided, that in the case of each of the investments described above, such investment is a “securities entitlement” within the meaning of
Section 8-102(17) of the UCC. 
 Any such Eligible Investment may be purchased by or through the Agent or the Bank or any of their
affiliates. 
 “Exceptions” means exceptions to the specifications and certifications made by the Custodian on the Custodian
Daily Report as set forth on Schedule I hereto. 
 “Indemnified Amounts” is defined in Section 5.1.

 “Indemnified Party” is defined in Section 5.1. 
 “Letter Agreement” has the meaning as set forth in the preamble to this Agreement. 
 “Loan Documents” shall mean with respect to each Mortgage Loan, all of the Principal Mortgage Documents and all of the Other Mortgage
Documents with respect to such Mortgage Loan. 
  

 Exhibit A-2 

 “Loan File” shall mean, with respect to any Mortgage Loan, the Principal Mortgage
Documents and if applicable, the Other Mortgage Documents that have been delivered to the Custodian pursuant to this Agreement. 
 “Margin Deficit” shall have the meaning specified in Paragraph 4(a) of the Repurchase Agreement. 
 “MERS” shall mean Mortgage Electronic Registration Systems, Inc., a Delaware corporation. 
 “MERS
Designated Mortgage Loan” shall mean a Mortgage Loan registered to or by any Seller on the MERS electronic mortgage registration system. 
 “Mortgage” shall mean the mortgage, deed of trust or other instrument creating a lien on a fee simple estate in Mortgaged Property securing a Mortgage Note together with any amendments, riders, addendums, modification
agreements, extensions or renewals thereof and any new mortgage taken in exchange or substitution therefor in connection with a modification, conversion or refinancing of such mortgage or the related Mortgage Note. 
 “Mortgage Contract” shall mean a residential construction loan agreement, building loan agreement, loan agreement, construction loan
agreement or other financing agreement entered into by a Seller and a Mortgagor, evidencing the related Seller’s obligation to provide funding of such Mortgagor’s construction project and setting forth, among other things, the terms and
provisions related to the repayment of funds extended to the Mortgagor thereunder. 
 “Mortgage Loan” shall mean, at any
time, any fixed rate or floating rate mortgage loan which is secured by a Mortgage on real estate and which is made to a Mortgagor for the construction of a new single family detached residential property pursuant to the related Mortgage Contract,
including all amounts owed or to be owed by such Mortgagor with respect to all Mortgagor Advances advanced or to be advanced to such Mortgagor under such Mortgage Contract, and includes (i) such mortgage loan whether in the construction period
or in the permanent loan term and (ii) any mortgage loan secured by a Mortgage on such residential property made in exchange or substitution therefor and/or in connection with a modification, conversion or refinancing of such Mortgage Loan.

 “Mortgage Note” shall mean the original, executed promissory note or other evidence of indebtedness of a Mortgagor under
a Mortgage Loan, together with any rider, amendment, addendums, modification agreements, extension or renewal thereof and any original promissory note taken in exchange or substitution therefor and/or in connection with a modification, conversion or
refinancing of such Mortgage Loan from a construction loan to a permanent mortgage loan or otherwise. 
 “Mortgaged
Property” shall mean the underlying real property subject to a Mortgage (including, without limitation, all buildings, improvements and fixtures thereon and all additions, alterations and replacements made at any time with respect to the
foregoing) securing a Mortgage Loan. 
 “Mortgagor” shall mean the obligor on a Mortgage Note. 
  

 Exhibit A-3 

 “Mortgagor Advance” shall mean, with respect to any Mortgage Loan, a loan or advance
made to the Mortgagor under the related Mortgage Contract and evidenced by the related Mortgage Note. 
 “Newly Delivered Mortgage
Loan” shall mean a Mortgage Loan which is not a Previously Delivered Mortgage Loan or a Pre-Closing Mortgage Loan. 
 “OTC
Loan” shall mean a Mortgage Loan which the Sellers refer to as a “one-time-close loan”, in which the Mortgage Note and Mortgage related to such Mortgage Loan both include construction loan addendums or riders, as applicable, to
the permanent mortgage loan documentation. 
 “Other Mortgage Documents” is defined in Section 3.1(c).

 “Pre-Closing Mortgage Loan” shall mean a Mortgage Loan listed on Schedule III hereto for which the Custodian
possessed the related Principal Mortgage Documents related to such Mortgage Loan prior to the date hereof and the applicable Seller has received confirmation of the Custodian’s review (which review shall, in any event, include the steps
described in Schedule I hereto). 
 “Previously Delivered Mortgage Loan” shall mean a Mortgage Loan (other than a
Pre-Closing Mortgage Loan) for which the Custodian possessed the related Principal Mortgage Documents prior to the delivery of the Purchase Date Notice Schedule related to such Mortgage Loan and the applicable Seller has received confirmation of the
Custodian’s review (which review shall, in any event, include the steps described in Schedule I hereto). 
 “Principal
Mortgage Documents” is defined in Section 3.1(b). 
 “Purchase Date Notice Schedule” shall mean a
Schedule delivered by a Seller to the Custodian with respect to Mortgage Loans substantially in the form attached hereto as Exhibit G. 
 “Purchaser” shall have the meaning as set forth in the preamble hereto. 
 “Purchased Mortgage
Loans” shall mean, with respect to any Transaction, the Mortgage Loans sold by the applicable Sellers to Buyer in such Transaction hereunder, as adjusted to give effect to include Additional Purchased Mortgage Loans delivered pursuant to
Paragraph 4(a) of the Repurchase Agreement and any Purchased Mortgage Loans repurchased by such Sellers or transferred to such Sellers. Unless the context shall otherwise require, the term “Purchased Mortgage Loans” shall refer to all
Purchased Mortgage Loans under all Transactions. “Purchased Mortgage Loan” shall include (i) the entire Outstanding Principal Balance of each Mortgage Loan, regardless of whether Buyer has advanced against all Mortgagor Advances with
respect to such Mortgage Loan, and (ii) all rights (but not the obligations unless Buyer has exercised its rights under Section 11 to sell such Mortgage Loan after the occurrence of an Event of Default) to make future Mortgagor Advances
under the Mortgage Contract related to such Mortgage Loan. 
 “Repurchase Agreement” has the meaning as set forth in the
preamble to this Agreement. 
  

 Exhibit A-4 

 “Repurchase Documents” has the meaning as set forth in the preamble to this Agreement.

 “Repurchase Price” has the meaning as set forth in the Repurchase Agreement 
 “Responsible Officer” shall mean when used with respect to the Custodian any officer within the Corporate Trust Office including any
Vice President, Managing Director, Director, Assistant Vice President, Associate or any other officer of the Custodian customarily performing functions similar to those performed by any of the above designated officers having direct responsibility
for the administration of this Agreement and also, with respect to a particular matter, any other officer to whom such matter is referred because of such officer’s knowledge and familiarity with the particular subject. 
 “Review Function Limitations” shall mean the limitations described in Section 2 of Schedule I hereto. 
 “Seller” has the meaning as set forth in the preamble of this Agreement. 
 “Servicer” shall mean initially American Home Mortgage Servicing, Inc. in its capacity as servicer of the Purchased Mortgage Loan, or
any successor thereto mutually agreeable to the Agent and the Sellers. 
 “Servicer Trust Receipt and Security Agreement
Letter” is defined in Section 3.4. 
 “Shipping Request” means the shipping request presented by the
applicable Seller or the Servicer to the Custodian substantially in the form attached as Exhibit B (as amended, modified or supplemented from time to time as agreed to by the parties hereto). 
 “Takeout Agreement” shall mean an agreement between a Takeout Investor and a Seller, pursuant to which such Takeout Investor has
committed to purchase from such Seller certain of the Purchased Mortgage Loans, as such agreement may be amended, restated, supplemented or otherwise modified from time to time. 
 “Takeout Commitment” shall mean, with respect to each Takeout Investor, an amount equal to the aggregate Takeout Value for all Purchased
Mortgage Loans that such Takeout Investor has committed to purchase from any Seller pursuant to one or more Takeout Agreements. 
 “Takeout Investor” shall mean any entity which purchases Mortgage Loans from a Seller as identified by such Seller. 
 “Takeout Lender” shall mean any entity which makes loans to a Seller, and to which such Seller has pledged such Mortgage Loans as security for such loans as identified by such Seller. 
 “Takeout Value” shall mean, with respect to any Purchased Mortgage Loan, the price that a Takeout Investor has agreed to pay to a Seller
for such Purchased Mortgage Loan. 
 “Transaction” has the meaning set forth in Paragraph 1 to the Repurchase Agreement, but
shall include, as the context may require, (i) each transfer of Mortgage Loans to Buyer 

  

 Exhibit A-5 

 
against the transfer of funds by Buyer or on account of a Margin Deficit, (ii) each transfer of Mortgage Loans to Buyer in connection with any
repurchase, withdrawal or substitution of Mortgage Loans, and (iii) any portion of any Transaction remaining outstanding after giving effect to any repurchase, withdrawal or substitution of Mortgage Loans under this Agreement. 
 “Transaction Documents” shall mean the Repurchase Agreement, the Letter Agreement, this Agreement, the Electronic Tracking Agreement,
the Performance Guaranty, the Agency Agreement, the Fee Letter, the Agent Fee Letter, the Account Control Agreement and the Collection Account Agreements, in each case as amended, restated, supplemented or otherwise modified from time to time.

 “Trust Receipt” means the trust receipt issued by the Custodian evidencing the Mortgage Loans it holds, in the form
attached as Exhibit F and/or Exhibit F-1, as applicable. 
 “TTC Loan” shall mean a Mortgage Loan which the
Sellers refer to as a “two-time-close loan”, which matures at the end of the construction term, and is expected to be refinanced by a Seller from a construction loan to a permanent mortgage loan at maturity. 
 “Wet Loan” shall mean a wet-funded Mortgage Loan for which, as of the related Purchase Date, the Loan Documents required to be delivered
to the Custodian under this Agreement have not yet been delivered and which shall have the following additional characteristics: 
 (i) the initial Mortgagor Advance has been funded by the applicable Seller prior to such Purchase Date; 
 (ii) the
initial Mortgagor Advance has not been returned to such Seller by the escrow or closing agent for such Wet Loan; and 
 (iii)
upon recordation of the related Mortgage, such Mortgage Loan will constitute a first priority lien on the premises described therein. 
  

 Exhibit A-6

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