Exhibit 10.17 GUARANTY THIS GUARANTY ("Guaranty") is entered into as of December 31, 1999, by RENTECH, INC., a Colorado corporation ("Rentech"), and REPUBLIC FINANCIAL CORPORATION, a Colorado corporation ("Republic", and collectively with Rentech, "Guarantors"), in favor of SAND CREEK CHEMICAL LIMITED PARTNERSHIP, a Colorado limited partnership ("Sand Creek"), and STATE STREET BANK AND TRUST COMPANY, a Massachusetts trust company (both in its individual capacity and as Owner Trustee for General Electric Capital Corporation under a Trust Agreement dated as of November 1, 1993, "State Street Bank", and collectively with Sand Creek, "Sellers") RECITALS WHEREAS, Sand Creek Energy, LLC, a Colorado limited liability company ("Buyer") and Sellers are entering into an Asset Purchase Agreement, dated as of December 31, 1999 (such agreement, as amended or modified, the "Asset Purchase Agreement"); and WHEREAS, Sellers are willing to enter into the Asset Purchase Agreement only on the condition that Guarantors enter into this Guaranty; and WHEREAS, each of the Guarantors has a substantial equity interest in Buyer and will receive substantial benefits from Sellers entering into and performing their obligations under the Asset Purchase Agreement. NOW, THEREFORE, to induce Sellers to enter into the Asset Purchase Agreement, and for other valuable consideration, the receipt and sufficiency of which are hereby acknowledged, Guarantors agree as follows: 1. Guaranty. 1.1 Guaranty. (a) Guarantors jointly and severally hereby irrevocably, absolutely and unconditionally guarantee the full and punctual performance and payment when due of all the Obligations (as defined below); (i) provided, however, that (A) no claim may be brought under this Guaranty unless notice of such claims or a claim against Buyer with respect to the Obligations is given by either r Seller prior to the fifth anniversary of the date hereof and (B) the aggregate liability of Guarantors under the Guaranty shall not exceed four million dollars ($4,000,000); (ii) provided further, that in the event that Public Service Company of Colorado ("PSCo.") agrees in writing, in form and substance reasonably satisfactory to Sand Creek, to unconditionally and irrevocably release Sand Creek and Intermountain Chemical, Inc. ("ICI") from any and all obligations and liabilities under or relating to that certain letter agreement, dated September 12, 1995, among PSCo., ICI and Conoco, Inc. ("Conoco") (the "Letter Agreement") and the construction and operation of the pipeline referenced therein, then the deadline for bringing any claim as described in clause 1.1(a)(i)(A) above shall be accelerated to the second anniversary of the date hereof and the maximum aggregate liability of the Guarantors under the Guaranty shall be limited to two million dollars ($2,000,000); and (iii) provided further, that in the event that Conoco also agrees in writing, in form and substance reasonably satisfactory to Sand Creek, to unconditionally and irrevocably release Sand Creek and ICI from any and all obligations and liabilities under or relating to the Letter Agreement and the construction and operation of the pipeline referenced herein, then the maximum liability of each of the Guarantors under this Guaranty shall be limited to one million dollars ($1,000,000) and the guaranty of the Guarantors hereunder will become several, but not joint. (b) This Guaranty constitutes a guaranty of performance and payment when due and not merely of collection. Guarantors specifically agree that it shall not be necessary or required that Sellers exercise any right, assert any claim or demand or enforce any remedy whatsoever against Buyer or any other Person before or as a condition to the obligations of Guarantors hereunder. For purposes of this Guaranty, "Person" means any individual, sole proprietorship, partnership, joint venture trust, unincorporated organization, association, corporation, limited liability company, institution, public benefit corporation, entity or government (including without limitation, any instrumentality, division, agency, body or department thereof); (c) This Guaranty shall be construed as a continuing, absolute and unconditional guarantee of payment and performance without regard to (i) the validity, regularity or enforceability of any of the obligations, (ii) any defense, setoff or counterclaim (other than a defense of payment or performance) which may at any time be available to or be asserted by Buyer against Sellers, (iii) until Sellers shall have been paid in full, any right by Guarantors to subrogation or indemnification, or (iv) any other circumstance whatsoever (with or without notice to or knowledge of Buyer or Guarantors) which constitutes, or might be construed to constitute, an equitable or legal discharge of Buyer for the Obligations (other than payment in full of all Obligations), or of Guarantors under this Guaranty, in bankruptcy or in any other instance. 1.2 Obligations Independent. The obligations hereunder are independent of the Obligations of Buyer, and a separate action or actions may be brought and prosecuted against Guarantors whether action is brought against Buyer or whether Buyer is joined in any such action or actions. 1.3 Authorization of Renewals, Etc. Guarantors authorizes Sellers, without notice or demand and without affecting their liability hereunder, from time to time: (a) to renew, compromise, extend, accelerate or otherwise change the time for payment, or otherwise change the terms of the Obligations; (b) to receive and hold security for the payment of this Guaranty or any of the Obligations and exchange, enforce, waive, release, fail to perfect, sell, or otherwise dispose of any such security; (c) to apply such security and direct the order or manner of sale thereof as Sellers in their discretion may determine; and (d) to release or substitute any one of more of any endorsers or guarantors of the Obligations. 1.4 Waiver of Certain Rights. Guarantors waive any right to require Sellers: (a) to proceed against Buyer or any other Person; (b) to proceed against or exhaust any security for the Obligations or any other indebtedness of Buyer to Sellers; or (c) to pursue any other remedy in Sellers' power whatsoever. 1.5 Waiver of Certain Defenses. Guarantors waive any defense arising by reason of any disability or other defense of Buyer, or the cessation from any cause whatsoever of the liability of Buyer other than final payment in full of all Obligations, whether consensual or arising by operation of law or any bankruptcy, conservatorship, receivership, insolvency or debtor relief proceeding, or from any other cause, or any claim that Guarantors' obligations exceed or are more burdensome than those of Buyer either individually or in the aggregate. 1.6 Waiver of Presentments, Etc. Guarantors waive all presentments, demands for performance, notices of nonperformance, protests, notices of protest, notices of dishonor and notices of acceptance of this Guaranty and of the existence, creation, or incurring or new or additional Obligations or any other indebtedness of Buyer to Sellers. 1.7 Information Relating to Buyer. Guarantors acknowledges that it has the ability, and hereby assumes the obligation and responsibility, to keep informed of the financial condition and business operations of Buyer and its affiliates and of other matters of circumstances affecting the ability of any of them to pay or perform their respective obligations to Sellers or the risk of nonpayment and nonperformance. Guarantors hereby waive any obligation on the part of Sellers to inform Guarantors of the financial condition, or any changes in financial condition, of Buyer or any affiliates thereof or of any other matter or circumstance which might affect the ability of Buyer to pay and perform under the Asset Purchase Agreement, or the risk of nonpayment or nonperformance. 1.8 Reinstatement of Guaranty. If any payment or transfer of any interest in property by Buyer to Sellers in fulfillment of any Obligations is rescinded or must at any time (including after the return of cancellation of this Guaranty) be returned, in whole or in part, by Sellers to Buyer or any other Person, upon the insolvency, bankruptcy or reorganization of Buyer or otherwise, this Guaranty shall be reinstated with respect to any such payment or transfer, regardless of any such prior return or cancellation. 1.9 Powers. It is not necessary for Sellers to inquire into the powers of Buyer or of the officers, directors, partners or agents acting or purporting to act on their behalf, and any Obligations made or created in reliance upon the professed exercise of such powers shall be guaranteed hereunder. 2. Representations, Warranties and Agreements of Guarantors. Each of the Guarantors represents and warrants to, and agrees with, Sellers that: 2.1 Corporate Existence and Power. It (a) is a corporation duly organized, validly existing and in good standing under the laws of the jurisdiction of its incorporation; (b) has the power and authority and all governmental licenses, authorizations, consents and approvals to own its assets, carry on its business and to execute, deliver, and perform its obligations under this Guaranty; and (c) is in compliance in all material respects with all requirements of law the failure to comply with which would have a material adverse effect on its ability to fulfill its obligations under this Guaranty 2.2 Corporate Authorization: No Contravention. The execution, delivery and performance by its of this Guaranty has been duly authorized by all necessary corporate action, and do not and will not (a) contravene the terms of its organizational documents; (b) conflict with or result in any breach or contravention of, or the creation of any lien under, any document evidencing any contractual obligation to which it is a party or any order, injunction, writ or decree of any governmental authority to which it is or its property is subject; or (c) violate any requirements of any governmental authority. 2.3 Governmental Authorization. No approval, consent, exemption, authorization, or other action by, or notice to, or filing with, any governmental authority is necessary or required in connection with the execution, delivery or performance by, or enforcement against, it of this Guaranty. 2.4 Binding Effect. This Guaranty constitutes the legal, valid and binding obligations of such Guarantor, enforceable against it in accordance with its terms, except as enforceability may be limited by applicable bankruptcy, insolvency, or similar laws affecting the enforcement of creditors' rights generally or by equitable principles relating to enforceability. 3. Miscellaneous. 3.1 Assignment. This Guaranty shall be binding upon Guarantors and their respective successors and assigns, and shall insure to the benefit of Sellers and their respective successors and assigns, except that neither of the Guarantors may assign or transfer any of its obligations under this Guaranty without the prior written consent of both Sellers. 3.2 Notices. Each notice, report, demand, waiver, consent and other communication required or permitted to be given hereunder shall be in writing and shall be sent (and deemed given upon receipt) (a) by registered or certified first-class mail, postage prepaid and return receipt requested, (b) by Federal Express or comparable overnight courier, or (c) by fax, addressed as follows: If to Sand Creek: Sand Creek Chemical Limited Partnership c/o Baxter Associates, Inc. 1250 West Northwest Highway, Suite 503 Palatine, Illinois 60067 Attn: Reginald R. Baxter with a copy to: GE Capital Services Structured Finance Group 120 Long Ridge Road Stamford, CT 06927 Attn: Manager of Compliance and a copy to: Pillsbury Madison & Sutro LLP 50 Fremont Street San Francisco, CA 94105 Attn: D. Stanley Rowland, Esq. If to State State Street Bank and Trust Company Street Bank: Goodwin Square 225 Asylum Street, Floor 2320 Hartford, CT 06103 Attn: Corporate Trust Administration If to Rentech: Rentech, Inc. 1331 17th Street, Suite 720 Denver, Colorado 80202 Attn: Ronald C. Butz, Esq. If to Republic: Republic Financial Corporation 3300 S. Parker Road, Suite 500 Aurora, CO 80014 Attn: Julie Babcock, Vice President, Legal with a copy to: Otten, Johnson, Robinson, Neff & Ragonetti, P.C. 950 Seventeenth Street, Suite 1600 Denver, CO 80202 Attn: John R. Marcil, Esq. 3.3 Partial Exercise; Amendment. No delay on the part of Sellers in exercising any right, power or privilege hereunder shall operate as a waiver thereof, nor shall any single or partial exercise of any such right, power or privilege preclude other or further exercise thereof or the exercise of any other right, power or privilege or be construed to be a waiver of any breach under the Asset Purchase Agreement. No waiver by Sellers of any such breach shall be effective unless in writing and signed by an authorized officer of Sellers, and no such waiver shall be deemed to be a waiver of a subsequent breach under the Asset Purchase Agreement or be deemed to be a continuing waiver. No course of dealing between Buyer or Guarantors, respectively, and Sellers or their agents or employees shall be effective to change, modify or discharge any provision of this Guaranty or to constitute a waiver of any breach hereunder. 3.4 Remedies Cumulative. All rights and remedies provided in this Guaranty and any instrument or agreement referred to herein are cumulative and are not exclusive of any rights or remedies otherwise provided by law. Any single or partial exercise of any right or remedy shall not preclude the further exercise thereof or the exercise of any other right or remedy. 3.5 Costs and Expenses. Guarantors agree to pay on demand all costs and expenses of Sellers, including attorney costs, in connection with the enforcement of, and preservation of any rights, remedies or interests under, this Guaranty. 3.6 Severability. Whenever possible, each provision of this Guaranty shall be interpreted in such manner as to be effective and valid under all applicable laws and regulations. If, however, any provision of this Guaranty shall be prohibited by or invalid under any such law or regulation in any jurisdiction, it shall, as to such jurisdiction, be deemed modified to conform to the minimum requirements of such law or regulation, or, if for any reason it is not deemed so modified, it shall be ineffective and invalid only to the extent of such prohibition or invalidity without affecting the remaining provisions of this Guaranty, or the validity or effectiveness of such provision in any other jurisdiction. 3.7 Governing Law. This Guaranty shall be governed by the laws of the State of New York without giving effect to choice of law provisions included herein. 3.8 Integration. This Guaranty (a) integrates all the terms and conditions mentioned herein or incidental hereto, (b) supersedes all oral negotiations and prior writings with respect to the subject matter hereof, and (c) is intended by the parities as the final expression of the agreement with respect to the terms and conditions set forth in this Guaranty and as the complete and exclusive statement of the terms agreed to by the parties. 3.9 Counterparts. This Guaranty may be executed in a number of counterparts and by different parties hereto in separate counterparts, each of which when so executed shall be deemed to be an original and all of which taken together shall constitute but one and the same agreement. IN WITNESS WHEREOF, each of Guarantors has caused this Guaranty to be signed in its name by its duly authorized representative as of the date first above mentioned. RENTECH, INC. REPUBLIC FINANCIAL CORPORATION /s/ Dennis L. Yakobson /s/ James H. Possehl By: Dennis L. Yakobson By: James H. Possehl President President ACCEPTED BY: SAND CREEK CHEMICAL LIMITED PARTNERSHIP By: HUBBARD HOLDING COMPANY, as General Partner By: Reginald R. Baxter President STATE STREET BANK AND TRUST COMPANY By: K. Farimor AVP