Exhibit 10.2

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

GUARANTY

This Guaranty (this “Agreement”) dated as of November 1, 2010 is made by
Frontier Oil Corporation, a Wyoming corporation (the “Guarantor”), in favor of
BNP Paribas Energy Trading GP, a Delaware general partnership (“BNPP ET”), and
BNP Paribas Energy Trading Canada Corp., an Alberta corporation (“BNPP ETC”), as
applicable (BNPP ET and BNPP ETC collectively referred to herein as “BNP Energy
Trading”).  Each of the Parties may be referred to herein individually as a
“Party” and collectively as the “Parties.”
 
RECITALS
 
1.           This Agreement is being executed and delivered in connection with
that certain Master Crude Oil Purchase and Sale Contract dated as of even date
herewith (the “Purchase and Sale Contract”) by and among BNP Energy Trading, as
seller, and Frontier Oil and Refining Company, as purchaser (the “Purchaser”).
 
2.           The Guarantor represents it is the parent company of the Purchaser.
 
3.           The Guarantor acknowledges that it will substantially benefit from
the Purchase and Sale Contract.
 
4           To induce BNPP ET and BNPP ETC to enter into the Purchase and Sale
Contract, the Purchaser desires that the Guarantor guarantee the Purchaser’s
payment and performance under the Purchase and Sale Contract.
 
5.           The Guarantor desires to guarantee the Purchaser’s payment and
performance under the Purchase and Sale Contract upon the terms and conditions
set forth herein.
 
AGREEMENT
 
For and in consideration of the premises and mutual covenants herein contained
and other good and valuable consideration (the receipt and sufficiency of which
is hereby acknowledged), the Guarantor does hereby stipulate and agree as
follows:
 
 
1.           The Guaranty.  Subject to the last sentence of this Section 1, the
Guarantor hereby irrevocably and unconditionally guarantees to BNP Energy
Trading the full and timely payment and performance and discharge by the
Purchaser of all obligations and liabilities of the Purchaser now existing or
hereafter arising under the Purchase and Sale Contract (the “Guaranteed
Obligations”) and hereby agrees that if the Purchaser shall fail timely to pay,
perform and discharge in full any obligation or liability in accordance with the
terms of the Purchase and Sale Contract, the Guarantor shall be liable to BNP
Energy Trading for such obligation or liability, and, as such, if the Purchaser
fails to pay, perform and discharge any of the Guaranteed Obligations in
accordance with the terms of the Purchase and Sale Contract, the Guarantor will,
within three (3) days after written notice of such failure to the Guarantor by
BNP Energy Trading, pay, perform and discharge any such Guaranteed Obligation,
as the case may be, as such payment, performance and discharge is required to be
made or done by the Purchaser pursuant to the terms of the Purchase and Sale
Contract.  The guarantee in the preceding sentence is an absolute, present and
continuing guarantee of payment and performance of obligations and not of
collectibility and is in no way conditional or contingent upon any attempt to
collect from the Purchaser or upon any other action, occurrence or circumstance
whatsoever.  It shall not be necessary for BNP Energy Trading, in order to
enforce such payment and performance by the Guarantor, first to institute suit
or exhaust its remedies against the Purchaser or any other person liable with
respect to any Guaranteed Obligations.
 
 
2.           Obligations Absolute.  The obligations of the Guarantor to BNP
Energy Trading hereunder shall be absolute, continuing and unconditional and
shall not be released, discharged or in any way affected by (except to the
extent the Purchaser is so affected other than as set forth in (e) and
(j)  below), any of the following:
 
 
(a)           any amendment to, modification of, or supplement to the Purchase
and Sale Contract or any assignment or transfer of any rights or obligations
thereunder;
 
 
(b)           any release, consent or waiver, by operation of law or otherwise,
of the payment, performance or observance by the Purchaser or any other person
of any express or implied agreement, covenant, term, obligation or condition
under the Purchase and Sale Contract;
 
 
(c)           any extension of the time for the payment of all or any portion of
any sums payable under the Purchase and Sale Contract or the extension of time
for the payment or performance of any obligations under, arising out of or in
connection with the Purchase and Sale Contract;
 
 
(d)           any failure, omission, delay or lack of diligence on the part of
BNP Energy Trading or any other person to enforce, assert or exercise, or any
waiver of, any right, privilege, power or remedy conferred on BNP Energy
Trading  or any other person by the Purchase and Sale Contract, or any action on
the part of BNP Energy Trading or such other person granting indulgence or
extension of any kind;
 
 
(e)           any bankruptcy, insolvency, readjustment, composition,
liquidation, dissolution or similar proceeding or any other defense that may
arise in connection with any such proceeding with respect to the Purchaser,
the Guarantor or any other person;
 
 
(f)           any change in the corporate or partnership structure, existence or
ownership of the Guarantor, the Purchaser or BNP Energy Trading, or any sale,
lease or transfer of any or all of the assets of the Guarantor or the Purchaser
to any person;
 
 
(g)           any failure on the part of the Purchaser for any reason to comply
with or perform any of the terms of any other agreement with the Guarantor;
 
 
(h)           the settlement or compromise of any Guaranteed Obligations;
 
