EX-4 2 exhibit451.htm EXHIBIT 4.5.1 Exhibit 4.5.1

EXECUTION


GSR MORTGAGE LOAN TRUST 2005-AR6

MORTGAGE PASS-THROUGH CERTIFICATES

SERIES 2005-AR6

MASTER SERVICING


and


TRUST AGREEMENT

among

GS MORTGAGE SECURITIES CORP.,

as Depositor,

U.S. BANK NATIONAL ASSOCIATION,

as Trustee,

and

WELLS FARGO BANK, N.A.,

as Securities Administrator, Master Servicer and Custodian

Dated as of September 1, 2005








TABLE OF CONTENTS

Page


ARTICLE I DEFINITIONS

3


Section 1.01

Standard Terms

3

Section 1.02

Defined Terms

4


ARTICLE II FORMATION OF TRUST; CONVEYANCE OF MORTGAGE LOANS

16


Section 2.01

Conveyance to the Trustee

16

Section 2.02

Acceptance by the Trustee

17

Section 2.03

REMIC Elections and REMIC Designation.

17


ARTICLE III REMITTING TO CERTIFICATEHOLDERS

20


Section 3.01

Distributions to Certificateholders

20

Section 3.02

Allocation of Realized Losses and Shortfalls

24

Section 3.03

Crossover Amounts.

25


ARTICLE IV THE SECURITIES

26


Section 4.01

The Certificates

26

Section 4.02

Denominations

26

Section 4.03

Redemption of Certificates

26

Section 4.04

Securities Laws Restrictions

27


ARTICLE V MISCELLANEOUS PROVISIONS

27


Section 5.01

Request for Opinions

27

Section 5.02

Schedules and Exhibits

27

Section 5.03

Governing Law

27

Section 5.04

Counterparts

27

Section 5.05

Notices

28


SCHEDULES AND EXHIBITS

Schedule I

Mortgage Loans


Exhibit 1A1

Form of Class 1A1 Certificate

Exhibit 1A2

Form of Class 1A2 Certificate

Exhibit 1A3

Form of Class 1A3 Certificate

Exhibit 1A4

Form of Class 1A4 Certificate

Exhibit 2A1

Form of Class 2A1 Certificate

Exhibit 2A2

Form of Class 2A2 Certificate

Exhibit 3A1

Form of Class 3A1 Certificate

Exhibit 3A2

Form of Class 3A2 Certificate

Exhibit 4A1

Form of Class 4A1 Certificate

Exhibit 4A2

Form of Class 4A2 Certificate

Exhibit 4A3

Form of Class 4A3 Certificate

Exhibit 4A4

Form of Class 4A4 Certificate

Exhibit 4A5

Form of Class 4A5 Certificate

Exhibit B1

Form of Class B1 Certificate

Exhibit B2

Form of Class B2 Certificate

Exhibit B3

Form of Class B3 Certificate

Exhibit B4

Form of Class B4 Certificate

Exhibit B5

Form of Class B5 Certificate

Exhibit B6

Form of Class B6 Certificate

Exhibit R1

Forms of Class R1 Certificates

Exhibit R2

Forms of Class R2 Certificates








MASTER SERVICING AND TRUST AGREEMENT

THIS MASTER SERVICING AND TRUST AGREEMENT dated as of September 1, 2005 (this “Trust Agreement”), is hereby executed by and among GS MORTGAGE SECURITIES CORP., a Delaware corporation (the “Depositor”), U.S. BANK NATIONAL ASSOCIATION, as trustee (the “Trustee”) and WELLS FARGO BANK, N.A., as securities administrator (in such capacity, the “Securities Administrator”), master servicer (in such capacity, the “Master Servicer”) and custodian (in such capacity, the “Custodian”).

PRELIMINARY STATEMENT

WHEREAS, the Depositor is duly authorized to form GSR Mortgage Loan Trust 2005-AR6 as a trust (the “Trust”) to issue a series of securities with an aggregate initial outstanding principal balance of $2,802,084,865 to be known as the Mortgage Pass-Through Certificates, Series 2005-AR6 (the “Certificates”).  The Trust is formed by this Trust Agreement, which fully incorporates by reference the Standard Terms to Master Servicing and Trust Agreement September 2005 Edition (the “Standard Terms”).  The Certificates in the aggregate evidence the entire beneficial ownership in the Trust.  The Certificates consist of the 18 Classes of publicly offered certificates and 3 Classes of privately placed certificates set forth in Section 2.03(b) herein.

WHEREAS, pursuant to Section 11.01 of the Standard Terms, the Securities Administrator, on behalf of the Trust, will make an election to treat all of the assets of the Trust  as two real estate mortgage investment conduits (each, a “REMIC” and, individually, “REMIC I” and “REMIC II”) for federal income tax purposes.  The “startup day” of each REMIC for purposes of the REMIC Provisions is the Closing Date.

NOW, THEREFORE, in consideration of the mutual promises, covenants, representations and warranties hereinafter set forth, the Depositor, the Trustee, the Custodian, the Securities Administrator and the Master Servicer agree as follows:

ARTICLE I

DEFINITIONS

Section 1.01

Standard Terms.  The Depositor, the Trustee, the Custodian, the Securities Administrator and the Master Servicer acknowledge that the Standard Terms prescribe certain obligations of each such entity, with respect to the Certificates.  The Depositor, the Trustee, the Securities Administrator, the Custodian and the Master Servicer agree to observe and perform such prescribed duties, responsibilities and obligations, pursuant to the terms and conditions thereof and of this Trust Agreement, and acknowledge that, except to the extent inconsistent with the provisions of this Trust Agreement, the Standard Terms are and shall be a part of this Trust Agreement to the same extent as if set forth herein in full.

Pursuant to Section 2.02(f) of the Standard Terms, the Depositor acknowledges the appointment of the Custodian and agrees to deliver, or cause to be delivered, to the Custodian the applicable Mortgage Loan documents that are to be included in the respective Trustee Mortgage Loan File for each Mortgage Loan.  The Depositor and the Custodian acknowledge that, pursuant to any existing Custodial Agreement entered into between the Custodian and predecessors in interest of the Depositor, such Custodian previously acted as custodian for such predecessors in interest and that in connection with the formation of the Trust, the Depositor shall assign each such Custodial Agreement to the Trustee and cause a receipt to be issued in the name of the Trustee.

Section 1.02

Defined Terms.  Capitalized terms used but not defined herein shall have the respective meanings assigned to them in Section 1.01 of the Standard Terms or in the Sale and Servicing Agreement.  In the event of a conflict between the Standard Terms and the Sale and Servicing Agreement, the Sale and Servicing Agreement shall govern.  In the event of a conflict between the Standard Terms and this Trust Agreement, the Trust Agreement shall govern.  As used herein, the following terms shall have the respective meanings assigned thereto:

Accrued Certificate Interest”:  For each Class of Certificates and any Distribution Date, the sum of (i) previously accrued Certificate Interest for such Class that remained unpaid on the previous Distribution Date (on a cumulative basis) and (ii) accrued Certificate Interest for such Class for the related Interest Accrual Period.  Accrued Certificate Interest may be reduced for certain interest shortfalls, as further set forth in Section 3.02.

Administrative Cost Rate”:  For each Mortgage Loan, the applicable Servicing Fee Rate plus the Lender Paid Mortgage Insurance Rate, if applicable.

Affected Senior Certificate”: As defined in Section 3.03 hereof.

Affected Subordinate Certificate”:  As defined in Section 3.01(f) hereof.

Apportioned Principal Balance”:  For any Class of Subordinate Certificates and any Distribution Date, the Class Principal Balance of such Class immediately prior to such Distribution Date multiplied by a fraction, the numerator of which is the related Group Subordinate Amount for such date and the denominator of which is the sum of the Group Subordinate Amounts for such date.

Assignment Agreements”:  Each of the Step 1 Assignment Agreement and the Step 2 Assignment Agreement, collectively.

Available Distribution Amount”:  For any Distribution Date and any Loan Group, the sum for the Mortgage Loans in such Loan Group of the following amounts:

(1)

the total amount of all cash received from or on behalf of the Borrowers or advanced by the Servicer (or the Master Servicer as successor servicer in the event the Servicer fails to make such required advances, or by the Trustee as successor master servicer in the event the Master Servicer fails to make any such required advances, in each case pursuant to Section 3.05 of the Standard Terms) on the Mortgage Loans in such Loan Group and not previously distributed (including Advances made by the Servicer (or the Master Servicer as successor servicer in the event the Servicer fails to make any such required advances or the Trustee as successor master servicer, or by another successor servicer, in the event the Master Servicer fails to make any such required advances, in each case pursuant to Section 3.05 of the Standard Terms), Compensating Interest Payments made by such Servicer (or the Master Servicer or the Trustee as successor Master Servicer, as the case may be) and proceeds of Mortgage Loans that are liquidated), except:

(a)

all Scheduled Payments collected but due on a Due Date after that Distribution Date;

(b)

all Curtailments received after the previous calendar month;

(c)

