EX-10.77






Exhibit 10.77




EXECUTION COPY




AMENDMENT NO. 3




to




AMENDED AND RESTATED MASTER REPURCHASE AGREEMENT




     This AMENDMENT NO. 3 (this “Amendment”), dated as of December 30, 2008 (the
“Amendment Effective Date”), is made by and between PHH MORTGAGE CORPORATION, a New Jersey
corporation (the “Seller”), and THE ROYAL BANK OF SCOTLAND PLC (the “Buyer”).




WITNESSETH:




     WHEREAS, Seller and Buyer are parties to that certain Amended and Restated Master Repurchase
Agreement, dated as of June 26, 2008, as amended by Amendment No. 1 thereto, dated July 29, 2008,
and Amendment No. 2 thereto, dated as of December 19, 2008 (as further amended, supplemented or
otherwise modified from time to time in accordance with its terms, the “Master Repurchase
Agreement”), whereby Buyer has agreed to purchase from time to time, certain Eligible Loans, as
provided in and subject to the terms and conditions of the Master Repurchase Agreement, and the
other agreements entered into in connection with the Master Repurchase Agreement (the “Program
Documents”);




     WHEREAS, the parties desire to amend certain provisions of the Master Repurchase Agreement as
set forth herein; and




     WHEREAS, Section 30 of the Master Repurchase Agreement permits the amendments contemplated
herein.




     NOW, THEREFORE, in consideration of the foregoing and the mutual agreements hereinafter set
forth, and for other good and valuable consideration, the receipt and adequacy of which are hereby
acknowledged, the parties hereto hereby agree as follows:



1. Definitions. Capitalized terms used but not otherwise defined herein shall have the
meanings ascribed thereto in the Master Repurchase Agreement, including by way of reference to any
other documents or agreements.



2. Amendments to Master Repurchase Agreement. As of the Amendment Effective Date, the
Master Repurchase Agreement is hereby amended as provided below:




     (a) Section 2 of the Master Repurchase Agreement is hereby amended by adding the following
defined terms in their appropriate alphabetical positions:





     “Cut-Off Notice” shall have the meaning assigned thereto in the FNMA
Tri-Party Agreement.




     “Cut-Off Time” shall have the meaning assigned thereto in the FNMA
Tri-Party Agreement.



 









 






     “Early Funding Transaction” shall have the meaning assigned thereto in
the FNMA Tri-Party Agreement.




     “Fall-Out Notification” shall have the meaning assigned thereto in the
FNMA Tri-Party Agreement.




     “FNMA Confirmation” shall mean a “Confirmation” as such term is defined
in the FNMA Tri-Party Agreement.




     “FNMA Tri-Party Agreement” shall mean that certain letter agreement
(Tri-Party Agreement — Wiring Instructions) among Buyer, Seller and Fannie Mae,
dated December 30, 2008, as the same may be amended, supplemented or otherwise
modified from time to time in accordance with its terms.




     “Purchase Proceeds” shall have the meaning assigned thereto in the FNMA
Tri-Party Agreement.




     “Shortfall Amount” shall mean, for any Early Funding Transaction, the
aggregate amount, if any, by which (x) the amount owed by Seller to Buyer in respect
of the Purchased Loans to be sold by Seller to Fannie Mae in such Early Funding
Transaction exceeds (y) the aggregate Purchase Proceeds for such Purchased Loans as
specified in the related FNMA Confirmation.




     “Wiring Instructions” shall have the meaning assigned thereto in the
FNMA Tri-Party Agreement.



     (b) Section 10 of the Master Repurchase Agreement is hereby amended and restated in its
entirety to read as follows:




     “10. RELEASE OF PURCHASED LOANS





     (a) With respect to any Purchased Loan, other than any Purchased Loan that is
sold by Seller to Fannie Mae in an Early Funding Transaction, upon timely payment in
full of the Repurchase Price with respect to such Purchased Loan and all other
Obligations (if any) then owing, unless a Default, Event of Default or Event of
Termination shall have occurred and be continuing, then (i) Buyer shall be deemed to
have terminated any security interest that Buyer may have in such Purchased Loan and
any Purchased Items solely related to such Purchased Loan and (ii) with respect to
such Purchased Loan, Buyer shall direct Custodian to release such Purchased Loan and
any Purchased Items solely related to such Purchased Loan to Seller and shall
execute such customary security interest release documents as may be reasonably
requested by Seller, in each case unless such release and termination would give
rise to or perpetuate a Margin Deficit. Notwithstanding the foregoing, Buyer shall
release all Purchased Items, notwithstanding the occurrence of an Event of
Termination, upon payment in full by Seller pursuant to Section 17 of the Repurchase
Price for all Purchased Items then subject to outstanding Transactions and payment
in full of all other Obligations then due to Buyer or any of Buyer’s Affiliates.
Except as set forth in