(i)           any law, regulation or order hereafter in effect in any
jurisdiction affecting any of the rights under or terms of the Purchase and Sale
Contract; or
 
(j)           any other circumstance that might otherwise constitute a legal or
equitable discharge of the Purchaser.
 
 
3.           Waiver.  With respect to BNP Energy Trading, the Guarantor
unconditionally waives, to the fullest extent permitted by law: (a) notice of
acceptance hereof, of any action taken or omitted in reliance hereon, of demand,
and of the defaults by the Purchaser in the payment or performance of any
Guaranteed Obligations, and of any of the matters referred to in Section 2; (b)
all notices that may otherwise be required by statute, rule of law or otherwise
to preserve any of the rights of BNP Energy Trading against the Guarantor,
including presentment to or demand for payment from the Purchaser or the
Guarantor, or notice to the Purchaser of claims with a court in the event of the
bankruptcy of the Purchaser; and (c) any requirement of diligence on the part of
BNP Energy Trading.
 
 
4.           Reinstatement of Guaranty.  This Agreement shall continue to be
effective, or be reinstated, as the case may be, if and to the extent at any
time any payment, in whole or in part, made by the Purchaser or the Guarantor to
BNP Energy Trading in respect of any Guaranteed Obligations is rescinded or must
otherwise be restored or returned by BNP Energy Trading  upon the insolvency,
bankruptcy, dissolution, liquidation or reorganization of the Purchaser, or upon
or as a result of the appointment of a custodian, receiver, trustee or other
officer with similar powers with respect to the Purchaser or any substantial
part of its property, or otherwise, all as though such payments had not been
made and, to the extent permitted by applicable law, in such event, the
Guarantor shall be liable to BNP Energy Trading for an amount equal to the
payment that has been rescinded or returned, and, as such, the Guarantor shall
pay to BNP Energy Trading such amount equal to the payment that has been
rescinded or returned within three (3) days after written demand therefor has
been made to the Guarantor by BNP Energy Trading.  BNP Energy Trading shall not
be required to litigate or otherwise dispute its obligation to make such
repayments if it in good faith believes that such obligation exists and has so
made such repayments.
 
 
5.           Representations, Covenants and Warranties of the Guarantor.  As of
the date hereof, the Guarantor represents, covenants and warrants that it is
Solvent (as defined below) and able to pay its respective debts as they mature,
and owns assets and property which in the aggregate have a fair value greater
than the amount required to pay its debts as they mature.  “Solvent”  means with
respect to the Guarantor (a) the fair value of the property of the Guarantor
exceeds its total liabilities including, without limitation, contingent
liabilities, (b) the present fair saleable value of the assets of the Guarantor
is not less than the amount that will be required to pay its probable liability
on its debts as they become absolute and matured, (c) the Guarantor does not
intend to, and does not believe that it will, incur debts or liabilities beyond
its ability to pay as such debts and liabilities mature and (d) the Guarantor is
not engaged, and is not about to engage, in business or a transaction for which
its property would constitute unreasonably small capital.
 

6.           Subordination. The Subordinated Debt (as defined below) is
expressly subordinated to the full and final payment of the Guaranteed
Obligations.  The Guarantor may accept payment of Subordinated Debt so long as
no default or circumstance that with the passage of time would result in a
default exists, but the Guarantor agrees not to accept any payment of any
Subordinated Debt from the Purchaser if a default or circumstance that with the
passage of time would result in a default exists under the Purchase and Sale
Contract. If the Guarantor receives any payment of any Subordinated Debt in
violation of the foregoing, the Guarantor shall hold that payment in trust for
BNP Energy Trading  and promptly turn it over to BNP Energy Trading, in the form
received (with any necessary endorsements), to be applied to the Guaranteed
Obligations.  “Subordinated Debt” means all present and future payment
obligations of the Purchaser to the Guarantor, whether those obligations are (a)
direct, indirect, fixed, contingent, liquidated, unliquidated, joint, several,
or joint and several, (b) due or to become due to the Guarantor, (c) held by or
are to be held by the Guarantor, (d) created directly or acquired by assignment
or otherwise, or (e) evidenced in writing.
 