all Payoffs received after the previous calendar month (together with any interest payment received with those Payoffs to the extent that it represents the payment of interest accrued on the Mortgage Loans for the period after the previous calendar month);

(d)

Liquidation Proceeds and Insurance Proceeds received on the Mortgage Loans in such Loan Group after the previous calendar month;

(e)

all amounts in the REMIC I Distribution Account from Mortgage Loans in the related Loan Groups that are then due and payable to the Servicer under the Sale and Servicing Agreement;

(f)

the Servicing Fee and the Lender Fee Paid Mortgage Insurance Amount for each Mortgage Loan in such Loan Group, net of any amounts payable as compensating interest by the Servicer on that Distribution Date;

(g)

any Crossover Amount from such Loan Group required to be allocated to any other Loan Group pursuant to Section 3.03; and

(h)

such Loan Group’s share of all amounts reimbursable on such Distribution Date to the Master Servicer, Securities Administrator and Trustee as provided herein.

(2)

the total amount of any cash received by the Securities Administrator or the Servicer (or the Master Servicer or the Trustee) from the repurchase by the Seller, the Depositor or GSMC of any Mortgage Loans pursuant to any Assignment Agreement or the Sale and Servicing Agreement, together with any Substitution Adjustment Amount received by the Securities Administrator in connection with the substitution by the Depositor of a Qualified Substitute Mortgage Loan for a Deleted Mortgage Loan pursuant to Section 2.03 of the Standard Terms to this Trust Agreement, in each case as a result of defective documentation or breach of representations and warranties (provided that the obligation to repurchase arose before the related Due Date);

(3)

any Crossover Amount from any other Loan Group required to be allocated to such Loan Group pursuant to Section 3.03; and

(4)

any Subsequent Recoveries received with respect to the Mortgage Loans in such Loan Group.

Bankruptcy Coverage”: For any Distribution Date, an amount equal to the greater of (i) (x) $350,977.67 or such lesser amount as may be determined by the Depositor from time to time upon written confirmation from each Rating Agency that the use of such lesser amount will not adversely affect the then current ratings assigned to any Class of Certificates by such Rating Agency, minus (y) the aggregate amount of Bankruptcy Losses allocated to the Certificates on or prior to such date and (ii) zero.

Book-Entry Certificates”:  The Senior Certificates and the Senior Subordinate Certificates.

Certificate Interest”:  For each Class of Certificates, on each Distribution Date, an amount equal to the product of (a) the Certificate Rate for such Class, (b) a fraction, the numerator of which is 30 and the denominator of which is 360, and (c) the applicable Class Principal Balance.

Certificate Rate”:  With respect to each Class of Certificates on any Distribution Date, the percentage per annum rate or other entitlement to interest described in Section 2.03 hereof.

Certificates”:  The Class 1A1, Class 1A2, Class 1A3, Class 1A4, Class 2A1, Class 2A2, Class 3A1, Class 3A2, Class 4A1, Class 4A2, Class 4A3, Class 4A4, Class 4A5, Class B1, Class B2, Class B3, Class B4, Class B5, Class B6, Class R1 and Class R2 Certificates.

Class”:  Each class of Certificates or REMIC Interests.

Class B Certificates”:  The Class B1, Class B2, Class B3, Class B4, Class B5 and Class B6 Certificates.

Class I Interests”:  The Class I-1B, Class I-1Q, Class I-2B, Class I-2Q, Class I-3B, Class I-3Q, Class I-4B and Class I-4Q Interests, each of which shall constitute a class of regular interests in REMIC I.

Class II Interests”:  The Class 1A1, Class 1A2, Class 1A3, Class 1A4, Class 2A1, Class 2A2, Class 3A1, Class 3A2, Class 4A1, Class 4A2, Class 4A3, Class 4A4 and Class 4A5 Certificates, and each Class B Certificate, each of which shall constitute a class of regular interests in REMIC II.

Class Principal Balance”:  With respect to each Class of Certificates or Interests, as of the close of business on any Distribution Date, the initial balance of such Class of Certificates or Interests set forth in Section 2.03(b) reduced by (a) all principal payments (other than payments in reimbursement of Realized Losses) previously distributed to such Class of Certificates or Interests in accordance with the Trust Agreement, and (b) all Realized Losses, if any, previously allocated to such Class of Certificates or Interests pursuant to the Trust Agreement, and increased by (c) the amount of any Subsequent Recoveries allocated to that Class.

Class R1 Certificates”:  The Certificates constituting the sole class of “residual interest” (as defined in Code Section 860G(a)(2)) in REMIC II.

Class R2 Certificates”:  The Certificates constituting the sole class of “residual interest” (as defined in Code Section 860G(a)(2)) in REMIC I.

Closing Date”:  September 30, 2005.

CMT Rate”:  A rate determined based on the average weekly yield on U.S. Treasury securities adjusted to a constant maturity of one year as published in Federal Reserve Statistical Release H.15 (519) during the last full week occurring 45 days prior to the applicable loan adjustment date, and annually thereafter.

Crossover Amounts”:  Amounts related to a Loan Group that are required to be paid to the Senior Certificates related to another Loan Group pursuant to Section 3.03.

Curtailments”:  Voluntary partial prepayments on a Mortgage Loan (i.e., not including Payoffs, Liquidation Proceeds, Insurance Proceeds, or Condemnation Proceeds).

Custodial Agreement”:  The Custodial Agreement dated as of August 1, 2003, as amended by Amendment No. 1 thereto dated as of October 25, 2003, each between GSMC and the Custodian (as successor in interest to Wells Fargo Bank Minnesota, N.A.).

Custodian”:  Wells Fargo, in its capacity as custodian under the Custodial Agreement, and any successor Custodian thereunder.

Cut-Off Date”:  September 1, 2005.

Delinquency/Loss Test”:  A test that is satisfied on any Distribution Date if:  (A) the aggregate outstanding principal balance of the Mortgage Loans delinquent 60 days or  more (including Mortgage Loans in bankruptcy or foreclosure and REO Property) averaged over the immediately preceding three-month period is less than or equal to 50% of the aggregate outstanding Class Principal Balance of the Subordinate Certificates as of such Distribution Date and (B) cumulative Realized Losses as of each Distribution Date prior to October 2013, October 2014, October 2015 and October 2016 (and each October thereafter) do not exceed 30%, 35%, 40%, 45% and 50%, respectively, of the aggregate initial Class Principal Balance of the Subordinate Certificates.

Distribution Date”:  The 25th day of each month, or if such day is not a Business Day, the next Business Day following such day.  The initial Distribution Date shall be October 25, 2005.

DBRS”: Dominion Bond Rating Service, Inc., or any successor in interest.

Due Date”:  For any Mortgage Loan, the first day in each calendar month.

Due Period”:  With respect to each Distribution Date, the period beginning on the second day of the month preceding the month of such Distribution Date and ending on, and including, the first day of the month of such Distribution Date.

Excess Bankruptcy Losses”: For any Distribution Date, the amount of Bankruptcy Losses for such Distribution Date in excess of the Bankruptcy Coverage for such Distribution Date.

Excess Fraud Losses”: For any Distribution Date, the amount of Fraud Losses for such Distribution Date in excess of the Fraud Coverage for such Distribution Date.

Excess Special Hazard Losses”: For any Distribution Date, the amount of Special Hazard Losses for such Distribution Date in excess of the Special Hazard Coverage for such Distribution Date.

Excess Special Losses”: Collectively, Excess Fraud Losses, Excess Bankruptcy Losses and Excess Special Hazard Losses.

Fitch”:  Fitch Ratings, and its successors in interest.

Fraud Coverage”: For any Distribution Date, an amount equal to (i) the following percentage of the aggregate Scheduled Principal Balance of all Mortgage Loans as of the Due Date in the preceding calendar month (or, in the case of the first Distribution Date, as of the Cut-Off Date): (A) for the period from and including the Cut-Off Date to but excluding the date of the third anniversary of the Cut-Off Date, 1.00% and (B) for the period from and including the date of the third anniversary of the Cut-Off Date to but excluding the fifth anniversary of the Closing Date, 0.50%, minus (ii) the aggregate amount of Fraud Losses allocated to the Certificates on or prior to such Distribution Date. On the date of the fifth anniversary of the Cut-Off Date, and for each Distribution Date thereafter, the Fraud Coverage shall be zero.  In no event may the Fraud Coverage be less than zero.

Group 1 Certificates”:  The Class 1A1, Class 1A2, Class 1A3, Class 1A4, Class R1 and Class R2 Certificates.  The Group 1 Certificates are related to Loan Group 1.

Group 2 Certificates”:  The Class 2A1 and Class 2A2 Certificates.  The Group 2 Certificates are related to Loan Group 2.

Group 3 Certificates”:  The Class 3A1 and Class 3A2 Certificates.  The Group 3 Certificates are related to Loan Group 3.

Group 4 Certificates”:  The Class 4A1, Class 4A2, Class 4A3, Class 4A4 and Class 4A5 Certificates.  The Group 4 Certificates are related to Loan Group 4.

Group 1 Loans”:  The Mortgage Loans in Loan Group 1.

