EX-10.177



 Exhibit 10.177 

EXECUTION 
 AMENDED AND
RESTATED GUARANTY 
 (PARTICIPATION CERTIFICATES AND SERVICING) 

AMENDED AND RESTATED GUARANTY, dated as of November 10, 2015 (as amended, supplemented, or otherwise modified from time to time, this
“Guaranty”), made by PennyMac Mortgage Investment Trust (“Guarantor”), in favor of Credit Suisse First Boston Mortgage Capital LLC (“Buyer”). 

The Guarantor previously entered into a Guaranty in favor of Buyer dated as of April 30, 2015 (the “Existing Guaranty”).

 The parties hereto have requested that the Existing Guaranty be amended and restated, in its entirety, on the terms and subject to the
conditions set forth herein. 
 RECITALS 

Pursuant to the Master Repurchase Agreement (Participation Certificates and Servicing), dated as of November 10, 2015 (as amended,
supplemented or otherwise modified from time to time, the “Repurchase Agreement”), among PennyMac Loan Services, LLC (the “Seller”), Guarantor and Buyer, which amends and restates the Third Amended and Restated Loan
and Security Agreement among Seller, Guarantor and Buyer, dated as of March 27, 2015, Buyer has agreed from time to time to enter into certain Transactions with Seller for certain Assets, including the Repledge Collateral (as such term is
defined in the Underlying Spread Loan Agreement). Such Repledge Collateral is subject to a Lien in favor of Buyer pursuant to the Security Agreement. 

Pursuant to the Loan and Security Agreement, dated as of April 30, 2015 (as amended, supplemented or otherwise modified from time to
time, the “Underlying Spread Loan Agreement”), between Seller, in its capacity as lender thereunder, and PennyMac Holdings, LLC (the “Underlying Spread Counterparty”), Seller agreed from time to time to make loans
to the Underlying Spread Counterparty secured by the Repledge Collateral (the “Underlying Loans”). 
 The Buyer has agreed
to enter into certain Transactions with Seller on account of the Repledge Collateral (the “Repledge Collateral Transactions”); provided that the Guarantor guarantees such Repledge Collateral Transactions. Seller’s
agreement to make Underlying Loans to Underlying Spread Counterparty under the Underlying Spread Loan Agreement is subject, in part, to Buyer’s agreement to enter into Repledge Collateral Transactions. The Guarantor, as owner of the Underlying
Spread Counterparty, shall derive substantial benefit from Seller making Underlying Loans to Underlying Spread Counterparty. 
 NOW,
THEREFORE, in consideration of the foregoing premises, to induce Buyer to enter into Repledge Collateral Transactions thereunder, and for other good and valuable consideration the receipt and sufficiency of which is hereby acknowledged, Guarantor
hereby agrees with Buyer, as follows: 
 1. Defined Terms. (a) Unless otherwise defined herein, terms which are defined in the
Repurchase Agreement and used herein are so used as so defined. 







 (b) For purposes of this Guaranty, “Maximum Guarantee Amount” shall mean the
aggregate outstanding Repurchase Price of the Repledge Collateral Transactions outstanding from time to time. 
 (c) For purposes of this
Guaranty, “Obligations” shall mean all obligations and liabilities of Seller to Buyer, whether direct or indirect, absolute or contingent, due or to become due, or now existing or hereafter incurred, which may arise under, or out of
or in connection with the Repurchase Agreement and any other Program Agreements and any other document made, delivered or given in connection therewith or herewith, whether on account of principal, interest, reimbursement obligations, fees,
indemnities, costs, expenses (including, without limitation, all fees and disbursements of counsel to Buyer that are required to be paid by Seller pursuant to the terms of the Program Agreements and costs of enforcement of this Guaranty) or
otherwise. 
 2. Guaranty. (a) Guarantor hereby unconditionally and irrevocably guarantees to Buyer the prompt and complete
