Exhibit 10.5

SECOND AMENDMENT TO CREDIT AGREEMENT

THIS SECOND AMENDMENT TO CREDIT AGREEMENT (the “Second Amendment”) is entered
into effective as of October 26, 2012, by and among GREEN PLAINS GRAIN COMPANY
LLC, a Delaware limited liability company, GREEN PLAINS GRAIN COMPANY TN LLC, a
Delaware limited liability company, GREEN PLAINS ESSEX INC., an Iowa corporation
(collectively, jointly and severally, the “Borrower”),  BNP PARIBAS, as the
administrative agent (the “Administrative Agent”) under the Credit Agreement (as
hereinafter defined), and the lenders party to the Credit Agreement (the
“Lenders”).

W I T N E S S E T H:

WHEREAS, the Borrower, the Administrative Agent, and the Lenders entered into
that certain Credit Agreement, dated as of October 28, 2011  (as amended,
restated, supplemented, or otherwise modified from time to time, the “Credit
Agreement”); and

WHEREAS, the Borrower, the Administrative Agent, and the Lenders have agreed to
amend the Credit Agreement to revise the Borrowing Base as described herein and
to make certain additional changes to the Credit Agreement as set forth below;

NOW, THEREFORE, in consideration of the mutual covenants and agreements herein
contained, the Borrower, the Administrative Agent, and the Lenders agree as
follows:

Capitalized Terms.   Capitalized terms not defined herein shall have the meaning
assigned to them in the Credit Agreement.  Unless otherwise specified, all
section references herein refer to sections of the Credit Agreement.

Amended Definitions.  

2.1.

Definition of Borrowing Base.  The definition of “Borrowing Base” in Section 1
of the Credit Agreement is amended so that clause (c) in the paragraph
immediately after category (xiv) of the definition reads as follows:

“(c) the aggregate amount of Eligible Net Unrealized Gain on Forward Contracts,
after giving effect to the applicable advance rate, exceed an amount equal to
the lesser of (x) fifty percent (50%) of the Borrowing Base at such time, and
(y) $55,000,000,”

2.2.

Definition of Eligible Net Unrealized Gain on Forward Contracts. The definition
of “Eligible Net Unrealized Gain on Forward Contracts” in Section 1 of the
Credit Agreement is amended to add the following as clause (w) immediately
before clause (x):

“(w) in determining the amount of Eligible Net Unrealized Gain on Forward
Contracts relating to Eligible Forward Contracts with a tenor of greater than
six (6) months, the amount thereof shall not exceed $15,000,000,”

2.3.

Definition of Other Swap Agreements. The definition of “Other Swap Agreements”
in Section 1 of the Credit Agreement is amended to add the clause below
immediately after the word “foregoing” therein:

-  1  -

--------------------------------------------------------------------------------

 

Exhibit 10.5

“; provided,  however, that the term “Other Swap Agreements” shall not include
any commodity repurchase agreements related to physical inventory (including but
not limited to any repurchase agreement with an Approved Repurchase Contract
Counterparty).”

Section 7.2 (Certificates and Reports; Other Information).  Section 7.2(c) of
the Credit Agreement is amended as follows:    

“(c)                   as soon as available, but in any event within ten (10)
Business Days after the fifteenth (15th) and last day of each month, a Borrowing
Base Report dated as of the close of business on such fifteenth (15th) and last
day of each month (as applicable) (provided, that if such day is not a Business
Day, such Borrower Base Report shall be as of the Business Day preceding such
fifteenth (15th) or last day of each month), showing the Borrowing Base and the
Aggregate Outstanding Extensions of Credit as of the close of business on such
date, provided, that in the event (x) the Borrowing Base is less than or equal
to $100,000,000 and the Available Commitment equals less than five percent (5%)
of the Total Commitment (as determined on the date of the most recent Borrowing
Base Report), the Borrowing Base Report shall be delivered within five (5)
Business Days after the end of each week, or (y) the Borrowing Base is greater
than $100,000,000 and the Available Commitment equals less than ten percent
(10%) of the Total Commitment (as determined on the date of the most recent
Borrowing Base Report), the Borrowing Base Report shall be delivered within five
(5) Business Days after the end of each week;”

Section 7.8  (Notices).   Section 7.8 of the Credit Agreement is amended as
follows:

Clause (h) is amended to read as follows:

“(h)            any notice received by the Borrower of any violation of
Requirements of Law;”

“; and” is substituted for “.” at the end of clause (i).

A new clause (j) is added as follows:

“(j)                   any default, event of default, or other non-performance
by a counterparty under any Forward Contract of which the Borrower has notice or
otherwise has knowledge which has occurred or Borrower has been informed is
reasonably likely to occur, individually or in the aggregate with any other
default, event of default, or other non-performance under any other such Forward
Contract, would total $500,000 or more.”

Exhibit A (Form of Borrowing Base Report).  Annex I to Exhibit A to the Credit
Agreement is replaced by Schedule  I attached to this Second Amendment.

Exhibit A-1 (Form of Interim Borrowing Base Report).  Annex I to Exhibit A-1 to
the Credit Agreement is replaced by Schedule II attached to this Second
Amendment.

-  2  -

--------------------------------------------------------------------------------

 

Exhibit 10.5

Effectiveness of Amendment.  This Second Amendment shall be effective upon
receipt by the Administrative Agent of a copy of this Second Amendment executed
by the Borrower, the Administrative Agent and the Lenders.

Ratifications, Borrower Representations and Warranties. 

(a)

The terms and provisions set forth in this Second Amendment shall modify and
supersede all inconsistent terms and provisions set forth in the Credit
Agreement and, except as expressly modified and superseded by this Second
Amendment, the terms and provisions of the Credit Agreement are ratified and
confirmed and shall continue in full force and effect.  The Borrower and the
Lenders agree that the Credit Agreement and the Loan Documents, as amended
hereby, shall continue to be legal, valid, binding and enforceable in accordance
with their respective terms.

(b)

To induce the Lenders to enter into this Second Amendment, the Borrower ratifies
and confirms each representation and warranty set forth in the Credit Agreement
as if such representations and warranties were made on the even date herewith,
and further represents and warrants (i) that there has occurred since the date
of the last financial statements delivered to the Administrative Agent no event
or circumstance that has resulted or could reasonably be expected to result in a
Material Adverse Effect, (ii) that no Event of Default exists on the date
hereof, and (iii) that the Borrower is fully authorized to enter into this
Second Amendment.    

Benefits.  This Second Amendment shall be binding upon and inure to the benefit
of the Lenders and Borrower, and their respective successors and assigns;
provided,  however, that Borrower may not, without the prior written consent of
the Lenders, assign any rights, powers, duties or obligations under this Second
Amendment, the Credit Agreement or any of the other Loan Documents.

Governing Law.  THIS SECOND AMENDMENT AND THE RIGHTS AND OBLIGATIONS OF THE
PARTIES HEREUNDER SHALL BE GOVERNED BY, AND CONSTRUED AND INTERPRETED IN
ACCORDANCE WITH, THE LAWS OF THE STATE OF NEW YORK (WITHOUT REGARD TO THE
CONFLICTS OF LAWS PRINCIPLES THEREOF).

Invalid Provisions.  If any provision of this Second Amendment is held to be
illegal, invalid or unenforceable under present or future laws, such provision
shall be fully severable and the remaining provisions of this Second Amendment
shall remain in full force and effect and shall not be affected by the illegal,
invalid or unenforceable provision or by its severance.

Entire Agreement.  The Credit Agreement, as amended by this Second Amendment,
contains the entire agreement among the parties regarding the subject matter
hereof and supersedes all prior written and oral agreements and understandings
among the parties hereto regarding same.

Reference to Credit Agreement.  The Credit Agreement and any and all other
agreements, documents or instruments now or hereafter executed and delivered
pursuant to the terms hereof or pursuant to the terms of the Credit Agreement,
as amended hereby, are hereby

-  3  -

--------------------------------------------------------------------------------

 

Exhibit 10.5

amended so that any reference in the Credit Agreement to the Credit Agreement
shall mean a reference to the Credit Agreement as amended hereby.

Counterparts.  This Second Amendment may be separately executed in any number of
counterparts, each of which shall be an original, but all of which, taken
together, shall be deemed to constitute one and the same agreement.  Delivery of
an executed signature page to this Second Amendment by facsimile transmission or
electronic photocopy (“.pdf”) shall be as effective as delivery of a manually
signed counterpart.