Group 2 Loans”:  The Mortgage Loans in Loan Group 2.

Group 3 Loans”:  The Mortgage Loans in Loan Group 3.

Group 4 Loans”:  The Mortgage Loans in Loan Group 4.

Group Subordinate Amount”:  As to any Distribution Date and (i) the Mortgage Loans in Loan Group 1, shall be equal to the excess of the aggregate Scheduled Principal Balance of the Mortgage Loans in Loan Group 1 for the preceding Distribution Date over the aggregate Class Principal Balance of the Group 1 Certificates after giving effect to distributions on that preceding Distribution Date; (ii) the Mortgage Loans in Loan Group 2, shall be equal to the excess of the aggregate Scheduled Principal Balance of the Mortgage Loans in Loan Group 2 for the preceding Distribution Date over the aggregate Class Principal Balance of the Group 2 Certificates after giving effect to distributions on that preceding Distribution Date; (iii) the Mortgage Loans in Loan Group 3, shall be equal to the excess of the aggregate Scheduled Principal Balance of the Mortgage Loans in Loan Group 3 for the preceding Distribution Date over the aggregate Class Principal Balance of the Group 3 Certificates after giving effect to distributions on that preceding Distribution Date; and (iv) the Mortgage Loans in Loan Group 4, shall be equal to the excess of the aggregate Scheduled Principal Balance of the Mortgage Loans in Loan Group 4 for the preceding Distribution Date over the aggregate Class Principal Balance of the Group 4 Certificates after giving effect to distributions on that preceding Distribution Date.

GSMC”:  Goldman Sachs Mortgage Company, a New York limited partnership, and its successors in interest.

Interest Accrual Period”:  For any Distribution Date and each Class of Certificates, the calendar month preceding the month in which such Distribution Date occurs, calculated on the basis of a 360-day year consisting of twelve thirty-day months.

Junior Subordinate Certificates”:  The Class B4, Class B5 and Class B6 Certificates.

Lender Paid Mortgage Insurance Amount”:  With respect to any Lender Paid Mortgage Insurance Loan, the interest portion of each Scheduled Payment that is paid by the related Borrower that will be used to pay the monthly premium of the “lender paid” primary insurance policy on such Lender Paid Mortgage Insurance Loan, which is calculated by multiplying the Scheduled Principal Balance as of the related date of determination on such Lender Paid Mortgage Insurance Loan by the applicable Lender Paid Mortgage Insurance Rate.

Lender Paid Mortgage Insurance Loan”:  Each of the Mortgage Loans identified on the Mortgage Loan Schedule as having a Lender Paid Mortgage Insurance Rate.

Lender Paid Mortgage Insurance Rate”:  With respect to any Lender Paid Mortgage Insurance Loan, a per annum rate equal to the percentage indicated on the Mortgage Loan Schedule under the heading “Lender Paid Mortgage Insurance Rate.”

Liquidated Mortgage Loan”:  A Mortgage Loan for which the Servicer has determined that it has received all amounts that it expects to recover from or on account of the Mortgage Loan, whether from Insurance Proceeds, Liquidation Proceeds, the liquidation of any assets pledged for the further security of such Mortgage Loan in addition to the Mortgaged Property or otherwise.

Liquidation Principal”:  For any Distribution Date, the principal portion of Liquidation Proceeds received with respect to each Mortgage Loan that became a Liquidated Mortgage Loan during the calendar month preceding the month of the Distribution Date.

Loan Group 1”:  The aggregate of the Mortgage Loans identified on Schedule I as being included in Loan Group 1.

Loan Group 2”:  The aggregate of the Mortgage Loans identified on Schedule I as being included in Loan Group 2.

Loan Group 3”:  The aggregate of the Mortgage Loans identified on Schedule I as being included in Loan Group 3.

Loan Group 4”:  The aggregate of the Mortgage Loans identified on Schedule I as being included in Loan Group 4.

Master Servicer”:  Wells Fargo Bank, N.A., its successors and assigns, including any successor master servicer.

Master Servicer Investment Period”:  With respect to any Master Servicer Remittance Date and the related amounts in the Master Servicer Account, the period commencing on the Business Day preceding such Distribution Date and ending on the Master Servicer Remittance Date.

Master Servicing Fee”:  With respect to any Master Servicer Remittance Date, all income and gain realized from the investment of funds in the Master Servicer Account.

Mortgage Loans”:  The mortgage loans listed on Schedule I hereto.

Net Rate”:  With respect to each Mortgage Loan, the interest rate of such Mortgage Loan less the Administrative Cost Rate applicable to such Mortgage Loan.  For purposes of calculating the Certificate Rates of the REMIC Interests and Certificates, the Net Rate of a Mortgage Loan shall be calculated without regard to any modification, waiver or amendment of the interest rate of the Mortgage Loan, whether agreed to by the Servicer or resulting from a bankruptcy, insolvency or similar proceeding involving the related Borrower.  Further, in the case of any Distribution Date and any Mortgage Loan that has a first payment date after the first day of the related Due Period, the Net Rate of such Mortgage Loan shall be treated as zero for purposes of calculating the Certificate Rates of the REMIC Interests and the Certificates.

Net WAC Rate”:  With respect to any Distribution Date and each Loan Group, the per annum rate equal to a fraction (i) the numerator of which is the sum, for each Mortgage Loan in such Loan Group, of the product of (x) the Net Rate in effect for such Mortgage Loan as of the beginning of the related Due Period and (y) the Scheduled Principal Balance of such Mortgage Loan as of the beginning of the related Due Period (after taking into account scheduled payments of principal on such date), and (ii) the denominator of which is the aggregate Scheduled Principal Balance of the Mortgage Loans in such Loan Group as of the beginning of the related Due Period.

Payoffs”:  Voluntary prepayments in full on a Mortgage Loan.

Prepayment Period”:  As to each Distribution Date, the preceding calendar month.

Principal Payment Amount”:  For any Distribution Date and any Loan Group, the sum, for all Mortgage Loans in such Loan Group, of the portion of Scheduled Payments due on the Due Date immediately before the Distribution Date that are allocable to principal on the Mortgage Loans in such Loan Group.

Principal Prepayment Amount”:  For any Distribution Date and any Loan Group, the sum, for all of the Mortgage Loans in such Loan Group, of all Payoffs and Curtailments that were received during the related Prepayment Period.

Rating Agency”:  As to each Class of Senior Certificates, S&P, Fitch and DBRS,  and as to the Class B1, Class B2, Class B3, Class B4 and Class B5 Certificates, S&P.

Record Date”:  For any Distribution Date and any Class of Certificates, the last Business Day of the related Interest Accrual Period.

Regular Certificates”:  The Senior Certificates and the Subordinate Certificates.

Regular Interests”:  The REMIC I Regular Interests or the Certificates (other than the Residual Certificates).

REMIC”:  REMIC I or REMIC II.

REMIC Interests”:  Each Class of Regular Interests and the Class R1 and Class R2 Certificates issued pursuant to Section 2.03.

REMIC I”:  One of the real estate mortgage investment conduits created in the Trust, the assets of which consist of the Loans and the REMIC I Distribution Account.  

REMIC I Regular Interests”:  The regular interests issued by REMIC I, consisting of the Class I Interests.

REMIC I Subordinated Balance Ratio”:  The ratio among the principal balances of the Class I-1B Interest, Class I-2B Interest, Class I-3B Interest and Class I-4B Interest equal to the ratio among the Group Subordinate Amounts for each of Loan Group 1, Loan Group 2, Loan Group 3 and Loan Group 4.

REMIC II”:  One of the real estate mortgage investment conduits created in the Trust, the assets of which consist of the Certificate Account and the REMIC I Regular Interests.

Remittance Date”:  The 18th day of each month, or if such day is not a Business Day, the business day immediately preceding such date, as set forth in the Sale and Servicing Agreement.

Residual Certificates”:  The Class R1 and Class R2 Certificates.

S&P”:  Standard & Poor’s Ratings Services, a division of The McGraw-Hill Companies, Inc., and its successors in interest.

Sale and Servicing Agreement”:  The Amended and Restated Master Seller’s Warranties and Servicing Agreement dated as of June 1, 2005, between GSMC and Wells Fargo.

Scheduled Payment”:  For each Mortgage Loan, payments of interest and principal scheduled to be paid on each Due Date in accordance with the terms of related Mortgage Note.

Securities Administrator”:  Wells Fargo Bank, N.A. in its capacity as Securities Administrator under this Trust Agreement, or its successor in interest in such capacity.

Securities Administrator Fee”:  With respect to any Distribution Date, all income and gain realized from the investment of funds in the Certificate Account during the period from and including the Distribution Date immediately preceding such Distribution Date, to but excluding such Distribution Date.

Seller”:  Wells Fargo.

Senior Certificates”:  Collectively, the Class 1A1, Class 1A2, Class 1A3, Class 1A4, Class 2A1, Class 2A2, Class 3A1, Class 3A2, Class 4A1, Class 4A2, Class 4A3, Class 4A4, Class 4A5, Class R1 and Class R2 Certificates.