7.           Subrogation and Contribution. Until all obligations under the
Purchase and Sale Contract have expired or been canceled, and the Guaranteed
Obligations have been fully paid and performed (the “Deferment Date”) (a) the
Guarantor may not assert, enforce, or otherwise exercise any right of
subrogation to any of the rights of BNP Energy Trading or any other beneficiary
against the Purchaser or any other obligor on the Guaranteed Obligations or any
right of recourse, reimbursement, subrogation, contribution, indemnification, or
similar right against the Purchaser or any other obligor on any Guaranteed
Obligations or any guarantor of it, and (b) the Guarantor defers all of the
foregoing rights (whether they arise in equity, under contract, by statute,
under common law, or otherwise) until the Deferment Date.
 
 
8.           Notices.  All notices, requests, demands, claims, and other
communications hereunder (“Notice”) shall be in writing and shall be (i)
delivered personally, (ii) mailed by registered or certified mail, postage
prepaid and return receipt requested, (iii) by facsimile or (iv) by electronic
mail as set forth below:
 

If to the Guarantor:                               Frontier Oil Corporation
10000 Memorial Drive, Suite 600
Houston, TX 77024-0616
Attn: Doug Aron, Vice President – Corporate Finance
Facsimile:  713-688-0616
Telephone: 713-688-5628

with a copy to:                                      Frontier Oil Corporation
                10000 Memorial Drive, Suite 600
Houston, TX 77024-0616
Attn: Currie Bechtol, General Counsel
Facsimile:  713-688-0616
                Telephone: 713-688-0881

If to BNPP ET:                                       BNP Paribas Energy Trading
GP
1100 Louisiana, Suite 4900
Houston, TX 77002
Attention:  Legal
Telephone No.:  713-393-6882
Telecopier No.:  713-393-6992

with a copy to:                                      BNP Paribas
Energy Commodities Export Project
787 Seventh Avenue
New York, NY  10019
Attn:  Keith Cox
Facsimile:  212-841-2536
Telephone:  212-841-2575

If to BNPP ETC:                                    BNP Paribas Energy Trading
Canada Corp.
Suite 1230, 335 - 8th Avenue S.W.
Calgary, Alberta  T2P 1C9
Attention:  Secretary
Telephone No.:  [_______________]
Telecopier No.:  [_______________]

with a copy to:                                      BNP Paribas
Energy Commodities Export Project
787 Seventh Avenue
New York, NY  10019
Attn:  Keith Cox
Facsimile:  212-841-2536
Telephone:  212-841-2575

