[***] = Certain information contained in this document, marked by brackets, has been omitted because it is both not material and would be competitively harmful if publicly disclosed.

Exhibit 10.2


SIXTH AMENDMENT TO
SECOND AMENDED AND RESTATED CREDIT AGREEMENT AND SEVENTH AMENDMENT TO AMENDED AND RESTATED CASH DIVERSION AND COMMITMENT FEE GUARANTY

This SIXTH AMENDMENT TO SECOND AMENDED AND RESTATED CREDIT AGREEMENT AND SEVENTH AMENDMENT TO AMENDED AND RESTATED CASH DIVERSION AND COMMITMENT FEE GUARANTY, dated as of February 28, 2019 (this “Amendment”), is entered into among the undersigned in connection with that certain (a) Second Amended and Restated Credit Agreement, dated as of March 27, 2018, among Sunrun Hera Portfolio 2015-A, LLC, a Delaware limited liability company, as Borrower (the “Borrower”), the financial institutions as Lenders from time to time party thereto (the “Lenders”), and Investec Bank PLC, as Administrative Agent for the Lenders (in such capacity, the “Administrative Agent”) and as Issuing Bank (in such capacity, the “Issuing Bank”) (as in effect prior to the date hereof, the “Credit Agreement” and as amended by this Amendment, the “Amended Credit Agreement”) and (b) the Cash Diversion and Commitment Fee Guaranty (as in effect prior to the date hereof, the “Guaranty” and as amended by this Amendment, the “Amended Guaranty”).. Capitalized terms which are used but not otherwise defined herein shall have the meanings ascribed to such terms in the Amended Credit Agreement and the rules of construction set forth in Section 1.02 of the Credit Agreement apply to this Amendment.
W I T N E S S E T H
WHEREAS, the Borrower and the Sponsor wish to make, and the undersigned wish to agree to make, certain amendments to the Credit Agreement and the Guaranty as provided herein.
NOW, THEREFORE, in consideration of the mutual agreements, provisions and covenants contained herein and other good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, the parties hereto agree as follows:
I.Amendments to the Credit Agreement. Subject to the satisfaction of the conditions set forth in Article III below, the following amendments to the Credit Agreement are hereby accepted and agreed by the parties hereto:
1.    Amendments to Section 1.01. The following are hereby added as new defined terms to Section 1.01 of the Credit Agreement in the appropriate alphabetical order:
““Aggregate Customer Agreement Recovery Rate” means, as of any Calculation Date and with respect to any applicable group of Projects where a Completed Service Transfer has occurred with respect to such Project during the six-month period ending on such Calculation Date, the quotient obtained by dividing (a) the sum of (i) the present value of the aggregate remaining contracted Comparison Customer Agreement cash flows for all such Projects on such Calculation Date (after any Completed Service Transfer discounted at an annual rate of 6%) and (ii) aggregate prepayments received in connection with any Completed Service Transfer

CPAM: 33360649.11


for all such Projects by (b) the present value of the aggregate remaining contracted Comparison Customer Agreement cash flows for all such Projects (calculated on such Calculation Date as if such Completed Service Transfer had not occurred and no payments were received in connection with such Completed Service Transfer) discounted at an annual rate of 6%.”
““Comparison Customer” shall mean a Person party to a Comparison Customer Agreement who leases, or agrees to purchase Energy produced by, a Project.”
““Comparison Customer Agreement” shall mean those power purchase agreements or customer lease agreements (together with all ancillary agreements and documents related thereto, including any assignment agreement to a replacement Comparison Customer) with respect to a Project, whereby the Comparison Customer agrees to purchase the Energy produced by the related Project for a fixed fee per kWh, or agrees to lease the Project for monthly lease payments.”
““Completed Service Transfer” means the assignment of a Comparison Customer Agreement to a subsequent Comparison Customer (including, without limitation, any assignments made in connection with a foreclosure or bankruptcy).”
““Completed Service Transfer Recovery Differential” means, as of any Calculation Date, the difference obtained by subtracting (a) the Aggregate Customer Agreement Recovery Rate for Non-Fixture Filing Systems from (b) the Aggregate Customer Agreement Recovery Rate for Fixture Filing Systems.”
““Fixture Filing Systems” means each Project owned by Sponsor or any of its Affiliates in a Project State (other than Projects located in the State of California) in respect of which a fixture filing had been recorded and was in effect against the applicable Customer and the applicable property in the filing office designated by Section 9-501 of the applicable Uniform Commercial Code at the time of the Completed Service Transfer or Uncompleted Service Transfer.”
““Interim Fixture Filing Event” means the occurrence of any of the following on or after June 30, 2019: (a) as of any applicable Calculation Date where the aggregate capacity of Fixture Filing Systems is equal to or greater than [***] MW, the Completed Service Transfer Recovery Differential calculated on such Calculation Date is equal to or greater than [***], (b) as of any applicable Calculation Date where the aggregate capacity of Fixture Filing Systems is less than [***] MW, the Aggregate Customer Agreement Recovery Rate for Non-Fixture Filing Systems calculated on such Calculation Date is less than or equal to [***], or (c) as of any applicable Calculation Date, the number of Uncompleted Service Transfers in respect of Non-Fixture Filing Systems during the six-month period ending on such Calculation Date is equal to or greater than [***] percent ([***]%) of the number of Total Service Transfers in respect of Non-Fixture Filing Systems during the six-month period ending on such Calculation Date.”