Senior Liquidation Amount”:  For any Distribution Date and any Loan Group, shall equal the aggregate, for each Mortgage Loan in such Loan Group that became a Liquidated Mortgage Loan during the calendar month preceding the month of that Distribution Date, of the lesser of (i) the applicable Senior Percentage of the Scheduled Principal Balance of that Mortgage Loan and (ii) the applicable Senior Prepayment Percentage of the Liquidation Principal derived from such Mortgage Loan.

Senior Percentage”:  For any Distribution Date and any Loan Group, shall equal the lesser of (a) 100% and (b) the sum of the Class Principal Balances (immediately before the Distribution Date) of the Senior Certificates related to such Loan Group, divided by the aggregate Scheduled Principal Balance of the Mortgage Loans in such Loan Group as of the beginning of the Due Period related to such Distribution Date.

Senior Prepayment Amount”:  For any Distribution Date and any Loan Group, the product of (i) the applicable Senior Prepayment Percentage and (ii) the Principal Prepayment Amount for such Loan Group received during the related Prepayment Period.

Senior Prepayment Percentage”: For each Distribution Date and any Loan Group, the applicable Senior Percentage for such Distribution Date, plus the percentage of the Subordinate Percentage identified below for the period during which such Distribution Date occurs:


Distribution Date

Percent of Applicable

Subordinate Percentage

October 2005 through September 2012


100%

October 2012 through September 2013


70%

October 2013 through September 2014


60%

October 2014 through September 2015

.

40%

October 2015 through September 2016


20%

October 2016 and thereafter (other than the final Distribution Date)


0%

Final Distribution Date


100%

provided, however, that (i) on any Distribution Date, if the Senior Percentage for any Loan Group for such Distribution Date exceeds the initial Senior Percentage of such Loan Group as of the Closing Date, then the Senior Prepayment Percentage for each Loan Group and that Distribution Date shall equal 100%; (ii) if before the Distribution Date in October 2008, (x) the combined Subordinate Percentage for all four Loan Groups for such Distribution Date is greater than or equal to twice the combined Subordinate Percentage as of the Closing Date and (y) the aggregate amount of Realized Losses realized on the Mortgage Loans in all four Loan Groups is less than or equal to 20% of the initial aggregate Class Principal Balance of the Subordinate Certificates, then the Senior Prepayment Percentage for each Loan Group for such Distribution Date shall equal the Senior Percentage for such Loan Group plus 50% of the Subordinate Percentage for that Distribution Date; and (iii) if on or after the Distribution Date in October 2008, (x) the combined Subordinate Percentage for all four Loan Groups for such Distribution Date is greater than or equal to twice the combined Subordinate Percentage as of the Closing Date and (y) the aggregate amount of Realized Losses realized on the Mortgage Loans in all four Loan Groups is less than or equal to 30% of the initial aggregate Class Principal Balance of the Subordinate Certificates, then the Senior Prepayment Percentage for each Loan Group for such Distribution Date shall equal the Senior Percentage for such Loan Group for such Distribution Date; and provided, further, that if the Delinquency/Loss Test is not satisfied for any Loan Group as of the respective Distribution Date, the Subordinate Percentage for such Loan Group used to calculate the Senior Prepayment Percentage for the related Distribution Date shall equal 100%.  If on any Distribution Date the allocation to the Senior Certificates in the percentage required would reduce the sum of the Class Principal Balances of the Senior Certificates related to a Loan Group below zero, the Senior Prepayment Percentage for such Distribution Date and such Loan Group shall be limited to the percentage necessary to reduce such sum to zero.

Senior Principal Distribution Amount”:  For each Distribution Date and each Loan Group, the sum of: (i) the applicable Senior Percentage of the Principal Payment Amount for such Loan Group, (ii) the applicable Senior Prepayment Percentage of the Principal Prepayment Amount for such Loan Group, (iii) the Senior Liquidation Amount for such Loan Group, (iv) Crossover Amounts (allocable to principal), if any, received from the other Loan Groups and (v) the applicable Senior Prepayment Percentage of any Subsequent Recoveries, with respect to the Mortgage Loans in such Loan Group.

Senior Subordinate Certificates”:  The Class B1, Class B2 and Class B3 Certificates.

Senior Support Certificates”:  The Class 1A2, Class 2A2, Class 3A2 and Class 4A2 Certificates.

Servicer”:  Wells Fargo.

Servicing Fee”:  With respect to each Distribution Date and each Mortgage Loan, the aggregate amount payable to the Servicer with respect to such Mortgage Loan, which amount payable is equal to one-twelfth of the applicable Servicing Fee Rate multiplied by the Scheduled Principal Balance of such Mortgage Loan as of the beginning of the Due Period related to such Distribution Date.

Servicing Fee Rate”:  For each Mortgage Loan, the applicable per annum rate listed on the Mortgage Loan Schedule.

Special Hazard Coverage”: For each Distribution Date, an amount equal to the greater of (i) the greatest of (A) the aggregate Scheduled Principal Balance of Mortgage Loans related to Mortgaged Properties located in the single California zip code area with the largest aggregate Scheduled Principal Balance of related Mortgage Loans, (B) 1% of the aggregate Scheduled Principal Balance of Mortgage Loans and (C) twice the Scheduled Principal Balance of the largest single Mortgage Loan, in each case calculated as of the Due Date in the immediately preceding month (or, in the case of the first Distribution Date, as of the Cut-Off Date); and (ii) $29,473,260.50, minus (iii) the aggregate amount of Special Hazard Losses allocated to the Certificates on or prior to such Distribution Date; provided, however, that, in no event may the Special Hazard Coverage be less than zero.

Special Hazard Loss”:  Any loss on a Mortgage Loan resulting from (i) damage to the related Mortgaged Property caused by certain hazards (including earthquakes and, to a limited extent, tidal waves and related water damage) not insured against under the standard form of hazard insurance policy for the state in which the related Mortgaged Property is located or under a flood insurance policy if the Mortgaged Property is located in a federally designated flood area, or (ii) the application of the coinsurance clause contained in such hazard insurance policy; provided, however, that Special Hazard Losses shall not include losses caused by war, civil insurrection, action taken by governmental authority in hindering, combating or defending against an actual, impending or expected attack, errors in design, faulty workmanship or materials (unless the collapse of the property or a part thereof ensues, and then only the ensuing loss shall be considered a Special Hazard Loss), nuclear reaction, flood (if the Mortgaged Property is located in a federally designated flood area) and chemical contamination.

Special Losses”:  Bankruptcy Losses, Fraud Losses or Special Hazard Losses.

Standard Terms”:  The Standard Terms to Master Servicing and Trust Agreement September 2005 Edition, incorporated by reference in the Trust Agreement.

Step 1 Assignment Agreement”:  The Assignment, Assumption and Recognition Agreement dated as of September 1, 2005, among GSMC, as assignor, the Depositor, as assignee, and Wells Fargo, as seller and servicer.

Step 2 Assignment Agreement”:  The Assignment, Assumption and Recognition Agreement dated as of September 1, 2005, among the Depositor, as assignor, the Trustee, as assignee, and Wells Fargo, as seller and servicer, and as acknowledged by the Master Servicer.

Subordinate Certificates”:  The Class B Certificates.

Subordinate Percentage”:  For any Distribution Date and any Loan Group, (x) 100%, minus (y) the Senior Percentage for such Loan Group.

Subordinate Principal Distribution Amount”: For any Distribution Date and any Loan Group, (x) the sum, for such Loan Group, of the Principal Payment Amount, the Principal Prepayment Amount and the Liquidation Principal, minus (y) the Senior Principal Distribution Amount for such Loan Group, minus (z) Crossover Amounts, if any, allocable to principal paid to the Senior Certificates related to the other Loan Group.

Subordination Levels”:  With respect to any Class of Subordinate Certificates on any specified date, the percentage obtained by dividing the sum of the Class Principal Balances of all Classes of Subordinate Certificates that are subordinate to that Class by the sum of the Class Principal Balances of all Classes of Certificates as of such date, before giving effect to distributions and allocations of Realized Losses to the Certificates on such date.

Subsequent Recoveries”:  With respect to any Distribution Date and any Mortgage Loan, amounts received in respect of principal on such Mortgage Loan during the related Prepayment Period which have previously been allocated as a Realized Loss, Special Loss or Excess Special Loss to a Class of Certificates.

Super Senior Certificates”:  The Class 1A1, Class 1A3, Class 1A4, Class 2A1, Class 3A1 and Class 4A1 Certificates.

Trust Agreement”:  This Master Servicing and Trust Agreement dated as of September 1, 2005, which incorporates by reference the Standard Terms.  Any references in any documents required hereunder, including references in documents within the Trustee Mortgage Loan File, to a Trust Agreement dated as of September 1, 2005, shall be deemed to refer to this Trust Agreement.

Trust Estate”:  As defined in Section 2.01 hereof.

Trustee”:  U.S. Bank National Association, not in its individual capacity but solely as Trustee under this Trust Agreement, or its successor in interest in such capacity, or any successor trustee appointed as herein provided.