[Remainder of page intentionally blank; signature pages follow.]

 

-  4  -

--------------------------------------------------------------------------------

 

Exhibit 10.5

IN WITNESS WHEREOF the parties hereto have caused this Second Amendment to be
duly executed and delivered by the proper and duly authorized officers as of the
day and year first above written.

BORROWER:

GREEN PLAINS GRAIN COMPANY LLC,
a  Delaware limited liability company

By: Green Plains Renewable Energy, Inc.,  

an Iowa corporation,

its sole Member

 

 

By:/s/ G. Patrich Simpkins

Name:G. Patrich Simpkins

Title:EVP, Finance and Treasurer

GREEN PLAINS GRAIN COMPANY TN LLC,
a  Delaware limited liability company

By: Green Plains Grain Company LLC,  

a  Delaware limited liability company,

its sole Member

 

 

By:/s/ G. Patrich Simpkins

Name:G. Patrich Simpkins

Title:EVP, Finance and Treasurer

GREEN PLAINS ESSEX INC.,
an Iowa corporation

By:/s/ G. Patrich Simpkins

Name:G. Patrich Simpkins

Title:EVP, Finance and Treasurer

[Signature Page to Second Amendment]

--------------------------------------------------------------------------------

 

Exhibit 10.5

ADMINISTRATIVE AGENT:

BNP PARIBAS 

By:/s/ William B. Murray

Name:William B. Murray

Title:Managing Director

By:/s/ Karlien Zumpolle

Name:Karlien Zumpolle

Title:Vice President

[Signature Page to Second Amendment]

--------------------------------------------------------------------------------

 

Exhibit 10.5

LENDERS:

BNP PARIBAS,

as a Lender

By:/s/ William B. Murray

Name:William B. Murray

Title:Managing Director

By:/s/ Karlien Zumpolle

Name:Karlien Zumpolle

Title:Vice President

 

 

[Signature Page to Second Amendment]

--------------------------------------------------------------------------------

 

Exhibit 10.5

BANK OF THE WEST,
as a Lender

By:/s/ Charles Greenway

Name:Charles Greenway

Title:Vice President

 

[Signature Page to Second Amendment]

--------------------------------------------------------------------------------

 

Exhibit 10.5

ABN AMRO CAPITAL USA LLC,
as a Lender

By:/s/ Urvashi Zutshi

Name:Urvashi Zutshi

Title:Managing Director

By:/s/ Javier Ramirez

Name:Javier Ramirez

Title:Vice President

 

[Signature Page to Second Amendment]

--------------------------------------------------------------------------------

 

Exhibit 10.5

RABO AGRIFINANCE, INC.,
as a Lender

By:/s/ Todd Hansen

Name:Todd Hansen

Title:Sr. Vice President

 

[Signature Page to Second Amendment]

--------------------------------------------------------------------------------

 

Exhibit 10.5

FARM CREDIT BANK OF TEXAS,
as a Lender

By:/s/ Alan Robinson

Name:Alan Robinson

Title:Vice President

 

[Signature Page to Second Amendment]

--------------------------------------------------------------------------------

 

Exhibit 10.5

U.S. BANK NATIONAL ASSOCIATION,
as a Lender

By:/s/ Scott Meradith

Name:Scott Meradith

Title:Vice President

 

[Signature Page to Second Amendment]

--------------------------------------------------------------------------------

 

Exhibit 10.5

MACQUARIE BANK LIMITED,
as a Lender

By:/s/ Christian Coles

Name:Christian Coles

Title:Division Director

By:/s/ Andrew Mitchell

Name:Andrew Mitchell

Title:Associate Director