CPAM: 33360649.11


““Non-Fixture Filing Systems” means each Project owned by Sponsor or any of its Affiliates in a Project State (other than Projects located in the State of California) that is not a Fixture Filing System.”
““Project Pool Fixture Filing Event” means the occurrence of any of the events described in clauses (a), (b) or (c) below on or after June 30, 2019 or the occurrence of the event describe in clause (d) or (e) below on or after February 28, 2019: (a) as of any applicable Calculation Date where the aggregate capacity of Fixture Filing Systems is equal to or greater than [***] MW, the Completed Service Transfer Recovery Differential calculated on such Calculation Date is equal to or greater than of [***], (b) as of any Calculation Date where the aggregate capacity of Fixture Filing Systems is less than [***] MW, the Aggregate Customer Agreement Recovery Rate for Non-Fixture Filing Systems calculated on such Calculation Date is less than or equal to [***], (c) as of any applicable Calculation Date, the number of Uncompleted Service Transfers in respect of Non-Fixture Filing Systems during the six-month period ending on such Calculation Date is equal to or greater than [***] percent ([***]%) of the number of Total Service Transfers in respect of Non-Fixture Filing Systems during the six-month period ending on such Calculation Date, (d) the [***] expires or is terminated and Sponsor does not enter into a replacement agreement in form and substance, and with a counterparty, acceptable to the Administrative Agent (acting on the instruction of the Required Lenders) within thirty (30) days of such expiration or termination, or (e) a material breach of the [***] by either Sponsor or the counterparty to the [***] has occurred and is continuing, and both (i) such breach is not cured within thirty (30) days following its occurrence and (ii) Sponsor does not enter into a replacement agreement in form and substance, and with a counterparty, acceptable to the Administrative Agent (acting on the instruction of the Required Lenders) within thirty (30) days following the end of such thirty (30) day cure period.”
““[***]” shall mean the Statement of Work [***] for [***], dated as of August 1, 2018, between Sponsor and [***] and the Master Services Agreement, dated as of April 11, 2014, between Sponsor and [***] (or any replacement agreement or agreements approved by the Administrative Agent, acting at the direction of the Required Lenders).”
““Uncompleted Service Transfer” means a situation in which a Comparison Customer voluntarily or involuntarily sells or transfers title to the real property associated with a Project to a purchaser who does not assume the Comparison Customer’s obligations under the Comparison Customer Agreement.”
““Total Service Transfers” means all Completed Service Transfers and Uncompleted Service Transfers.”
2.    Amendment to Section 5.23(k). Section 5.23(k) of the Credit Agreement is hereby amended by replacing the text “In respect of each Eligible Project in a Project State” with the text “In respect of each Eligible Project owned by a Wholly Owned Opco”.

CPAM: 33360649.11


3.    Amendment to Section 6.01(a)(iii). The second sentence of Section 6.01(a)(iii) of the Credit Agreement is hereby amended and restated in its entirety as follows:

“Such Manager’s report shall include information regarding the Completed Service Transfer Recovery Differential, Uncompleted Service Transfers, and information on Battery performance, including disclosure of any Serial Defects, Implicated Battery Models and Battery Replacement Costs, information on failure rates and any other information as the Administrative Agent or Independent Engineer may reasonably request in determining the Required Battery Reserve Amount.”
4.    New Section 6.31. Article VI of the Credit Agreement is hereby amended by inserting the following as a new Section 6.31:
“In the event an Interim Fixture Filing Event occurs and is continuing, Borrower shall (a) instruct a competent third party service provider to file (with a copy of such instruction delivered to the Administrative Agent) in respect of each Eligible Project (other than (i) provided that a Qualifying California Code remains in effect in the State of California, any Eligible Project located in the State of California and (ii) any Eligible Project that is a Fixture Filing System) installed after the relevant Calculation Date a fixture filing against each Customer and the applicable property in respect of such Eligible Project in the filing office designated by Section 9-501 of the applicable Uniform Commercial Code within five (5) Business Days of the date on which the Manager’s report described in Section 6.01(a)(iii) is required to be delivered in respect of the Calculation Date on which the Interim Fixture Filing Event occurred, and (b) cause such filings to be made no later than sixty (60) days after such instruction is delivered.”
5.    New Section 6.32. Article VI of the Credit Agreement is hereby amended by inserting the following as a new Section 6.32:
“In the event a Project Pool Fixture Filing Event occurs, Borrower shall (a) instruct a competent third party service provider to file (with a copy of such instruction delivered to the Administrative Agent) in respect of each Eligible Project (other than (i) provided that a Qualifying California Code remains in effect in the State of California, any Eligible Project located in the State of California and (ii) any Eligible Project that is a Fixture Filing System) a fixture filing against each Customer and the applicable property in respect of such Eligible Project in the filing office designated by Section 9-501 of the applicable Uniform Commercial Code within five (5) Business Days of the date on which the Manager’s report described in Section 6.01(a)(iii) is required to be delivered in respect of the Calculation Date on which the Project Pool Fixture Filing Event occurred, (or, solely with respect to a Project Pool Fixture Filing Event described in clause (d) or (e) of the definition thereof, within five (5) Business Days of the occurrence of such event), and (b) cause such filings to be made no later than sixty (60) days after such instruction is delivered.”

CPAM: 33360649.11


6.    New Section 6.33. Article VI of the Credit Agreement is hereby amended by inserting the following as a new Section 6.33:
“In the event that the real property underlying an Eligible Project is subject to foreclosure or pre-foreclosure proceedings, Borrower shall (a) instruct a competent third party service provider to file in respect of such Eligible Project (other than (i) provided that a Qualifying California Code remains in effect in the State of California, any Eligible Project located in the State of California and (ii) any Eligible Project that is a Fixture Filing System) a fixture filing against the applicable Customer and the applicable property in respect of such Eligible Project in the filing office designated by Section 9-501 of the applicable Uniform Commercial Code within five (5) Business Days of the date on which the Borrower or any of its Affiliates obtains actual knowledge of such proceedings, and (b) cause such filing to be made no later than the earlier of (i) thirty (30) days after such instruction is delivered and (ii) ninety (90) days after the Borrower or any of its Affiliates obtains actual knowledge that the real property underlying an Eligible Project has become subject to foreclosure or pre-foreclosure proceedings; provided that any failure to comply with this Section 6.33 in any single instance shall not be deemed a breach of this Section 6.33 unless and until such failure, together with any prior failures, has occurred within the preceding twelve (12) month period with respect to twenty-five (25) or more Eligible Projects .”
7.    Amendment to Section 10.01(c)(iii). Section 10.01(c) is hereby amended by replacing the text “and Section 6.24(a)” with “Section 6.24 and Section 6.32”.
II.    Amendments to the Guaranty. Subject to the satisfaction of the conditions set forth in Article III below, the following amendments to the Guaranty are hereby accepted and agreed by the parties hereto:
1.    Amendment to Section 2.01. Section 2.01 of the Guaranty is hereby amended by replacing all text after clause (e) with the following and restated in its entirety as follows:

“(f) for the benefit of the Lender Parties, the amount of any [***], as an when such amount is required to be deposited into the [***] pursuant to Section 6.30 of the Credit Agreement and (g) the amount of any filing fees and service fees incurred by the Borrower to make any fixture filings required to be made pursuant to Section 6.31 or Section 6.32 of the Credit Agreement (all such obligations set forth in subclauses (a) through (g), collectively defined as the “Guaranteed Obligations”).”
2.    New Section 4.07. Article IV of the Guaranty is hereby amended by inserting the following as a new Section 4.07:
[***]. Guarantor shall promptly, but in no event later than three (3) Business Days after the earlier of its or any Subsidiary’s receipt or Knowledge thereof, deliver, or cause to be delivered, to the Administrative Agent, notice of any expiration or termination of, or default or event of default under, the [***].”

CPAM: 33360649.11