Wells Fargo”:  Wells Fargo Bank, N.A., or any successor in interest.

ARTICLE II


FORMATION OF TRUST; CONVEYANCE OF MORTGAGE LOANS

Section 2.01

Conveyance to the Trustee.  To provide for the distribution of the principal of and interest on the Certificates in accordance with their terms, all of the sums distributable under this Trust Agreement with respect to the Certificates and the performance of the covenants contained in this Trust Agreement, the Depositor hereby bargains, sells, conveys, assigns and transfers to the Trustee, in trust, without recourse and for the exclusive benefit of the Holders, all of the Depositor’s right, title and interest in and to any and all benefits accruing to the Depositor from:  (a) the Mortgage Loans listed on each of Schedule I hereto, the related Trustee Mortgage Loan Files, and all Scheduled Payments due thereon after the Cut-Off Date and all principal prepayments collected with respect to the Mortgage Loans and paid by a Borrower on or after the Cut-Off Date, and proceeds of the conversion, voluntary or involuntary, of the foregoing; (b) the Sale and Servicing Agreement (other than GSMC’s rights to indemnification thereunder, which were retained by GSMC under the Step 1 Assignment Agreement), as it relates to the Mortgage Loans; (c) the Custodial Agreement, as it relates to the Mortgage Loans; (d) the Assignment Agreements; (e) the REMIC I Distribution Account, the Master Servicer Account, the Certificate Account and the Collection Accounts, as they relate to the Mortgage Loans and (f) proceeds of all of the foregoing (including, without limitation, all amounts, other than investment earnings, from time to time held or invested in the Collection Account, the REMIC I Distribution Account and the Certificate Account, whether in the form of cash, instruments, securities or other property, all proceeds of any mortgage insurance, mortgage guarantees, hazard insurance, or title insurance policy relating to the Mortgage Loans, cash proceeds, accounts, accounts receivable, notes, drafts, acceptances, chattel paper, checks, deposit accounts, rights to payment of any and every kind, and other forms of obligations and receivables, which at any time constitute all or part or are included in the proceeds of any of the foregoing) to pay the Certificates as specified herein (items (a) through (f) above shall be collectively referred to herein as the “Trust Estate”).

The foregoing sale, transfer, assignment, set-over and conveyance does not and is not intended to result in the creation of an assumption by the Trustee of any obligation of the Depositor, the Seller or any other person in connection with the Mortgage Loans, the Sale and Servicing Agreement, the Assignment Agreements or under any agreement or instrument relating thereto except as specifically set forth herein.

It is agreed and understood by the Trustee and the Depositor that it is not intended that any mortgage loan be included in the Trust that is (i) a “High Cost Home Loan” as defined in the New Jersey Home Ownership Act effective November 27, 2003, (ii) a “High Cost Home Loan” as defined in the New Mexico Home Loan Protection Act effective January 1, 2004, (iii) a “High-Cost Home Mortgage Loan” as defined in the Massachusetts Predatory Home Loan Practices Act effective November 7, 2004, (iv) a “High Cost Home Loan” as defined in the Indiana Home Loan Practices Act effective January 1, 2005, or (v) a “High Cost Home Loan” as defined in the Illinois High Risk Home Loan Act effective January 1, 2004.

Section 2.02

Acceptance by the Trustee.  By its execution of this Trust Agreement, the Trustee acknowledges and declares that it holds and will hold or has agreed to hold (in each case through the Custodian) all documents delivered to any such person from time to time with respect to the Mortgage Loans and all assets included in the definition of “Trust Estate” herein in trust for the exclusive use and benefit of all present and future Holders.  The Trustee has not created and will not create, and no officer of the Trustee has any actual knowledge or has received actual notice of, any interest in the Trust Estate contrary to the interests created by the Trust Agreement.  The Trustee has not entered, nor intends to enter, into any subordination agreement or intercreditor agreement with respect to any asset included in the Trust Estate.  The Trustee is hereby directed to execute and deliver, solely in its capacity as Trustee, the Step 2 Assignment Agreement.

Section 2.03

REMIC Elections and REMIC Designation.  Elections shall be made by the Securities Administrator to treat the assets of the Trust Estate described in the definition of the term “REMIC I” and the assets of the Trust Estate described in the definition of the term “REMIC II” as two separate REMICs for federal income tax purposes.  The REMIC I Regular Interests shall constitute the regular interests in REMIC I and the Certificates (other than the Residual Certificates) shall constitute the regular interests in REMIC II.  REMIC I shall issue the Class R2 Certificates, which shall constitute the sole class of residual interests in REMIC I and REMIC II shall issue the Class R1 Certificates, which shall constitute the sole class of residual interests in REMIC II.   References in the Standard Terms to REMIC I and REMIC II shall be deemed, for purposes of this Trust Agreement, to refer to REMIC I and REMIC II referred to herein, as modified by this Trust Agreement.

(a)

REMIC I Designations.

The pass-through rate with respect to the Class I-1B Interest and Class I-1Q Interest shall be a per annum rate equal to the Net WAC Rate for Loan Group 1.  The pass-through rate with respect to the Class I-2B Interest and Class I-2Q Interest shall be a per annum rate equal to the Net WAC Rate for Loan Group 2.  The pass-through rate with respect to the Class I-3B Interest and Class I-3Q Interest shall be a per annum rate equal to the Net WAC Rate for Loan Group 3.  The pass-through rate with respect to the Class I-4B Interest and Class I-4Q Interest shall be a per annum rate equal to the Net WAC Rate for Loan Group 4.

As of the Closing Date and any date of determination, (i) the principal balance of the Class I-1B Interest shall equal 0.10% of the Group Subordinate Amount for Loan Group 1 ; (ii) the principal balance of the Class I-2B Interest shall equal 0.10% of the Group Subordinate Amount for Loan Group 2; (iii) the principal balance of the Class I-3B Interest shall equal 0.10% of the Group Subordinate Amount for Loan Group 3; and (iv) the principal balance of the Class I-4B Interest shall equal 0.10% of the Group Subordinate Amount for Loan Group 4.

As of the Closing Date and any date of determination, (i) the principal balance of the Class I-1Q Interest shall equal the excess of the aggregate Scheduled Principal Balance of the Group 1 Loans as of the end of the related Prepayment Period (less $100 allocable to the Class R2 Certificates until paid pursuant to Section 3.01(a)(i)) over the principal balance of the Class I-1B Interest, (ii) the principal balance of the Class I-2Q Interest shall equal the excess of the aggregate Scheduled Principal Balance of the Group 2 Loans as of the end of the related Prepayment Period over the principal balance of the Class I-2B Interest, (iii) the principal balance of the Class I-3Q Interest shall equal the excess of the aggregate Scheduled Principal Balance of the Group 3 Loans as of the end of the related Prepayment Period over the principal balance of the Class I-3B Interest and (iv) the principal balance of the Class I-4Q Interest shall equal the excess of the aggregate Scheduled Principal Balance of the Group 4 Loans as of the end of the related Prepayment Period over the principal balance of the Class I-4B Interest.

On each Distribution Date, prior to distributions on the Certificates as provided in Section 3.01(a):  (i) the Available Distribution Amount (without regard to clause (1)(g) of the definition thereof) from Loan Group 1 (other than amounts paid to the Class R2 Certificates pursuant to Section 3.01) shall be deemed distributed to the Class I-1B Interest and Class I-1Q Interest, (ii) the Available Distribution Amount (without regard to clause (1)(g) of the definition thereof) from Loan Group 2 shall be deemed distributed to the Class I-2B Interest and Class I-2Q Interest, (iii) the Available Distribution Amount (without regard to clause (1)(g) of the definition thereof) from Loan Group 3 shall be deemed distributed to the Class I-3B Interest and Class I-3Q Interest and (iv) the Available Distribution Amount (without regard to clause (1)(g) of the definition thereof) from Loan Group 4 shall be deemed distributed to the Class I-4B Interest and Class I-4Q Interest.

Distributions of principal shall be made, and Realized Losses shall be allocated:

(i) first, to the Class I-1B Interest, Class I-2B Interest, Class I-3B Interest and Class I-4B Interest, each from the related Loan Group, so that their respective principal balances (computed to at least eight decimal places) are equal to (A) 0.10% of the Group Subordinate Amount for Loan Group 1, (B) 0.10% of the Group Subordinate Amount for Loan Group 2, (C) 0.10% of the Group Subordinate Amount for Loan Group 3 and (D) 0.10% of the Group Subordinate Amount for Loan Group 4 (except that if any such amount is a larger number than in the preceding distribution period, the least amount of principal shall be distributed or losses shall be allocated to the Class I-1B Interest, Class I-2B Interest, Class I-3B Interest and Class I-4B Interest, as applicable, such that the REMIC I Subordinated Balance Ratio is maintained); and

(ii) second, any remaining amounts of principal shall be distributed and losses shall be allocated from the related Loan Group to the Class I-1Q Interest, Class I-2Q Interest, Class I-3Q Interest and Class I-4Q Interest, respectively.