payment and performance by Seller when due (whether at the stated maturity, by acceleration or otherwise) of the Obligations in an amount not to exceed, in the aggregate for the Obligations, the Maximum Guarantee Amount. 

(b) Guarantor further agrees to pay any and all expenses (including, without limitation, all fees and disbursements of counsel) which may be
paid or incurred by Buyer in enforcing, or obtaining advice of counsel in respect of, any rights with respect to, or collecting, any or all of the Obligations and/or enforcing any rights with respect to, or collecting against, Guarantor under this
Guaranty. This Guaranty shall remain in full force and effect until the later of (i) the termination of the Repurchase Agreement and (ii) the Obligations are paid in full, notwithstanding that from time to time prior thereto Seller may be
free from any Obligations. 
 (c) No payment or payments made by Seller or any other Person or received or collected by Buyer from Seller or
any other Person by virtue of any action or proceeding or any set-off or appropriation or application, at any time or from time to time, in reduction of or in payment of the Obligations shall be deemed to modify, reduce, release or otherwise affect
the liability of Guarantor hereunder which shall, notwithstanding any such payment or payments, remain liable for the amount of the outstanding Obligations until the outstanding Obligations are paid in full. 

(d) Guarantor agrees that whenever, at any time, or from time to time, Guarantor shall make any payment to Buyer on account of
Guarantor’s liability hereunder, Guarantor will notify Buyer in writing that such payment is made under this Guaranty for such purpose. 

3. Right of Set-off. Buyer is hereby irrevocably authorized at any time and from time to time without notice to Guarantor, any such
notice being hereby waived by Guarantor, to set off and appropriate and apply any and all monies and other property of Guarantor, deposits (general or special, time or demand, provisional or final), in any currency, and any other credits,
indebtedness or claims, in any currency, in each case whether direct or indirect, absolute or contingent, matured or unmatured, at any time held or owing by Buyer of any Affiliate thereof to 

  
 -2- 








 
or for the credit or the account of Guarantor, or any part thereof in such amounts as Buyer may elect, on account of the Obligations and liabilities of Guarantor hereunder and claims of every
nature and description of Buyer against Guarantor, in any currency, whether arising hereunder, under the Repurchase Agreement or otherwise, as Buyer may elect, whether or not Buyer has made any demand for payment and although such Obligations and
liabilities and claims may be contingent or unmatured. Buyer shall notify Guarantor promptly of any such set-off and the application made by Buyer, provided that the failure to give such notice shall not affect the validity of such set-off and
application. The rights of Buyer under this paragraph are in addition to other rights and remedies (including, without limitation, other rights of set-off) which Buyer may have. 

4. Subrogation; Subordination. (a) Notwithstanding any payment or payments made by Guarantor hereunder or any set-off or
application of funds of Guarantor by Buyer, Guarantor shall not be entitled to be subrogated to any of the rights of Buyer against Seller or any other guarantor or any collateral security or guarantee or right of offset held by Buyer for the payment
of the Obligations, nor shall Guarantor seek or be entitled to seek any contribution or reimbursement from Seller or any other guarantor in respect of payments made by Guarantor hereunder, until all amounts owing to Buyer by Seller on account of the
Obligations are paid in full and the Repurchase Agreement is terminated. If any amount shall be paid to Guarantor on account of such subrogation rights at any time when all of the Obligations shall not have been paid in full, such amounts shall be
held by Guarantor for the benefit of Buyer, segregated from other funds of Guarantor, and shall, forthwith upon receipt by Guarantor, be turned over to Buyer in the exact form received by Guarantor (duly indorsed by Guarantor to Buyer, if required),
to be applied against the Obligations, whether matured or unmatured, in such order as Buyer may determine. 
 (b) Guarantor acknowledges and
