ex10-1.htm


    Exhibit
10.1


    SECOND
AMENDMENT

    TO

    THIRD AMENDED AND RESTATED
REVOLVING CREDIT AGREEMENT

    AND

    WAIVER
THEREUNDER

    


    


    


    This
Second Amendment to Third Amended and Restated Revolving Credit Agreement and
Waiver Thereunder (this “Amendment”),
dated as of June 23, 2008, is entered into by (1) FRONTIER OIL AND REFINING
COMPANY, a Delaware corporation (the “Borrower”),
(2) FRONTIER OIL CORPORATION, a Wyoming corporation (“FOC”), (3)
each of the financial institutions party to the Credit Agreement referred to
below (the “Lenders”)
and (4) UNION BANK OF CALIFORNIA, N.A., a national banking association (“UBOC”), as
administrative agent (the “Administrative
Agent”) for the Lenders.

    


    


    Recitals

    


    A.           The
Borrower, FOC, the Lenders, the Administrative Agent and BNP Paribas, a French
banking corporation, as syndication agent, are party to a Third Amended and
Restated Revolving Credit Agreement dated as of October 1, 2007, as amended by a
First Amendment to Third Amended and Restated Revolving Credit Agreement dated
as of March 3, 2008 (said Agreement, as so amended, herein called the “Credit
Agreement”). Terms defined in the Credit Agreement and not otherwise
defined herein have the same respective meanings when used herein, and the rules
of interpretation set forth in Section 1.3 of the Credit Agreement are
incorporated herein by reference.

    


    B.           The
Borrower has requested, pursuant to Section 2.1(b) of the Credit Agreement, that
the Lenders increase the Maximum Aggregate Commitment to $350,000,000. In
addition, the Borrower, FOC, the Lenders and the Administrative Agent wish to
amend the Credit Agreement to, among other things, (1) amend a portion of the
definition of “Borrowing Base” and (2) provide for the issuance of Letters of
Credit by BNP Paribas in addition to UBOC, subject to the terms and conditions
hereof. Accordingly, for good and valuable consideration, the receipt and
sufficiency of which are hereby acknowledged, the Borrower, FOC, the Lenders and
the Administrative Agent hereby agree as set forth below.

    


    


    SECTION
1. Amendments to Credit
Agreement. Subject
to satisfaction of the conditions precedent set forth in Section 3 of this
Amendment, the Borrower, FOC and the Lenders hereby agree that the Credit
Agreement is amended as set forth below.

    


    (a) The
definition of “Borrowing Base” in Section 1.1 of the Credit Agreement is amended
by amending clause (vii) thereof in full to read as follows:

    


    “(vii) 70%
of Eligible Prepaid Crude Purchases (provided, however, that (A) the
aggregate amount of Eligible Prepaid Crude Purchases, before making the
calculation described in this clause (vii) for the purpose of determining the
aggregate amount of Eligible Prepaid Crude Purchases to be included in the
Borrowing Base, shall not exceed $30,000,000, and (B) the aggregate amount of
Eligible Inventory and Eligible Prepaid Crude Purchases included in the
Borrowing Base shall not exceed 70% of the Borrowing Base);”

    


    (b) The
definition of “Issuing Bank” in Section 1.1 of the Credit Agreement is amended
in full to read as follows:

    


    “‘Issuing
Bank’ means UBOC or BNP Paribas in its capacity as an issuer of Letters
of Credit hereunder, as requested by the Borrower pursuant hereto from time to
time; provided,
however, that
(a) an Issuing Bank shall not be obligated to, but may in its sole and absolute
discretion, issue a Letter of Credit as requested by the Borrower pursuant
hereto if such issuance would cause the sum of (i) the aggregate Letter of
Credit Amount of all outstanding Letters of Credit issued by such Issuing Bank
and (ii) the aggregate amount of unreimbursed drawings under all Letters of
Credit issued by such Issuing Bank to exceed 50% of the Maximum Aggregate
Commitment, and (b) each reference in this Agreement to ‘the Issuing Bank’ in
respect of a particular Letter of Credit shall mean UBOC if it was or is to be
the issuer thereof or BNP Paribas if it was or is to be the issuer
thereof.”

    


    (c) The
definition of “Letter of Credit Request” in Section 1.1 of the Credit Agreement
is amended in full to read as follows:

    


    “‘Letter of Credit