(b)

REMIC II Designations.  The Trust shall issue each of the following Classes of Certificates, each of which shall have the following Certificate Rates and initial Class Principal Balances and shall evidence ownership of a regular interest in REMIC II except to the extent provided below:

Class of Certificates

Initial Class Principal Balance

Initial Certificate Rate

Class 1A1

$   559,193,000

4.548%(1)

Class 1A2

$     22,634,000

4.548%(1)

Class 1A3

$     60,000,000

4.548%(1)

Class 1A4

$     90,000,000

4.548%(1)

Class 2A1

$1,068,165,000

4.541%(2)

Class 2A2

$     96,015,000

4.541%(2)

Class 3A1

$   398,180,000

4.559%(3)

Class 3A2

$     12,708,000

4.559%(3)

Class 4A1

$   125,000,000

4.556%(4)

Class 4A2

$       6,081,000

4.556%(4)

Class 4A3

$   175,492,000

4.556%(4)

Class 4A4

$     34,552,000

4.556%(4)

Class 4A5

$     70,000,000

4.556%(4)

Class B1

$     53,241,000

4.548%(5)

Class B2

$     14,010,000

4.548%(5)

Class B3

$       5,604,000

4.548%(5)

Class B4

$       4,203,000

4.548%(5)

Class B5

$       4,203,000

4.548%(5)

Class B6

$       2,803,665

4.548%(5)

Class R1

$                 100

4.548%(6)

Class R2

$                 100

4.548%(6)


(1)

For each Distribution Date, the Certificate Rate for the Class 1A1, Class 1A2, Class 1A3 and Class 1A4 Certificates shall equal a per annum rate equal to the Net WAC Rate for Loan Group 1.

(2)

For each Distribution Date the Certificate Rate for the Class 2A1 and Class 2A2 Certificates shall equal a per annum rate equal to the Net WAC Rate for Loan Group 2.

(3)

For each Distribution Date the Certificate Rate for the Class 3A1 and Class 3A2 Certificates shall equal a per annum rate equal to the Net WAC Rate for Loan Group 3.

(4)

For each Distribution Date, the Certificate Rate for the Class 4A1, Class 4A2, Class 4A3, Class 4A4 and Class 4A5 Certificates shall equal a per annum rate equal to the Net WAC Rate for Loan Group 4.

 (5)

For each Distribution Date, the Certificate Rate for the Class B1, Class B2, Class B3, Class B4, Class B5 and Class B6 Certificates shall equal a per annum rate equal to the weighted average of the Net WAC Rates for Loan Group 1, Loan Group 2, Loan Group 3 and Loan Group 4, weighted on the basis of the related Group Subordinate Amounts.

 (6)

For each Distribution Date, the Certificate Rate for the Class R1 and Class R2 Certificates shall equal a per annum rate equal to the Net WAC Rate for Loan Group 1.  The Class R1 Certificates represent the residual interest in REMIC II and the Class R2 Certificate represent the residual interest in REMIC I.

(c)

REMIC Final Scheduled Distribution.  The “latest possible maturity date” for each REMIC and each Class of Certificates and REMIC Regular Interests is the 36th Distribution Date following the latest stated maturity date of any Mortgage Loan included in the Trust as of the Closing Date.

ARTICLE III


REMITTING TO CERTIFICATEHOLDERS

Section 3.01

Distributions to Certificateholders.

(a)

Distributions.  In accordance with Section 3.01(d) of the Standard Terms and subject to the exceptions set forth below, on each Distribution Date, the Securities Administrator shall withdraw the aggregate Available Distribution Amount (less any amounts withdrawn pursuant to Section 3.01(a)(iv) of the Standard Terms) for Loan Group 1, Loan Group 2, Loan Group 3 and Loan Group 4 and shall distribute it in the following manner and order of priority:

(i)

the Available Distribution Amount for Loan Group 1 shall be distributed in the following order of priority:

(1)

first, pro rata (based on their respective Accrued Certificate Interest), to the Class R1, Class R2, Class 1A1, Class 1A2, Class 1A3 and Class 1A4 Certificates, Accrued Certificate Interest thereon;

(2)

second, pro rata, to the Class R1 and Class R2 Certificates (based on their respective Class Principal Balances), as principal, in an amount up to the Senior Principal Distribution Amount for Loan Group 1 for such Distribution Date, until the Class Principal Balance of each such class is reduced to zero; and

(3)

third, to the Class 1A1, Class 1A2, Class 1A3 and Class 1A4 Certificates, as principal, in an amount up to the Senior Principal Distribution Amount for Loan Group 1 for such Distribution Date, pro rata, to the Class 1A1, Class 1A2 and, as a group for application as described below, the Class 1A3 and Class 1A4 Certificates (based on their respective aggregate Class Principal Balances), until the Class Principal Balance of each such class has been reduced to zero; provided that such amount distributed to the Class 1A3 and Class 1A4 Certificates shall be distributed:

(A)

first, to the Class 1A3 Certificates, until the Class Principal Balance of such Class has been reduced to zero; and

(B)

second, to the Class 1A4 Certificates, until the Class Principal Balance of such Class has been reduced to zero;

(ii)

the Available Distribution Amount for Loan Group 2 shall be distributed in the following order of priority:

(1)

first, pro rata (based on their respective Accrued Certificate Interest), to the Class 2A1 and Class 2A2 Certificates, Accrued Certificate Interest thereon; and

(2)

second, to the Class 2A1 and Class 2A2 Certificates, as principal, in an amount up to the Senior Principal Distribution Amount for Loan Group 2 for such Distribution Date, pro rata, to the Class 2A1 and Class 2A2 Certificates, until the Class Principal Balance of each such Class has been reduced to zero;

(iii)

the Available Distribution Amount for Loan Group 3 shall be distributed in the following order of priority:

(1)

first, pro rata (based on their respective Accrued Certificate Interest), to the Class 3A1 and Class 3A2 Certificates, Accrued Certificate Interest thereon; and

(2)

second, to the Class 3A1 and Class 3A2 Certificates, as principal, in an amount up to the Senior Principal Distribution Amount for Loan Group 3 for such Distribution Date, pro rata, to the Class 3A1 and Class 3A2 Certificates, until the Class Principal Balance of each such Class has been reduced to zero;

(iv)

the Available Distribution Amount for Loan Group 4 shall be distributed in the following order of priority:

(1)

first, pro rata (based on their respective Accrued Certificate Interest), to the Class 4A1, Class 4A2, Class 4A3, Class 4A4 and Class 4A5 Certificates, Accrued Certificate Interest thereon; and

(2)

second, to the Class 4A1, Class 4A2, Class 4A3, Class 4A4 and Class 4A5 Certificates, as principal, in an amount up to the Senior Principal Distribution Amount for Loan Group 4 for such Distribution Date, concurrently as follows:

(A)

approximately 31.8834904226209%, pro rata, to the Class 4A1 and Class 4A2 Certificates, until the Class Principal Balance of each such Class has been reduced to zero; and

(B)

approximately 68.1165095773791%, sequentially, to the Class 4A3, Class 4A4 and Class 4A5 Certificates, in that order, until the Class Principal Balance of each such Class has been reduced to zero;

(b)

Subject to the exceptions described below, unless the Class Principal Balance of a Class of Subordinate Certificates has been previously reduced to zero, the portion of the Available Distribution Amount for all of the Loan Groups in the aggregate remaining after making the distributions described above in paragraphs (a)(i) through (a)(iv)  shall be distributed in the following order of priority:

(i) first, to the Class B1 Certificates, Accrued Certificate Interest thereon;

(ii) second, to the Class B1 Certificates, as principal, their pro rata share (based on their Class Principal Balance) of the Subordinate Principal Distribution Amount for such Distribution Date, until their Class Principal Balance has been reduced to zero;

(iii) third, to the Class B2 Certificates, Accrued Certificate Interest thereon;

(iv) fourth, to the Class B2 Certificates, as principal, their pro rata share (based on their Class Principal Balance) of the Subordinate Principal Distribution Amount for such Distribution Date, until their Class Principal Balance has been reduced to zero;

(v) fifth, to the Class B3 Certificates, Accrued Certificate Interest thereon;

(vi) sixth, to the Class B3 Certificates, as principal, their pro rata share (based on their Class Principal Balance) of the Subordinate Principal Distribution Amount for such Distribution Date, until their Class Principal Balance has been reduced to zero;

(vii) seventh, to the Class B4 Certificates, Accrued Certificate Interest thereon;

(viii) eighth, to the Class B4 Certificates, as principal, their pro rata share (based on their Class Principal Balance) of the Subordinate Principal Distribution Amount for such Distribution Date, until their Class Principal Balance has been reduced to zero;

(ix) ninth, to the Class B5 Certificates, Accrued Certificate Interest thereon;

(x) tenth, to the Class B5 Certificates, as principal, their pro rata share (based on their Class Principal Balance) of the Subordinate Principal Distribution Amount for such Distribution Date, until their Class Principal Balance has been reduced to zero;