agrees that notwithstanding that the Repledge Collateral is subject to the Underlying Spread Loan Agreement and the Security Agreement, the rights of the Seller under the Underlying Spread Loan Agreement with respect to the Repledge Collateral are
and shall continue to be at all times junior and subordinate to the rights of Buyer under the Security Agreement. In furtherance of the foregoing, notwithstanding any rights or remedies available to Underlying Spread Counterparty with respect to the
Repledge Collateral, such rights of the Underlying Spread Counterparty under the Underlying Spread Loan Agreement are solely against the Seller and do not extend to the Buyer. 

5. Amendments, etc. with Respect to the Obligations. Guarantor shall remain obligated hereunder notwithstanding that, without any
reservation of rights against Guarantor, and without notice to or further assent by Guarantor, any demand for payment of any of the Obligations made by Buyer may be rescinded by Buyer, and any of the Obligations continued, and the Obligations, or
the liability of any other party upon or for any part thereof, or any collateral security or guarantee therefor or right of offset with respect thereto, may, from time to time, in whole or in part, be renewed, extended, amended, modified,
accelerated, compromised, waived, surrendered or released by Buyer, and the Repurchase Agreement, and the other Program Agreements and any other document in connection therewith may be amended, modified, supplemented or terminated, in whole or in
part, pursuant to its terms and as Buyer may deem advisable from time to time, and any collateral security, guarantee or right of offset at any time held by Buyer for the payment of the Obligations may be sold, exchanged, waived,


  
 -3- 








 
surrendered or released. Buyer shall have no obligation to protect, secure, perfect or insure any Lien at any time held by it as security for the Obligations or for this Guaranty or any property
subject thereto. When making any demand hereunder against Guarantor, Buyer may, but shall be under no obligation to, make a similar demand on Seller and any failure by Buyer to make any such demand or to collect any payments from Seller or any
release of Seller shall not relieve Guarantor of its obligations or liabilities hereunder, and shall not impair or affect the rights and remedies, express or implied, or as a matter of law, of Buyer against Guarantor. For the purposes hereof
“demand” shall include the commencement and continuance of any legal proceedings. 
 6. Guaranty Absolute and
Unconditional. (a) Guarantor waives any and all notice of the creation, renewal, extension or accrual of any of the Obligations and notice of or proof of reliance by Buyer upon this Guaranty or acceptance of this Guaranty; the Obligations,
and any of them, shall conclusively be deemed to have been created, contracted or incurred, or renewed, extended, amended or waived in reliance upon this Guaranty; and all dealings between Seller or Guarantor, on the one hand, and Buyer, on the
other, shall likewise be conclusively presumed to have been had or consummated in reliance upon this Guaranty. Guarantor waives diligence, presentment, protest, demand for payment and notice of default or nonpayment to or upon Seller or the Guaranty
with respect to the Obligations. This Guaranty shall be construed as a continuing, absolute and unconditional guarantee of payment without regard to (i) the validity or enforceability of the Repurchase Agreement, the other Program Agreements,
any of the Obligations or any collateral security therefor or guarantee or right of offset with respect thereto at any time or from time to time held by Buyer, (ii) any defense, set-off or counterclaim (other than a defense of payment or
performance) which may at any time be available to or be asserted by Seller against Buyer, or (iii) any other circumstance whatsoever (with or without notice to or knowledge of Seller or Guarantor) which constitutes, or might be construed to
constitute, an equitable or legal discharge of Seller for the Obligations, or of Guarantor under this Guaranty, in bankruptcy or in any other instance. When pursuing its rights and remedies hereunder against Guarantor, Buyer may, but shall be under
no obligation, to pursue such rights and remedies that they may have against Seller or any other Person or against any collateral security or guarantee for the Obligations or any right of offset with respect thereto, and any failure by Buyer to
pursue such other rights or remedies or to collect any payments from Seller or any such other Person or to realize upon any such collateral security or guarantee or to exercise any such right of offset, or any release of Seller or any such other
Person or any such collateral security, guarantee or right of offset, shall not relieve Guarantor of any liability hereunder, and shall not impair or affect the rights and remedies, whether express, implied or available as a matter of law, of Buyer
against Guarantor. This Guaranty shall remain in full force and effect and be binding in accordance with and to the extent of its terms upon Guarantor and their successors and assigns thereof, and shall inure to the benefit of Buyer, and successors,
indorsees, transferees and assigns, until all the Obligations and the obligations of Guarantor under this Guaranty shall have been satisfied by payment in full, notwithstanding that from time to time during the term of the Repurchase Agreement
Seller may be free from any Obligations. 

  
 -4- 








 (b) Without limiting the generality of the foregoing, Guarantor hereby agrees, acknowledges, and