Request’ means a request by the Borrower for the issuance of a Letter of
Credit, on the Issuing Bank’s standard form of letter of credit application
(UBOC’s current form of which is attached hereto as Exhibit B) and containing
terms and conditions satisfactory to the Issuing Bank in its sole
discretion.”

    


    (d) Section
2.12(b) of the Credit Agreement is amended in full to read as
follows:

    


    “(b) The
Borrower will pay to the Issuing Bank for its own account such additional fees
and charges (including cable charges) as are generally associated with letters
of credit, in accordance with the Issuing Bank’s standard internal charge
guidelines in effect from time to time.”

    


    (e) Article 2
of the Credit Agreement is amended by adding the following new Section 2.20 at
the end thereof:

    


    “Section
2.20  Pricing Increase. If
this Agreement is not amended and restated, or otherwise replaced, by October 1,
2008, then on that date (a) each percentage set forth in (i) the definition of
“Applicable Base Rate Margin” in Section 1.1, (ii) the definition of “Applicable
LIBOR Margin” in Section 1.1, (iii) the definition of “Applicable LOC Fee Rate”
in Section 1.1 and (iv) Section 2.12(a) shall be increased by 0.25% (i.e., 25 basis points), and
(b) each percentage set forth in the definition of “Applicable Commitment Fee
Rate” in Section 1.1 shall be increased by 0.05% (i.e., 5 basis points), in
each case without any action by any Person. ”

    


    (f) Section
4.3 of the Credit Agreement, through clause (a) thereof, is amended in full to
read as follows:

    


    “Section 4.3  Letters of Credit.
The obligation of the Issuing Bank to issue, and of each other Lender to
participate in, each Letter of Credit is subject to the limitations of the
Commitments, to the limitations contained in the definition of ‘Issuing Bank’ in
Section 1.1, to the performance by the Borrower of all of its obligations under
this Agreement and to the satisfaction of the following further
conditions:

    


    (a) the
Issuing Bank has received a Letter of Credit Request, duly executed by the
Borrower, with respect to such Letter of Credit;”

    


    


    (g) Sections
10.8(a), (c) and (d) of the Credit Agreement are amended in full to read as
follows:

    


    “(a) Each
Lender may assign to one or more banks or other entities all or a portion of its
rights and obligations under this Agreement (including all or a portion of its
Commitment, the Advances owing to it and its participations in outstanding
Letters of Credit); provided, however, that (i)
except in the case of an assignment to a Person that, immediately before such
assignment, was a Lender, the amount of the Commitment of the assigning Lender
being assigned pursuant to each such assignment (determined as of the date of
the Assignment and Assumption with respect to such assignment) shall in no event
be less than the lesser of (A) the entire Commitment of such Lender at such time
and (B) $10,000,000, (ii) each such assignment shall be subject to the prior
written consent of the Administrative Agent and each Issuing Bank (which consent
may not be unreasonably withheld or delayed), and (iii) the parties to each such
assignment shall execute and deliver to the Administrative Agent, for its
acceptance and recording in the Register, an Assignment and Assumption, together
with a processing and recording fee of $3,500. Upon such consent, execution,
delivery, acceptance and recording, from and after the effective date specified
in the applicable Assignment and Assumption, which effective date shall be at
least 5 Business Days after the date of delivery thereof to the Administrative
Agent or, if so specified in such Assignment and Assumption, the date of
acceptance thereof by the Administrative Agent, (i) the assignee thereunder
shall be a party hereto and, to the extent that rights and obligations hereunder
have been assigned to it pursuant to such Assignment and Assumption, shall have
the rights and obligations of a Lender hereunder, and (ii) the Lender assignor
thereunder shall, to the extent that rights and obligations hereunder have been
assigned by it pursuant to such Assignment and Assumption, relinquish its rights
and be released from its obligations under this Agreement (and, in the case of
an Assignment and Assumption covering all or the remaining portion of an
assigning Lender’s rights and obligations under this Agreement, such Lender
shall cease to be a party hereto, except that such Lender shall continue to be
an ‘Indemnified Party’ under Section 6.14(b) and an ‘Indemnified Person’ under
Section 10.5).”

    


    
      	
               
      

            	
              *          *          *

            


    

    


    “(c) Any