(xi) eleventh, to the Class B6 Certificates, Accrued Certificate Interest thereon;

(xii) twelfth, to the Class B6 Certificates, as principal, their pro rata share (based on their Class Principal Balance) of the Subordinate Principal Distribution Amount for such Distribution Date, until their Class Principal Balance has been reduced to zero; and

(xiii) thirteenth, to each Class of Certificates in order of seniority (and among Classes of Senior Certificates, pro rata, based on the amount of unreimbursed Realized Losses allocated to such Classes), up to the amount of unreimbursed Realized Losses previously allocated to that Class, if any (unless the allocation of Realized Losses has reduced any Class of Certificates to zero on a previous Distribution Date, in which case no amounts shall be reimbursed to that Class); provided, however, that any amounts distributed pursuant to this paragraph (b)(xiii) shall not cause a further reduction in the Class Principal Balance of any Class of Certificates.

(c)

At such time as all Classes of Certificates have been paid in full and all Realized Losses previously allocated have been reimbursed in full (unless the allocation of Realized Losses has reduced any Class of Certificates to zero on a previous Distribution Date, in which case, no amounts shall be reimbursed to that Class) all remaining amounts shall be distributed to the Class R2 Certificates to the extent attributable to REMIC I.

(d)

Notwithstanding the above, if the Subordination Level for any Class of Subordinate Certificates on any Distribution Date is less than the Subordination Level on the Closing Date for such Class of Certificates (such Class, the “Affected Subordinate Certificates”), the aggregate portion of the Principal Prepayment Amount otherwise payable on such Distribution Date to Classes of Subordinate Certificates shall be allocated as follows:

(i) pro rata (based on their respective Class Principal Balances) to each Class of Subordinate Certificates whose Subordination Level equals or exceeds its initial Subordination Level and the Class of Affected Subordinate Certificates having the lowest numerical designation, or

(ii) if no Class of Subordinate Certificates has a Subordination Level equal to or in excess of its initial Subordination Level, to the Class of Affected Subordinate Certificates having the lowest numerical designation up to an amount sufficient to restore its Subordination Level to its initial Subordination Level, and then to the related Class of Affected Subordinate Certificates having the next lowest numerical designation, in the same manner.

(e)

All distributions or allocations made with respect to each Class of Certificates on each Distribution Date shall be allocated pro rata among the outstanding Certificates of such Class based on the outstanding principal balance of each such Certificate.  Payment shall be made either (1) by check mailed to the address of each Certificateholder as it appears in the Certificate Register on the Record Date immediately prior to such Distribution Date or (2) with respect to the Regular Certificates, by wire transfer of immediately available funds to the account of a Holder at a bank or other entity having appropriate facilities therefor, if such Holder shall have so notified the Securities Administrator in writing by the Record Date immediately prior to such Distribution Date and such Holder is the registered owner of Regular Certificates with an initial principal amount of at least $1,000,000.  The Securities Administrator may charge the Holder a fee for any payment made by wire transfer.  Final distribution on the Certificates shall be made only upon surrender of the Certificates at the offices of the Certificate Registrar set forth in the notice of such final distribution.

(f)

In the event that the Mortgage Loans are purchased at the election of the Master Servicer pursuant to the terms of Section 4.03 hereof and Sections 10.02 and 10.03 of the Standard Terms, the Securities Administrator shall remit the amount of any Fair Market Value Excess by wire transfer of immediately available funds to the Holders of the Class R2 Certificates in accordance with the instructions of the Certificateholder.

(g)

Any amounts remaining in the Certificate Account on any Distribution Date after all allocations and distributions required to be made by this Trust Agreement have been made shall be paid to the Holders of the Class R1 Certificates to the extent attributable to REMIC II.

Section 3.02

Allocation of Realized Losses and Shortfalls.

(a)

Realized Losses.

(i) On each Distribution Date, Realized Losses and Special Losses (other than Excess Special Losses) realized during the prior calendar month shall be allocated to reduce the Class Principal Balances of the Subordinate Certificates in reverse numerical order, in each case until the Class Principal Balance of each such Class has been reduced to zero.  If the Class Principal Balances of the Subordinate Certificates have been reduced to zero, further Realized Losses and Special Losses shall be allocated to the Senior Certificates related to the Loan Group in which such Realized Losses or Special Losses occurred, based on the outstanding Class Principal Balances of such Senior Certificates, in each case until each such Class Principal Balance has been reduced to zero; provided, however, that Realized Losses (other than Excess Special Losses) otherwise allocable to the Class 1A1, Class 1A3 or Class 1A4 Certificates shall first be allocated to the Class 1A2 Certificates to reduce the Certificate Balance of such Class until such Certificate Balance has been reduced to zero, and thereafter such Realized Losses shall be allocated to the Class 1A1, Class 1A3 or Class 1A4 Certificates, as applicable, to reduce the Certificate Balance of such Class until such Certificate Balance has been reduced to zero; provided, further, that Realized Losses (other than Excess Special Losses) otherwise allocable to the Class 2A1 Certificates shall first be allocated to the Class 2A2 Certificates to reduce the Certificate Balance of such Class until such Certificate Balance has been reduced to zero, and thereafter such Realized Losses shall be allocated to the Class 2A1 Certificates to reduce the Certificate Balance of such Class until such Certificate Balance has been reduced to zero; provided, further, that Realized Losses (other than Excess Special Losses) otherwise allocable to the Class 3A1 Certificates shall first be allocated to the Class 3A2 Certificates to reduce the Certificate Balance of such Class until such Certificate Balance has been reduced to zero, and thereafter such Realized Losses shall be allocated to the Class 3A1 Certificates to reduce the Certificate Balance of such Class until such Certificate Balance has been reduced to zero; and provided, further, that Realized Losses (other than Excess Special Losses) otherwise allocable to the Class 4A1 Certificates shall first be allocated to the Class 4A2 Certificates to reduce the Certificate Balance of such Class until such Certificate Balance has been reduced to zero, and thereafter such Realized Losses shall be allocated to the Class 4A1 Certificates to reduce the Certificate Balance of such Class until such Certificate Balance has been reduced to zero.

(ii) On any Distribution Date, any Excess Special Losses realized during the prior calendar month shall be allocated, pro rata, to (x) all Classes of Senior Certificates related to the Loan Group in which such losses occurred and (y) the Subordinate Certificates, based on the aggregate Class Principal Balance of such Senior Certificates and the related Group Subordinate Amount of the Subordinate Certificates, respectively.

(iii) Whenever Realized Losses, Special Losses or Excess Special Losses are required to be allocated to a Class of Certificates, the Realized Loss, Special Loss or Excess Special Loss, as applicable, shall be allocated to Certificates of such Class of the related Loan Group or Loan Groups, as the case may be, based on their respective outstanding principal amounts.

(b)

Interest Shortfall.  Notwithstanding anything in the Standard Terms or this Trust Agreement to the contrary, on each Distribution Date, before any distributions are made on the Certificates, any Shortfall with respect to any Mortgage Loan shall be allocated to reduce the Accrued Certificate Interest on each Class of Senior Certificates related to the Loan Group of such Mortgage Loan and each Class of Subordinate Certificates pro rata, based on the amount of Accrued Certificate Interest otherwise owing to each such Class, in the case of the Senior Certificates, and the related Apportioned Principal Balance, in the case of the Subordinate Certificates, pursuant to clause (i) of the definition of Accrued Certificate Interest.

(c)

Modification Losses.  Notwithstanding anything in the Standard Terms or this Trust Agreement to the contrary, in the event that the Note Rate on a Mortgage Loan is reduced as a result of a modification, waiver or amendment of the terms of such Mortgage Loan, whether agreed to by the Servicer or resulting from a bankruptcy, insolvency or similar proceeding involving the related Borrower, such modification, waiver or amendment shall be disregarded for purposes of calculating the Certificate Rate on any Class of Certificates.  

(d)

Subsequent Recoveries.  With respect to any Subsequent Recoveries received with respect to a Mortgage Loan, such Subsequent Recoveries shall be treated as a principal prepayment.  In addition, the Class Principal Balance of each Class of Certificates to which Realized Losses have been allocated shall be increased, sequentially in the order of payment priority, by the amount of Subsequent Recoveries, but not by more than the amount of Realized Losses previously allocated to reduce the Class Principal Balance of such Class.

Section 3.03

Crossover Amounts.

(a)

If, on any Distribution Date, the aggregate Class Principal Balance of the Group 1 Certificates, the Group 2 Certificates, the Group 3 Certificates or the Group 4 Certificates exceeds the outstanding aggregate principal balance of the Mortgage Loans in the related Loan Group (such Class or Classes, the related “Affected Senior Certificates”), then future principal payments otherwise allocable to the Subordinate Certificates shall be “crossed over” or used to repay principal of the Affected Senior Certificates by increasing the Senior Principal Distribution Amount for the Loan Group related to the Affected Senior Certificates in an amount equal to the lesser of (i) the aggregate amount of principal otherwise payable to the Subordinate Certificates on such Distribution Date and (ii) the amount required to be paid to the Affected Senior Certificates so that their aggregate Class Principal Balance is equal to the outstanding aggregate principal balance of the Mortgage Loans in the related Loan Group.