represents and warrants to Buyer as follows: 
 (i) Guarantor hereby waives any defense arising by reason of, and any and all
right to assert against Buyer any claim or defense based upon, an election of remedies by Buyer which in any manner impairs, affects, reduces, releases, destroys and/or extinguishes Guarantor’s (x) subrogation rights, (y) rights to
proceed against Seller or any other guarantor for reimbursement or contribution, and/or (z) any other rights of Guarantor to proceed against Seller, against any other guarantor, or against any other person or security. 

(ii) Guarantor is presently informed of the financial condition of Seller and of all other circumstances which diligent inquiry
would reveal and which bear upon the risk of nonpayment of the Obligations. Guarantor hereby covenants that it will make its own investigation and will continue to keep itself informed of Seller’s financial condition, the status of other
guarantors, if any, of all other circumstances which bear upon the risk of nonpayment and that it will continue to rely upon sources other than Buyer for such information and will not rely upon Buyer for any such information. Absent a written
request for such information by Guarantor to Buyer, Guarantor hereby waives its right, if any, to require Buyer to disclose to Guarantor any information which Buyer may now or hereafter acquire concerning such condition or circumstances including,
but not limited to, the release of or revocation by any other guarantor. 
 (iii) Guarantor has independently reviewed the
Repurchase Agreement and related agreements and has made an independent determination as to the validity and enforceability thereof, and in executing and delivering this Guaranty to Buyer, Guarantor is not in any manner relying upon the validity,
and/or enforceability, and/or attachment, and/or perfection of any Liens or security interests of any kind or nature granted by Seller or any other guarantor to Buyer, now or at any time and from time to time in the future. 

7. Reinstatement. This Guaranty shall continue to be effective, or be reinstated, as the case may be, if at any time payment, or any
part thereof, of any of the Obligations is rescinded or must otherwise be restored or returned by Buyer upon the insolvency, bankruptcy, dissolution, liquidation or reorganization of Seller or upon or as a result of the appointment of a receiver,
intervenor or conservator of, or trustee or similar officer for, Seller or any substantial part of its property, or otherwise, all as though such payments had not been made. 

8. Payments. Guarantor hereby agrees that the Obligations will be paid to Buyer without set-off or counterclaim in U.S. Dollars. 

9. Event of Default. If an Event of Default under the Repurchase Agreement shall have occurred and be continuing, Guarantor agrees
that, as between Guarantor and the Buyer, the Obligations may be declared to be due in accordance with the terms of the Repurchase Agreement for purposes of this Guaranty notwithstanding any stay, injunction or other prohibition which may prevent,
delay or vitiate any such declaration as against the Seller and that, in the event of any such declaration (or attempted declaration), such Obligations shall forthwith become due by Guarantor for purposes of this Guaranty. 

10. Severability. Any provision of this Guaranty which is prohibited or unenforceable in any jurisdiction shall, as to such
jurisdiction, be ineffective to the extent of such 

  
 -5- 








 
prohibition or unenforceability without invalidating the remaining provisions hereof, and any such prohibition or unenforceability in any jurisdiction shall not invalidate or render unenforceable
such provision in any other jurisdiction. 
 11. Headings. The paragraph headings used in this Guaranty are for convenience of
reference only and are not to affect the construction hereof or be taken into consideration in the interpretation hereof. 
 12. No