financial institution that is to become a party to this Agreement as a New
Lender pursuant to Section 2.1(b) must be consented to by the Borrower, the
Administrative Agent and each Issuing Bank (which consent may not be
unreasonably withheld or delayed) and must execute a Joinder Agreement,
consented to by the Borrower, the Administrative Agent and each Issuing Bank and
delivered to the Administrative Agent for its recording in the Register,
together with a processing and recording fee of $3,500; provided, however, that (i)
each New Lender must have a Commitment of at least $10,000,000 and (ii) no
joinder of a New Lender to this Agreement may cause the maximum amount of the
Maximum Aggregate Commitment to exceed $350,000,000. Upon such execution,
consent, delivery and recording, from and after the effective date specified in
the applicable Joinder Agreement, the New Lender thereunder shall be a party
hereto and, to the extent provided in such Joinder Agreement, shall have the
rights and obligations of a Lender hereunder. By executing and delivering a
Joinder Agreement, the New Lender thereunder confirms to and agrees with the
other parties hereto as specified in Sections 10.8(b)(iii) through (vi), as if
it were an assignee (but without reference to an assignor). Upon the joinder of
any New Lender to this Agreement pursuant to this Section 10.8(c), the
Administrative Agent shall forward to the Borrower and each Lender an updated
Schedule 1.

    


    “(d) The
Administrative Agent shall maintain at its address set forth in Section 10.2 a
copy of each Assignment and Assumption and Joinder Agreement delivered to the
Administrative Agent and consented to and accepted as specified above and a
register for the recordation of the names and addresses of the Lenders and the
Commitment of, and the principal amount of Obligations owing to, each Lender
from time to time (the ‘Register’).
The entries in the Register shall be conclusive and binding for all purposes,
absent manifest error, and the Borrower, the Administrative Agent and the
Lenders may treat each Person whose name is recorded in the Register as a Lender
hereunder for all purposes of this Agreement. The Register shall be available
for inspection by the Borrower or any Lender at any reasonable time and from
time to time upon reasonable prior notice.”

    


    SECTION
2. Waiver. Subject
to satisfaction of the conditions precedent set forth in Section 3 of this
Amendment, the Lenders and the Administrative Agent hereby waive, in respect of
the Borrower’s request under Section 2.1(b) of the Credit Agreement to increase
the Maximum Aggregate Commitment to $350,000,000, the requirements under Section
2.1(b) of the Credit Agreement that (a) the Borrower give the Administrative
Agent a Commitment Increase Request not later than 10 Business Days before the
proposed Commitment Increase Date and (b) the Lenders be allowed 10 Business
Days after receipt of notice of a Commitment Increase Request to respond
thereto.

    


    SECTION
3. Conditions
Precedent. This
Amendment and the increases in the Commitments to the amounts set forth in
Schedule 1 attached hereto shall become effective on the date, not later than
June 30, 2008, on which the conditions precedent set forth below have been
fulfilled.

    


    (a) The
Borrower has paid the following fees to the Administrative Agent: (i) for the
account of each Lender, a facility-increase fee equal to the product of (A) the
difference between the Commitment of such Lender as set forth in Schedule 1
hereto and the Commitment of such Lender as set forth in Schedule 1 to the
Credit Agreement and (B) 0.30%; and (ii) for the account of each of UBOC and BNP
Paribas, the fees payable thereto on or before the date hereof pursuant to the
letter agreement described in Section 3(b)(iii) hereof.

    


    (b) The
Administrative Agent has received all of the following, each dated the date
hereof, in form and substance satisfactory to the Administrative Agent and in
the number of originals requested thereby:

    


    (i) this
Amendment, duly executed by the Borrower, FOC and the Super-Majority
Lenders;

    


    (ii) a consent
to this Amendment, duly executed by the Guarantors and by the Borrower, in its
capacity as guarantor under the Borrower Guaranty; and

    


    (iii) a letter
agreement, duly executed by the Borrower, UBOC and BNP Paribas, concerning fees
payable by the Borrower to each of UBOC and BNP Paribas for its own account with
respect to its role as an issuer of Letters of Credit.

    


    SECTION
4. Representations and
Warranties. Each of
the Borrower and FOC represents and warrants to the Lenders and the
Administrative Agent as set forth below.

    


    (a) The