III.    Conditions Precedent to Effectiveness. The amendments contained in Article I and Article II shall not be effective until the date (such date, the “Amendment Effective Date”) that:
1.    the Administrative Agent shall have received copies of this Amendment executed by the Borrower, the Sponsor and the Required Lenders, and acknowledged by the Administrative Agent;
2.    the Borrower shall have paid (or caused to be paid) (i) to the Administrative Agent, for its own account, a nonrefundable administrative agency fee for work in connection with the negotiation and execution of this Amendment and (ii) to each of the undersigned Lenders, a nonrefundable approval fee in an amount equal to 0.05% of such Lender’s Commitment under the Credit Agreement; and
3.    the Borrower shall have paid all other fees, costs and expenses of the Administrative Agent and the Lenders incurred in connection with the execution and delivery of this Amendment (including third-party fees and out-of-pocket expenses of the Lenders’ counsel and other advisors or consultants retained by the Administrative Agent).
IV.    Representations and Warranties. Each of the Borrower and, as applicable, the Sponsor represents and warrants to each Agent and each Lender Party that the following statements are true, correct and complete in all respects as of the Amendment Effective Date:
1.    Power and Authority; Authorization. Each of the Borrower and the Sponsor has all requisite power and authority to execute, deliver and perform its obligations under this Amendment and the Borrower has all requisite power and authority to perform its obligations under the Amended Credit Agreement and the Sponsor has all requisite power and authority to perform its obligations under the Amended Guaranty. Each of the Borrower and the Sponsor has duly authorized, executed and delivered this Amendment.
2.    Enforceability. Each of this Amendment and the Amended Credit Agreement is a legal, valid and binding obligation of the Borrower, enforceable against the Borrower in accordance with its terms, except to the extent that enforceability may be limited by (i) applicable bankruptcy, insolvency, moratorium, reorganization or other similar laws affecting the enforcement of creditors’ rights, (ii) the effect of general equitable principles (regardless of whether such enforceability is considered in a proceeding in equity or at law) or (iii) implied covenants of good faith and fair dealing. Each of this Amendment and the Amended Guaranty is a legal, valid and binding obligation of the Sponsor, enforceable against the Sponsor in accordance with its terms, except to the extent that enforceability may be limited by (i) applicable bankruptcy, insolvency, moratorium, reorganization or other similar laws affecting the enforcement of creditors’ rights, (ii) the effect of general equitable principles (regardless of whether such enforceability is considered in a proceeding in equity or at law) or (iii) implied covenants of good faith and fair dealing.
3.    Credit Agreement and Guaranty Representations and Warranties. Each of the representations and warranties set forth in the Credit Agreement (with respect to the Borrower) and the Guaranty (with respect to the Sponsor) is true and correct in all respects both before and after giving effect to this Amendment, except to the extent that any such representation and warranty

CPAM: 33360649.11


relates solely to any earlier date, in which case such representation and warranty is true and correct in all respects as of such earlier date.
4.    Defaults. No event has occurred or is continuing as of the date hereof, or will result from the transactions contemplated hereby as of the date hereof, that would constitute an Event of Default or a Default.
V.    Limited Amendment. Except as expressly set forth herein, this Amendment shall not, by implication or otherwise, limit, impair, constitute a waiver of or otherwise affect the rights and remedies of the Lenders or the other Secured Parties under the Credit Agreement or any other Loan Document, and shall not alter, modify, amend or in any way affect any of the terms, conditions, obligations, covenants or agreements contained in the Credit Agreement or any other provision of the Credit Agreement or any other Loan Document, and each of the Borrower and the Sponsor acknowledges and agrees that each of the Loan Documents to which it is a party or otherwise bound shall continue in full force and effect and that all of its obligations thereunder shall be valid and enforceable and shall not be impaired or limited by the execution or effectiveness of this Amendment. From and after the Amendment Effective Date, all references to (i) the Credit Agreement in any Loan Document shall, unless expressly provided otherwise, refer to the Amended Credit Agreement and (ii) the Guaranty in any Loan Document shall, unless expressly provided otherwise, refer to the Amended Guaranty.
VI.    Miscellaneous.
1.    Counterparts. This Amendment may be executed in one or more duplicate counterparts and by facsimile or other electronic delivery and by different parties on different counterparts, each of which shall constitute an original, but all of which shall constitute a single document and when signed by all of the parties listed below shall constitute a single binding document.
2.    Severability. In case any one or more of the provisions contained in this Amendment should be invalid, illegal or unenforceable in any respect, the validity, legality and enforceability of the remaining provisions shall not in any way be affected or impaired thereby, and the parties hereto shall enter into good faith negotiations to replace the invalid, illegal or unenforceable provision.
3.    Governing Law, etc.. THIS AMENDMENT SHALL BE GOVERNED BY, AND CONSTRUED UNDER, THE LAWS OF THE STATE OF NEW YORK. The provisions in Sections 12.08(b) through (d) and Section 12.09 of the Amended Credit Agreement shall apply, mutatis mutandis, to this Amendment and the parties hereto.
4.    Loan Document. This Amendment shall be deemed to be a Loan Document for all purposes of the Amended Credit Agreement and each other Loan Document.
5.    Headings. Paragraph headings have been inserted in this Amendment as a matter of convenience for reference only and it is agreed that such paragraph headings are not a part of this Amendment and shall not be used in the interpretation of any provision of this Amendment.