Waiver; Cumulative Remedies. Buyer shall not by any act (except by a written instrument pursuant to Section 13 hereof), delay, indulgence, omission or otherwise be deemed to have waived any right or remedy hereunder or to have acquiesced in
any Default or Event of Default or in any breach of any of the terms and conditions hereof. No failure to exercise, nor any delay in exercising, on the part of Buyer, any right, power or privilege hereunder shall operate as a waiver thereof. No
single or partial exercise of any right, power or privilege hereunder shall preclude any other or further exercise thereof or the exercise of any other right, power or privilege. A waiver by Buyer of any right or remedy hereunder on any one occasion
shall not be construed as a bar to any right or remedy which Buyer would otherwise have on any future occasion. The rights and remedies herein provided are cumulative, may be exercised singly or concurrently and are not exclusive of any rights or
remedies provided by law. 
 13. Waivers and Amendments; Successors and Assigns; Governing Law. None of the terms or provisions of
this Guaranty may be waived, amended, supplemented or otherwise modified except by a written instrument executed by Guarantor and Buyer, provided that any provision of this Guaranty may be waived by Buyer in a letter or agreement executed by Buyer
or by facsimile or electronic transmission from Buyer to the Guarantor. This Guaranty shall be binding upon the personal representatives, successors and assigns of Guarantor and shall inure to the benefit of Buyer and its successors and assigns.

 14. Notices. Notices delivered in connection with this Guaranty shall be given in accordance with Section 10.05 of the
Repurchase Agreement. 
 15. Jurisdiction. 

(a) THIS GUARANTY SHALL BE GOVERNED BY, AND CONSTRUED AND INTERPRETED IN ACCORDANCE WITH, THE LAWS OF THE STATE OF NEW YORK. 

(b) GUARANTOR HEREBY WAIVES TRIAL BY JURY. GUARANTOR HEREBY IRREVOCABLY CONSENTS TO THE EXCLUSIVE JURISDICTION OF ANY COURT OF THE STATE OF
NEW YORK, OR IN THE UNITED STATES DISTRICT COURT FOR THE SOUTHERN DISTRICT OF NEW YORK, ARISING OUT OF OR RELATING TO THE PROGRAM AGREEMENTS IN ANY ACTION OR PROCEEDING. GUARANTOR HEREBY SUBMITS TO, AND WAIVES ANY OBJECTION IT MAY HAVE TO,
EXCLUSIVE PERSONAL JURISDICTION AND VENUE IN THE COURTS OF THE STATE OF NEW YORK AND THE UNITED STATES DISTRICT COURT FOR THE SOUTHERN DISTRICT OF NEW YORK, WITH RESPECT TO ANY DISPUTES ARISING OUT OF OR RELATING TO THE PROGRAM AGREEMENTS. 


  
 -6- 








 16. Integration. This Guaranty represents the agreement of Guarantor with respect to the
subject matter hereof and there are no promises or representations by Buyer relative to the subject matter hereof not reflected herein. 

17. Acknowledgments. Guarantor hereby acknowledges that: 

(a) Guarantor has been advised by counsel in the negotiation, execution and delivery of this Guaranty and the other Program Agreements; 

(b) Buyer does not have any fiduciary relationship to Guarantor, Guarantor does not have any fiduciary relationship to Buyer and the
relationship between Buyer and Guarantor is solely that of surety and creditor; and 
 (c) no joint venture exists between Buyer and
Guarantor or among Buyer, Seller and Guarantor. 
 [Signature pages follow] 

  
 -7- 








 IN WITNESS WHEREOF, the undersigned has caused this Guaranty to be duly executed and delivered as
of the date first above written. 
  

			
	PENNYMAC MORTGAGE INVESTMENT TRUST, as Guarantor
		
	By:	 	 /s/ Pamela Marsh

	Name:	 	Pamela Marsh
	Title:	 	Executive Vice President, Treasurer



  
 Signature Page to
Amended & Restated Guaranty