execution, delivery and performance by each of the Borrower and FOC of this
Amendment and the Credit Agreement, as amended hereby, and the consummation of
the transactions contemplated hereby and thereby, are within such Credit Party’s
legal powers, have been duly authorized by all necessary legal action and do not
(i) contravene such Credit Party’s charter documents or bylaws, (ii) violate any
Governmental Rule, (iii) conflict with or result in the breach of, or constitute
a default under, any Material Contract, loan agreement, indenture, mortgage,
deed of trust or lease, or any other contract or instrument, binding on or
affecting such Credit Party, any of its Subsidiaries or any of their respective
properties, the conflict, breach or default of which could reasonably be
expected to have a Material Adverse Effect, or (iv) result in or require the
creation or imposition of any Lien upon or with respect to any of the properties
of such Credit Party or any of its Subsidiaries, except for Liens created or
permitted under the Credit Documents, as amended hereby. Neither such Credit
Party nor any of its Subsidiaries is in violation of any Governmental Rule or in
breach of any such contract, loan agreement, indenture, mortgage, deed of trust,
lease or other contract or instrument, the violation or breach of which could
reasonably be expected to have a Material Adverse Effect.

    


    (b) No
Governmental Action, and no authorization, approval or other action by, or
notice to, any third party, is required for the due execution, delivery or
performance by the Borrower or FOC of this Amendment or the Credit Agreement, as
amended hereby, or for the consummation of the transactions contemplated hereby
or thereby, except for (i) authorizations, approvals and other actions by, and
notices to, third parties, the failure to obtain which could not reasonably be
expected to have a Material Adverse Effect, and (ii) Governmental Action that
has been duly obtained, taken, given or made and is in full force and
effect.

    


    (c) This
Amendment and the Credit Agreement, as amended hereby, have been duly executed
and delivered by the Borrower and FOC. This Amendment and the Credit Agreement,
as amended hereby, are the legal, valid and binding obligations of the Borrower
and FOC, enforceable against each such Credit Party in accordance with their
respective terms, except as the enforceability hereof or thereof may be limited
by bankruptcy, insolvency, moratorium, reorganization or other similar laws
affecting creditors’ rights generally or by equitable principles relating to
enforceability.

    


    (d) Each of
the Security Agreement and the Stock Pledge Agreement constitutes a valid and
perfected first-priority Lien on the Collateral purported to be encumbered
thereby, enforceable against all third parties in all jurisdictions, and secures
the payment of all obligations of the Borrower or FRMI, as applicable, under the
Credit Documents, as amended hereby, to which the Borrower or FRMI, as
applicable, is a party, and the execution, delivery and performance of this
Amendment do not adversely affect the Lien of the Security Agreement or the
Stock Pledge Agreement.

    


    (e) There has
been no amendment to the charter documents or bylaws of the Borrower on or after
September 20, 2007 or of FOC on or after September 21, 2007. The representations
and warranties contained in each Credit Document, as amended hereby, to which
the Borrower and/or FOC is a party are correct in all material respects on and
as of the date hereof, before and after giving effect to this Amendment, as
though made on and as of the date hereof. No event has occurred and is
continuing, or would result from the effectiveness of this Amendment, that
constitutes a Default.

    


    SECTION
5. Reference to and Effect on
Credit Documents.

    


    (a) On and
after the effective date of this Amendment, each reference in the Credit
Agreement to “this Agreement,” “hereunder,” “hereof,” “herein” or words of like
import referring to the Credit Agreement, and each reference in the other Credit
Documents to “the Credit Agreement,” “thereunder,” “thereof,” “therein” or words
of like import referring to the Credit Agreement, shall mean and be a reference
to the Credit Agreement as amended by this Amendment.

    


    (b) Except as
specifically amended above, the Credit Agreement and the other Credit Documents
shall remain in full force and effect and are hereby ratified and confirmed.
Without limiting the generality of the foregoing, the Security Agreement and the
Stock Pledge Agreement and all of the Collateral described therein do and shall
continue to secure the payment of all obligations under the Credit Documents, as
amended hereby, stated to be secured thereby.

    


    (c) The
execution, delivery and effectiveness of this Amendment shall not operate as a
waiver of any right, power or remedy of the Administrative Agent or any Lender
under any of the Credit Documents or constitute a waiver of any provision of any
of the Credit Documents.

    


    SECTION
6. Costs and
Expenses. The
Borrower agrees to pay on demand all costs and expenses of the Administrative
Agent in connection with the preparation, execution and delivery of this
Amendment and the other instruments and documents to be delivered hereunder,
including the reasonable fees and out-of-pocket expenses of counsel for the
Administrative Agent with respect thereto and with respect to advising the
Administrative Agent as to its rights and responsibilities hereunder and
thereunder.

    


    SECTION