(b)

In addition, if, as a result of rapid prepayments, the aggregate Class Principal Balance of the Group 1 Certificates, the Group 2 Certificates, the Group 3 Certificates or the Group 4 Certificates has been reduced to zero and such Senior Certificates are retired, amounts with respect to the Mortgage Loans otherwise distributable as principal on each Class of Subordinate Certificates shall instead be distributed as principal to the Senior Certificates related to the other Loan Groups that remain outstanding, until the Class Principal Balances of the Senior Certificates related to such Loan Group or Loan Groups have been reduced to zero.  In order for the distribution priority described in the foregoing sentence to apply on any Distribution Date, it must also be true that either (a) the related Subordinate Percentage for that Distribution Date is less than 200% of such Subordinate Percentage as of the Cut-Off Date, or (b) the average outstanding principal balance of the Mortgage Loans in Loan Group 1, Loan Group 2, Loan Group 3 and Loan Group 4 that are delinquent 60 days or more (including any such Mortgage Loans in foreclosure or bankruptcy and REO properties) during the most recent three calendar months as a percentage of the related Subordinate Percentage is greater than or equal to 50%.

(c)

All distributions described in this Section 3.03 shall be made in accordance with the priorities set forth in Section 3.01.  

ARTICLE IV

THE SECURITIES

Section 4.01

The Certificates.  The Certificates shall be designated generally as the Mortgage Pass-Through Certificates, Series 2005-AR6.  The aggregate principal amount of Certificates that may be executed and delivered under this Trust Agreement is limited to $2,802,084,865, except for Certificates executed and delivered upon registration of transfer of, or in exchange for, or in lieu of, other Certificates pursuant to Section 5.04 or 5.06 of the Standard Terms.  On the Closing Date, the Trustee shall execute, and the Certificate Registrar shall authenticate and deliver Mortgage Pass-Through Certificates in the names and amounts and to the Persons as directed by the Depositor.  The table in Section 2.03(c) sets forth the Classes of Certificates and the initial Class Principal Balance for each Class of the Certificates.

Section 4.02

Denominations.  Each of the Senior Certificates and the Senior Subordinate Certificates shall be issued in fully-registered, book-entry form and shall be Book-Entry Certificates.  The Senior Certificates shall be issued in minimum denominations of $25,000 initial certificate principal balance each and multiples of $1 in excess thereof.  The Subordinate Certificates shall be issued in minimum denominations of $250,000 initial certificate principal balance each and multiples of $1 in excess thereof.  In addition, one certificate of each Class (other than the Residual Certificates) may be issued evidencing the sum of an authorized denomination thereof and the remainder of the aggregate initial Class Principal Balance of such Class.  Each Class of Residual Certificates shall be issued in percentage interests of 99.99% and 0.01%.  Each of the Residual Certificates and the Junior Subordinate Certificates shall be issued in fully-registered, certificated form.

Section 4.03

Redemption of Certificates.  Notwithstanding anything to the contrary in Section 10.02 of the Standard Terms, the obligations created by the Trust Agreement shall terminate upon payment to the Certificateholders of all amounts held in the Collection Account, the Certificate Account and the REMIC I Distribution Account required to be paid to such Certificateholders pursuant to the Trust Agreement, following the earlier of: (i) the final payment or other liquidation (or any Advance with respect thereto) of the last Mortgage Loan remaining in the Trust or the disposition of all property acquired upon foreclosure of any such Mortgage Loan and (ii) the repurchase of all of the assets of the Trust by the Master Servicer upon the date on which the aggregate Scheduled Principal Balance is equal to or less than 10% of the aggregate Scheduled Principal Balance as of the Cut-Off Date. Written notice of any such termination shall be given to each Certificateholder, and the final distribution shall be made only upon surrender and cancellation of such Certificates at an office or agency appointed by the Trustee which will be specified in the notice of termination.  Any repurchase of the assets of the Trust pursuant to this Section 4.03 shall be made at a price equal to the Termination Price.

Section 4.04

Securities Laws Restrictions.  Each of the Junior Subordinate Certificates is subject to the restrictions on transfer contained in Section 5.05(a) of the Standard Terms.  Each of the Residual Certificates is subject to the restrictions on transfer contained in Section 5.05(c) of the Standard Terms.

ARTICLE V

MISCELLANEOUS PROVISIONS

Section 5.01

Request for Opinions.

(a)

The Depositor hereby requests and authorizes McKee Nelson LLP, as its special counsel in this transaction, to issue on behalf of the Depositor such legal opinions to the Securities Administrator, Trustee and each Rating Agency as may be (i) required by any and all documents, certificates or agreements executed in connection with the Trust, or (ii) requested by the Securities Administrator, the Trustee, and Rating Agency or their respective counsels.

(b)

The Trustee hereby requests and authorizes its counsel to issue on its behalf such legal opinions to the Depositor, GSMC and Goldman, Sachs & Co. as may be required by any and all documents, certificates or agreements executed in connection with the establishment of the Trust and the issuance of the Certificates.

Section 5.02

Schedules and Exhibits.  Each of the Schedules and Exhibits attached hereto or referenced herein are incorporated herein by reference as contemplated hereby and by the Standard Terms.  Each Class of Certificates shall be in substantially the form attached hereto, as set forth in the Exhibit index.

Section 5.03

Governing Law.   THIS TRUST AGREEMENT SHALL BE GOVERNED BY AND CONSTRUED IN ACCORDANCE WITH THE LAWS OF THE STATE OF NEW YORK, WITHOUT REFERENCE TO ITS CONFLICT OF LAW PROVISIONS (OTHER THAN SECTION 5-1401 OF THE GENERAL OBLIGATIONS LAW), AND THE OBLIGATIONS, RIGHTS AND REMEDIES OF THE PARTIES HEREUNDER SHALL BE DETERMINED IN ACCORDANCE WITH SUCH LAWS.

Section 5.04

Counterparts.  This Trust Agreement may be executed in any number of counterparts, each of which so executed shall be deemed to be an original but all of such counterparts shall together constitute but one and the same instrument.

Section 5.05

Notices.  All demands and notices hereunder shall be in writing and shall be deemed to have been duly given if personally delivered at or mailed by first class mail, postage prepaid, or by express delivery service, to (a) in the case of the Depositor, 85 Broad Street, New York, New York 10004, Attention: President (telecopy number (212) 902-3000 and email addresses: howard.altarescu@gs.com and anton.kuzmanov@gs.com) or such other address, telecopy number or email address as may hereafter be furnished to each party to the Trust Agreement in writing by the Depositor, (b) in the case of the Securities Administrator, Sixth Street and Marquette Avenue, Minneapolis, Minnesota 55479, Attention: GSR 2005-AR6 or such other address or telecopy number as may hereafter be furnished to each party to the Trust Agreement in writing by the Securities Administrator (c) in the case of the Trustee, U.S. Bank National Association, One Federal Street, Third Floor Boston MA 02110, Attn: Corporate Trust Services/GSR Mortgage 2005-AR6 or such other address, telecopy number or email may hereafter be furnished to each party to the Trust Agreement in writing by the Trustee, and (d) in the case of the Master Servicer, Wells Fargo Bank, N.A., P.O. Box 98, Columbia, Maryland  21046, Attention: Corporate Trust Group (GSR 2005-AR6) (or in the case of overnight deliveries, 9062 Old Annapolis Road, Columbia, Maryland  21045) Telephone:  (410) 884-2000 Facsimile:  (410) 715-2380.  The addresses of the rating agencies required to be stated herein pursuant to Section 11.08(c) of the Standard Terms are Standard & Poor’s Ratings Services, 55 Water Street, 40th Floor, New York, New York 10041, Fitch Ratings, One State Street Plaza, 30th Floor, New York, NY 10004, and Dominion Bond Rating Service, 55 Broadway, 15th Floor, New York, NY 10006.

[Signature page follows]







 

IN WITNESS WHEREOF, the Depositor, the Trustee, the Master Servicer, the Securities Administrator and the Custodian have caused this Trust Agreement to be duly executed by their respective officers thereunto duly authorized and their respective signatures duly attested all as of the day and year first above written.


GS MORTGAGE SECURITIES CORP.  

as Depositor



By: /s/ Michelle Gill                                          

Name:  Michelle Gill

Title:    Vice President



WELLS FARGO BANK, N.A.

as Master Servicer


By: /s/ Sandra Whalen                                       

Name:  Sandra Whalen

Title:    Vice President



U.S. BANK NATIONAL ASSOCIATION

as Trustee


By: /s/ James H. Byrnes                                     

Name:  James H. Byrnes

Title:    Vice President



WELLS FARGO BANK, N.A.

 

as Securities Administrator


By: /s/ Sandra Whalen                                       

Name:  Sandra Whalen

Title:    Vice President








WELLS FARGO BANK, N.A.,

as Custodian


By: /s/ Sandra Whalen                                       

Name:  Sandra Whalen

Title:    Vice President