2









 






Section 16, Seller shall give at least one (1) Business Day prior written
notice to Buyer if such repurchase shall occur on any date other than the Repurchase
Date in Section 3(i).




     If such release and termination gives rise to or perpetuates a Margin Deficit,
Buyer shall notify Seller of the amount thereof and Seller shall thereupon satisfy
the Margin Call in the manner specified in Section 6.




     (b) In the case of any Purchased Loan to be sold by Seller to Fannie Mae in an
Early Funding Transaction, Seller shall, at least 1 Business Day prior to the
related date of purchase by Fannie Mae, (i) upload to Buyer’s system loan-level
information relating to the Purchased Loans to be sold by Seller to Fannie Mae in
connection with such Early Funding Transaction (such information to be contained in
a file relating only to the Purchased Loans to be sold by Seller to Fannie Mae in
such Early Funding Transaction) and (ii) wire transfer the Shortfall Amount, if any,
relating to such Early Funding Transaction to Buyer’s account in accordance with the
Wiring Instructions set forth in Section 2 of the FNMA Tri-Party Agreement. In the
event that Buyer shall not have received from Seller, by 12:00 noon (Eastern time)
on the purchase date for any Early Funding Transaction, the entire Shortfall Amount
relating to such Early Funding Transaction, Buyer shall send to Fannie Mae a Cut-Off
Notice by no later than the applicable Cut-Off Time. With respect to any Purchased
Loan to be sold to Fannie Mae in an Early Funding Transaction, if Buyer shall not
have sent to Fannie Mae a Cut-Off Notice identifying such Purchased Loan at or prior
to the applicable Cut-Off Time in accordance with Section 1(c) of the FNMA Tri-Party
Agreement, upon receipt of the Purchase Proceeds with respect to such Purchased Loan
in the Third Party Loan Purchase Proceeds Account (a) Buyer shall be deemed to have
terminated any security interest that Buyer may have in such Purchased Loan and any
Purchased Items solely related to such Purchased Loan and (b) with respect to such
Purchased Loan, Buyer shall direct Custodian to release such Purchased Loan and any
Purchased Items solely related to such Purchased Loan to Fannie Mae and shall cause
the execution of such customary security interest release documents as may be
reasonably requested by Fannie Mae. Nothing in the foregoing sentence shall be
construed as a waiver or satisfaction of Seller’s obligation to remit any Shortfall
Amount or any other amount due and owing to Buyer pursuant to this Agreement. If
such release and termination gives rise to or perpetuates a Margin Deficit, Buyer
shall notify Seller of the amount thereof and Seller shall thereupon satisfy the
Margin Call in the manner specified in Section 6.”



3









 




3. Fees and Expenses. Seller hereby agrees to pay to Buyer, on demand, any and all
reasonable fees, costs and expenses (including reasonable fees and expenses of counsel) incurred by
Buyer in connection with the development, preparation and execution of this Amendment, irrespective
of whether any transactions hereunder are executed.



4. Confirmation of Master Repurchase Agreement; Seller Representations. Seller represents
and warrants as follows:




     (a) Upon effectiveness of this Amendment, the Master Repurchase Agreement shall be, and be
deemed to be, modified and amended in accordance herewith and the respective rights, limitations,
obligations, duties, liabilities and immunities of Seller and Buyer shall hereafter be determined,
exercised and enforced subject in all respects to such modifications and amendments, and all the
terms and conditions of this Amendment shall be and be deemed to be part of the terms and
conditions of the Master Repurchase Agreement and the other Program Documents for any and all
purposes. Except as expressly amended or released and discharged hereby, all of the terms of the
Master Repurchase Agreement and the other Program Documents including, without limitation, security
interests granted thereunder, shall remain in full force and effect and are hereby ratified and
confirmed in all respects. Seller hereby acknowledges and agrees that any and all Obligations of
Seller arising out of or relating to Transactions, or otherwise, shall remain in full force and
effect until their payment in full and termination in accordance with the terms of the Master
Repurchase Agreement. This Amendment shall not constitute a novation.




     (b) Seller hereby represents and warrants that (i) it has the requisite power and authority,