7. Execution in
Counterparts. This
Amendment may be executed in any number of counterparts and by the parties
hereto in separate counterparts, each of which when so executed and delivered
shall be deemed to be an original and all of which taken together shall
constitute one and the same agreement. Delivery of an executed counterpart of a
signature page to this Amendment by telecopier or e-mail shall be effective as
delivery of an originally executed counterpart of this Amendment.

    


    SECTION
8. Governing
Law. THIS AMENDMENT SHALL BE GOVERNED BY,
AND CONSTRUED AND ENFORCED IN ACCORDANCE WITH, THE LAWS OF THE STATE OF
CALIFORNIA APPLICABLE TO CONTRACTS MADE AND PERFORMED IN THE STATE OF
CALIFORNIA.

    


     

    


    [Signature
pages follow.]

    


    


    
      
        
           


        

        
           


          
            

          

        

        
           


        

      

    

    


    The
parties hereto have caused this Amendment to be executed by their respective
duly authorized representatives as of the date first written above.

    


    


    FRONTIER
OIL AND REFINING COMPANY

    


    


    By:       /s/ Michael C.
Jennings                                               

    Name:  Michael
C.
Jennings                                                              

    Title:    EVP
&
CFO                                                           

    


    


    


    FRONTIER
OIL CORPORATION

    


    


    By:       /s/ Doug S.
Aron                                               

    Name:  Doug
S.
Aron                                                              

    Title:    VP
- Corporate
Finance                                                           

    


    


    


    UNION
BANK OF CALIFORNIA, N.A.,

       as
Administrative Agent and Lender

    


    


    By:       /s/ Timothy
Brendel                                               

    Name:  Timothy
Brendel                                                              

    Title:    Assistant
Vice
President                                                           

    


    


    


    BNP
PARIBAS

    


    


    By:       /s/ Edward
Pak                                               

    Name:  Edward
Pak                                                              

    Title:    Vice
President                                                            

    


    


    By:        /s/ Betsy
Jocher                                              

    Name:   Betsy
Jocher                                                             

    Title:     Director                                                           

    


    


    


    TORONTO
DOMINION (TEXAS) LLC

    


    


    By:         /s/ Ian
Murray                                             

    Name:    Ian
Murray                                                            

    Title:      Authorized
Signatory                                                          

    


    


    


    WELLS
FARGO BANK, N.A.

    


    


    By:         /s/ Oleg
Kogan                                             

    Name:    Oleg
Kogan                                                            

    Title:      Assistant
Vice
President                                                          

    


    


    


    U.S. BANK
NATIONAL ASSOCIATION

    


    


    By:         /s/ Monte E.
Deckerd                                             

    Name:    Monte
E.
Deckerd                                                            

    Title:      Senior
Vice
President                                                          

    


    


    


    THE FROST
NATIONAL BANK

    


    


    By:         /s/ Thomas H.
Dungan                                             

    Name:   Thomas
H.
Dungan                                                              

    Title:     Sr.
Vice
President                                                          

    


    


    


    BANK OF
SCOTLAND

    


    


    By:        /s/ Julia
R. Franklin                                              

    Name:   Julia
R. Franklin                                                             

    Title:     Assistant
Vice
President                                                           

    


    


    


    CAPITAL
ONE, NATIONAL ASSOCIATION

    


    


    By:        /s/ Stan G. Weiser,
Jr.                                              

    Name:  
Stan G. Weiser,
Jr.                                                              

    Title:     Vice-President                                                           

    


    


    


    
      
        
           


        

        
           


          
            

          

        

        
           


        

      

    

    


    SCHEDULE
1

    


    


    COMMITMENTS

    


    


    


    
      	
              Lender

               

               

            	
              Commitment

            
	
              Union
      Bank of California, N.A.

               

            	
              $60,000,000

            
	
              BNP
      Paribas

               

            	
              $60,000,000

            
	
              Toronto
      Dominion (Texas) LLC

               

            	
              $50,000,000

            
	
              Wells
      Fargo Bank, N.A.

               

            	
              $50,000,000

            
	
              U.S.
      Bank National Association

               

            	
              $44,000,000

            
	
              The
      Frost National Bank

               

            	
              $31,000,000

            
	
              Bank
      of Scotland

               

            	
              $30,000,000

            
	
              Capital
      One, National Association

               

            	
              $25,000,000

            
	
               

               Maximum
      Aggregate Commitment

            	
               

              $350,000,000