CPAM: 33360649.11


6.    Execution of Documents. The undersigned Lenders hereby authorize and instruct the Administrative Agent to execute and deliver this Amendment.
[Signature Pages Follow]


CPAM: 33360649.11


IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be duly executed and delivered by their duly authorized officers as of the day and year first above written.
SUNRUN HERA PORTFOLIO 2015-A, LLC,
as Borrower
By:    Sunrun Hera Portfolio 2015-B, LLC
Its:    Sole Member
By:    Sunrun Hera Holdco 2015, LLC
Its:    Sole Member
By:    Sunrun Inc.
Its:    Sole Member

By:    /s/ Robert Komin, Jr.    
Name: Robert Komin, Jr.
Title: Chief Financial Officer

SUNRUN INC.,
as Guarantor

By:    /s/ Robert Komin, Jr.    
Name: Robert Komin, Jr.
Title: Chief Financial Officer


[Signature Page to Sixth Amendment (2nd A&R AF Credit Agreement)]




INVESTEC BANK PLC,
as Administrative Agent

By:    /s/ Andrew Neill    
Name: Andrew Neill
Title: Authorised Signatory

By:    /s/ James Haggie    
Name: James Haggie
Title: Authorised Signatory


[Signature Page to Sixth Amendment (2nd A&R AF Credit Agreement)]


INVESTEC BANK PLC,
as Issuing Bank

By:    /s/ Andrew Neill    
Name: Andrew Neill
Title: Authorised Signatory

By:    /s/ James Haggie    
Name: James Haggie
Title: Authorised Signatory

[Signature Page to Sixth Amendment (2nd A&R AF Credit Agreement)]



INVESTEC BANK PLC,
as Lender

By:    /s/ Andrew Neill    
Name: Andrew Neill
Title: Authorised Signatory

By:    /s/ James Haggie    
Name: James Haggie
Title: Authorised Signatory


[Signature Page to Sixth Amendment (2nd A&R AF Credit Agreement)]



SUNRUN GAIA PORTFOLIO 2016-A, LLC,
as Lender
By:    Sunrun Gaia Holdco 2016, LLC
Its:    Sole Member
By:    Sunrun Inc.
Its:    Sole Member

By:    /s/ Robert Komin, Jr.    
Name: Robert Komin, Jr.
Title: Chief Financial Officer

[Signature Page to Sixth Amendment (2nd A&R AF Credit Agreement)]



ABN AMRO CAPITAL USA LLC,
as Lender

By:    /s/ Paul Snow    
Name: Paul Snow
Title: Director

By:    /s/ Remco Jongkind    
Name: Remco Jongkind
Title: Managing Director



[Signature Page to Sixth Amendment (2nd A&R AF Credit Agreement)]



EAST WEST BANK,
as Lender

By:    /s/ Christopher Simeone    
Name: Christopher Simeone
Title: First Vice President


[Signature Page to Sixth Amendment (2nd A&R AF Credit Agreement)]



ING CAPITAL LLC,
as Lender

By:    /s/ Thomas Cantello    
Name: Thomas Cantello
Title: Managing Director

By:    /s/ Stefano Palombo    
Name: Stefano Palombo
Title: Vice President


[Signature Page to Sixth Amendment (2nd A&R AF Credit Agreement)]



KEYBANK NATIONAL ASSOCIATION,
as Lender

By:    /s/ Lisa A. Ryder    
Name: Lisa A. Ryder
Title: Senior Vice President

[Signature Page to Sixth Amendment (2nd A&R AF Credit Agreement)]



SUNTRUST BANK,
as Lender

By:    /s/ Nina Johnson    
Name: Nina Johnson
Title: Director




[Signature Page to Sixth Amendment (2nd A&R AF Credit Agreement)]