and legal right, to execute and deliver this Amendment and to perform its obligations under this
Amendment and the Master Repurchase Agreement, (ii) Seller has taken all necessary corporate and
legal action to duly authorize the execution and delivery of this Amendment and the performance of
its obligations under this Amendment and the Master Repurchase Agreement, (iii) this Amendment has
been duly executed and delivered by Seller, (iv) each of this Amendment and the Master Repurchase
Agreement constitutes a legal, valid and binding obligation of Seller enforceable against it in
accordance with its terms, except as enforceability may be limited by applicable bankruptcy,
insolvency, reorganization, moratorium or similar laws affecting the rights of creditors generally
and by general equitable principles (whether enforcement is sought by proceedings in equity or at
law), and (v) after giving effect to this Amendment, no Default or Event of Default has occurred
and is continuing.




     (c) Each representation and warranty of Seller contained in the Master Repurchase Agreement is
true and correct and is hereby restated and affirmed.




     (d) Each covenant and each other agreement of Seller contained in the Master Repurchase
Agreement (as modified by this Amendment, if applicable) is hereby restated and affirmed.



5. Further Assurances. The Seller hereby agrees to execute and deliver such additional
documents, opinions, instruments or agreements as may be reasonably necessary and appropriate to
effectuate the purposes of this Amendment and the Master Repurchase Agreement.




4









 







6. Conflicts. In the event of a conflict of any provision hereof with any provision or
definition set forth in the Master Repurchase Agreement the provisions and definitions of this
Amendment shall control.



7. Governing Law. This Amendment and the Master Repurchase Agreement shall be governed by
New York law without reference to choice of law doctrine (but with reference to Section 5-1401 of
the New York General Obligations Law, which by its terms applies to this Amendment and the Master
Repurchase Agreement).



8. Severability. Any provision of this Amendment, the Master Repurchase Agreement or the
other Program Documents which is prohibited, unenforceable or not authorized in any jurisdiction
shall, as to such jurisdiction, be ineffective to the extent of such prohibition, unenforceability
or non-authorization without invalidating the remaining provisions hereof or thereof or affecting
the validity, enforceability or legality of such provisions in any other jurisdiction.



9. Entire Agreement. This Amendment, the Master Repurchase Agreement and the other Program
Documents embody the entire agreement and understanding of the parties hereto and supersede any and
all prior agreements, arrangements and understandings relating to the matters provided for herein.
No alteration, waiver, amendments, or change or supplement hereto shall be binding or effective
unless the same is set forth in writing by a duly authorized representative of each party hereto.



10. Binding Effect. This Amendment, the Master Repurchase Agreement and the other Program
Documents, as applicable, shall be binding upon and shall be enforceable by Seller and Buyer, as
applicable, and their respective successors and permitted assigns.



11. Counterparts. This Amendment may be executed in any number of counterparts, all of
which taken together shall constitute one and the same instrument, and any of the parties hereto
may execute this Amendment by signing any such counterpart.



12. Headings. The headings appearing in this Amendment are included solely for convenience
of reference and are not intended to affect the interpretation of any other provision of this
Amendment.




[Signature pages follow]




5









 







     IN WITNESS WHEREOF, the undersigned parties have caused this Amendment to be duly executed and
delivered by their respective authorized officers as of the date first above written.




	 	 	 	 	 
	 	BUYER



THE ROYAL BANK OF SCOTLAND PLC

 	 
	 	By:  	Greenwich Capital Markets, Inc., its Agent
 	 
	 	 	 
	 	By:  	                                         /s/ Regina Abayev
 	 
	 	 	Name:  	Regina Abayev 	 
	 	 	Title:  	Vice President 	 
	 



[Amendment
No. 3]




 









 











	 	 	 	 	 
	 	SELLER
 	 
	 
	 	PHH MORTGAGE CORPORATION

 	 
	 	By:  	/s/ Mark E. Johnson
 	 
	 	 	Name:  	Mark E. Johnson 	 
	 	 	Title:  	Vice President and Treasurer 	 
	 



[Amendment
No. 3]