(Macquarie POA Ref: #594/10 dated 25 November 2010, signed in Sydney)

 

 

[Signature Page to Second Amendment]

--------------------------------------------------------------------------------

 

Exhibit 10.5

AGCOUNTRY FARM CREDIT SERVICES, PCA,
as a Lender

By:/s/ James F. Baltezore

Name:James F. Baltezore

Title:Vice President Agribusiness and Capital Markets

[Signature Page to Second Amendment]

--------------------------------------------------------------------------------

 

 

BOKF, N.A. dba BANK OF OKLAHOMA,
as a Lender

By:/s/ J. A. Anderson

Name:J. A. Anderson

Title:AVP

 

[Signature Page to Second Amendment]

--------------------------------------------------------------------------------

 

 

Schedule  I to Second Amendment

 

ANNEX I

TO

BORROWING BASE REPORT

Borrowing Base

As of [________], 20[__]

 

 

 

Gross Value

Advance Rate

Borrowing Base Value

I.  Collateral Type

 

 

 

1.   Eligible Cash Collateral, less unpaid checks, overdrafts, or other unpaid
amounts related thereto for which any Person has a prior unpaid claim,  plus

$[_______]

100%

$[_______]

2.   Eligible Net Liquidation Value in Brokerage Accounts,  plus

$[_______]

100%

$[_______]

3.   Eligible Net Liquidation Value in Third Party Brokerage Accounts,  plus

$[_______]

90%

$[_______]

4.            Eligible Accounts Receivable,  plus

$[_______]

85%

$[_______]

5.            Eligible Accounts Receivable that are backed by a letter of credit
in a form and from an issuing bank, in each case, as approved by the
Administrative Agent in its Permitted Discretion,  plus

$[_______]

90%

$[_______]

6.            Eligible Grain Inventory evidenced by warehouse receipts,  plus

$[_______]

90%

$[_______]

7.            Eligible Grain Inventory not evidenced by warehouse receipts,
 plus

$[_______]

85%

$[_______]

8.            Eligible Non-Grain Inventory, subject to permitted product
approval by the Administrative Agent,  plus

$[_______]

75%

$[_______]

9.            Eligible Prepayments to Suppliers,  plus

$[_______]

75%

$[_______]

10.            Eligible Grain Inventory In Transit
(lesser of 10(a) or 10(b)), plus

 

 

$[_______]

(a)Unadjusted Eligible Grain Inventory In Transit

$[_______]

85%

$[_______]

(b)10% of Borrowing Base

$[_______]

 

 

11.  Eligible Net Unrealized Gain on Forward Contracts
(lesser of 11(a) or 11(b))

 

 

$[_______]

(a)Eligible Net Unrealized Gain on Forward Contracts

$[_______]

75%

$[_______]

Annex I to Exhibit A – Page 1

--------------------------------------------------------------------------------

 

 

(b)Lesser of (x) 50% of Borrowing Base, and (y) $55,000,000

$[_______]

 

 

12.  Less, all payables related to Grain Inventory which are subject to any
statutory liens

$[_______]

100%

$[_______]

13.  Less, all prepayments from Borrower’s customers

$[_______]

100%

$[_______]

14.  Less, the amount of any Obligations owed to a Swap Party under a Swap
Contract with Borrower which Obligations are secured pursuant to the Security
Agreement

$[_______]

100%

$[_______]

15.            Less, the amount of any excess Eligible Accounts Receivable of
Affiliates and Eligible Net Unrealized Gain on Forward Contracts of Affiliates
over the applicable cap

(15(d) minus 15(e), to the extent the difference is a positive number)

 

100%

$[_______]

(a)Eligible Accounts Receivable of Affiliates

$[_______]

85%

$[_______]

(b)Eligible Accounts Receivable of Affiliates that are backed by a letter of
credit in a form and from an issuing bank, in each case, as approved by the
Administrative Agent in its Permitted Discretion

$[_______]

90%

$[_______]

(c)Eligible Net Unrealized Gain on Forward Contracts of Affiliates

$[_______]

75%

$[_______]

(d)Aggregate total of Eligible Accounts Receivable and Eligible Net Unrealized
Gain on Forward Contracts of Affiliates
(Sum of 15(a) plus 15(b) plus 15(c))

 

 

$[_______]

(e)Applicable cap

 

 

$10,000,000

16.            Total Collateral

(Sum of I.1 through I.11,  minus I.12 through I.15)

 

 

$[_______]

II.  Extensions of Credit

 

 

 

1.   Letters of Credit

 

 

$[_______]

2.   Revolving Loans

 

 

$[_______]

3.   Swing Line Loans

 

 

$[_______]

4.   Subtotal (II.1 + II.2 + II.3)

 

 

$[_______]

Annex I to Exhibit A – Page 2

--------------------------------------------------------------------------------

 

 

 

 

 

Annex I to Exhibit A – Page 3

--------------------------------------------------------------------------------

 

 

Schedule  II to Second Amendment

 

ANNEX I

TO

INTERIM BORROWING BASE REPORT

Borrowing Base

As of [________], 20[__]

 

 

 

Gross Value

Advance Rate

Borrowing Base Value

I.  Collateral Type

 

 

 

1.   Eligible Cash Collateral (after giving effect to the proposed Extensions of
Credit related to this Interim Borrowing Base Report), less unpaid checks,
overdrafts, or other unpaid amounts related thereto for which any Person has a
prior unpaid claim,  plus

$[_______]

100%

$[_______]

2.   Eligible Net Liquidation Value in Brokerage Accounts,  plus

$[_______]

100%

$[_______]

3.   Eligible Net Liquidation Value in Third Party Brokerage Accounts,  plus

$[_______]

90%

$[_______]

4.            Eligible Accounts Receivable,  plus

$[_______]

85%

$[_______]

5.            Eligible Accounts Receivable that are backed by a letter of credit
in a form and from an issuing bank, in each case, as approved by the
Administrative Agent in its Permitted Discretion,  plus

$[_______]

90%

$[_______]

6.            Eligible Grain Inventory evidenced by warehouse receipts,  plus

$[_______]

90%

$[_______]

7.            Eligible Grain Inventory not evidenced by warehouse receipts,
 plus

$[_______]

85%

$[_______]

8.            Eligible Non-Grain Inventory, subject to permitted product
approval by the Administrative Agent,  plus

$[_______]

75%

$[_______]

9.            Eligible Prepayments to Suppliers,  plus

$[_______]

75%

$[_______]

10.            Eligible Grain Inventory In Transit
(lesser of 10(a) or 10(b)), plus

 

 

$[_______]

(a)Unadjusted Eligible Grain Inventory In Transit

$[_______]

85%

$[_______]

(b)10% of Borrowing Base

$[_______]

 

 

11.  Eligible Net Unrealized Gain on Forward Contracts (lesser of 11(a) or
11(b))

 

 

$[_______]

Annex I to Exhibit A-1 – Page 1

--------------------------------------------------------------------------------

 

 

(a)Eligible Net Unrealized Gain on Forward Contracts

$[_______]

75%

$[_______]

(b)Lesser of (x) 50% of Borrowing Base, and (y) $55,000,000

$[_______]

 

 

12.  Less, all payables related to Grain Inventory which are subject to any
statutory liens

$[_______]

100%

$[_______]

13.  Less, all prepayments from Borrower’s customers

$[_______]

100%

$[_______]

14.  Less, the amount of any Obligations owed to a Swap Party under a Swap
Contract with Borrower which Obligations are secured pursuant to the Security
Agreement

$[_______]

100%

$[_______]

15.            Less, the amount of any excess Eligible Accounts Receivable of
Affiliates and Eligible Net Unrealized Gain on Forward Contracts of Affiliates
over the applicable cap

(15(d) minus 15(e), to the extent the difference is a positive number)

 

100%

$[_______]

(a)Eligible Accounts Receivable of Affiliates

$[_______]

85%

$[_______]

(b)Eligible Accounts Receivable of Affiliates that are backed by a letter of
credit in a form and from an issuing bank, in each case, as approved by the
Administrative Agent in its Permitted Discretion

$[_______]

90%

$[_______]

(c)Eligible Net Unrealized Gain on Forward Contracts of Affiliates

$[_______]

75%

$[_______]

(d)Aggregate total of Eligible Accounts Receivable and Eligible Net Unrealized
Gain on Forward Contracts of Affiliates
(Sum of 15(a) plus 15(b) plus 15(c))

 

 

$[_______]

(e)Applicable cap

 

 

$10,000,000

16.            Total Collateral

(Sum of I.1 through I.11,  minus I.12 through I.15)

 

 

$[_______]

II.  Extensions of Credit (after giving effect to the proposed Extensions of
Credit related to this Interim Borrowing Base Report)

 

 

 

1.   Letters of Credit

 

 

$[_______]

2.   Revolving Loans

 

 

$[_______]

3.   Swing Line Loans

 

 

$[_______]

4.   Subtotal (II.1 + II.2 + II.3)

 

 

$[_______]

Annex I to Exhibit A-1 – Page 2

--------------------------------------------------------------------------------

 

 

 

 

Annex I to Exhibit A-1 – Page 3

--------------------------------------------------------------------------------