Notice given by personal delivery or mail shall be effective upon actual
receipt.  Notice given by telecopy or electronic mail shall be effective upon
actual receipt if received during the recipient's normal business hours, or at
the beginning of the recipient's next business day after receipt if not received
during the recipient's normal business hours.  All Notices by facsimile or
electronic mail shall be confirmed promptly after transmission in writing by
certified mail or personal delivery.    Any Party may change the address to
which Notices are to be delivered by giving the other Party notice in the manner
herein set forth.
 
 
9.           Construction.  The Parties have participated jointly in the
negotiation and drafting of this Agreement.  In the event an ambiguity or
question of intent or interpretation arises, this Agreement shall be construed
as if drafted jointly by the Parties and no presumption or burden of proof shall
arise favoring or disfavoring any Party by virtue of the authorship of any of
the provisions of this Agreement.  Any reference to any federal, state, local,
or foreign statute or law shall be deemed also to refer to all rules and
regulations promulgated thereunder, unless the context requires otherwise.  The
word “including” shall mean including without limitation. All personal pronouns
used in this Agreement, whether used in the masculine, feminine or neuter
gender, shall include all other genders; the singular shall include the plural,
and vice versa. All references herein to Sections or subdivisions thereof shall
refer to the corresponding Section or subdivision thereof of this Agreement
unless specific reference is made to such sections or subdivisions of another
document or instrument. The terms “herein,” “hereby,” “hereunder,” “hereof,”
“hereinafter,” and other equivalent words refer to this Agreement in its
entirety and not solely to the particular portion of the Agreement in which such
word is used.
 
 
10.           Severability. Any term or provision of this Agreement that is
invalid or unenforceable in any situation in any jurisdiction shall not affect
the validity or enforceability of the remaining terms and provisions hereof or
the validity or enforceability of the offending term or provision in any other
situation or in any other jurisdiction.
 
 
11.           Entire Agreement; Amendment. THIS AGREEMENT (INCLUDING THE
DOCUMENTS REFERRED TO HEREIN) CONSTITUTES THE ENTIRE AGREEMENT AMONG THE PARTIES
AND SUPERSEDES ANY PRIOR UNDERSTANDINGS, AGREEMENTS, OR REPRESENTATIONS BY OR
AMONG THE PARTIES, WRITTEN OR ORAL, TO THE EXTENT THEY HAVE RELATED IN ANY WAY
TO THE SUBJECT MATTER HEREOF.  No amendment of any provision of this Agreement
shall be valid unless the same shall be in writing and signed by the Guarantor
and BNP Energy Trading.
 
 
12.           Term of Agreement.  This Agreement and all guarantees, covenants
and agreements of the Guarantor contained herein shall continue in full force
and effect and shall not be discharged until the earlier to occur of:  (i) all
of the Purchase and Sale Contract shall have terminated or expired, or all of
the Guaranteed Obligations shall be indefeasibly paid in full in cash or
otherwise performed and discharged in full, or (ii) upon written consent of the
Guarantor  and BNP Energy Trading.
 
 
13.           Survival of Representations and Warranties.  All representations
and warranties contained herein or made in writing or on behalf of the Guarantor
in connection herewith shall survive the execution and delivery of this
Agreement.
 
 
14.           Governing Law; Waiver of Jury Trial.
 
 
(a)           THIS AGREEMENT SHALL BE GOVERNED BY AND CONSTRUED IN ACCORDANCE
WITH THE DOMESTIC LAWS OF THE STATE OF NEW YORK WITHOUT GIVING EFFECT TO ANY
CHOICE OR CONFLICT OF LAW PROVISION OR RULE (WHETHER OF THE STATE OF NEW YORK OR
ANY OTHER JURISDICTION) THAT WOULD CAUSE THE APPLICATION OF THE LAWS OF ANY
JURISDICTION OTHER THAN THE STATE OF NEW YORK.
 
 
(b)           EACH OF THE PARTIES HERETO HEREBY IRREVOCABLY WAIVES TO THE
FULLEST EXTENT PERMITTED BY LAW ALL RIGHT TO TRIAL BY JURY IN ANY PROCEEDING
ARISING OUT OF OR RELATING DIRECTLY OR INDIRECTLY TO THIS AGREEMENT OR THE
TRANSACTIONS CONTEMPLATED HEREBY (WHETHER BASED ON CONTRACT, TORT OR ANY OTHER
THEORY).  EACH PARTY HERETO (i) CERTIFIES THAT NO REPRESENTATIVE, AGENT OR
ATTORNEY OF ANY OTHER PARTY HAS REPRESENTED EXPRESSLY OR OTHERWISE, THAT SUCH
PARTY WOULD NOT, IN THE EVENT OF LITIGATION, SEEK TO ENFORCE THE FOREGOING
WAIVER AND (ii) ACKNOWLEDGES THAT IT AND THE OTHER PARTIES HERETO HAVE BEEN
INDUCED TO ENTER INTO THIS AGREEMENT BY, AMONG OTHER THINGS, THE MUTUAL WAIVERS
AND CERTIFICATIONS IN THIS PARAGRAPH.
 

15.           Attorneys’ Fees.  In the event of any litigation or other
proceedings to enforce this Agreement, the prevailing Party or Parties shall be
entitled to recover all reasonable attorneys’ fees and expenses incurred in
connection therewith.
 
16.           Collective Reference to BNP Energy Trading.     The Parties hereto
acknowledge that BNPP ET and BNPP ETC are each considered a seller under the
Purchase and Sale Contract; however, given that BNPP ET and BNPP ETC are
affiliates and each is a subsidiary of BNP Paribas, and that the Guarantor’s
guarantee under this Agreement applies to each, the Parties have chosen to refer
to them collectively for convenience.
 

[Remainder of page intentionally left blank]

 
 

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

 

IN WITNESS WHEREOF, the Guarantor has caused this Agreement to be duly executed
and delivered as of the date and year first written in the preamble to this
Agreement.
 

 
FRONTIER OIL CORPORATION

By:   /s/ Doug S.
Aron                                                                  
                                                                 Doug S. Aron
                                                                 Executive Vice
President and Chief Financial Officer

ACKNOWLEDGED AND ACCEPTED

BNP PARIBAS ENERGY TRADING GP

By:        /s/ Nicolas
Blanchy                                                          
Name:   Nicolas
Blanchy                                                               
Title:     Chief Executive
Officer                                                             

By:         /s/ Jennifer
Jackson                                                         
Name:    Jennifer
Jackson                                                              
Title:      Chief Financial Officer and
Treasurer                                                            

BNP PARIBAS ENERGY TRADING CANADA CORP.

By:         /s/ Bruce
Bianchini                                                         
Name:    Bruce
Bianchini                                                              
Title:      Chief Executive Officer and
Director                                                            

By:          /s/ Daniel
Grenier                                                        
Name:     Daniel
Grenier                                                             
Title:       Director