EXHIBIT 10.5




SUBORDINATION AGREEMENT


Laird Q. Cagan





THIS SUBORDINATION AGREEMENT (this “Agreement”), dated as of October 29, 2010 is entered into among LAIRD Q. CAGAN, an individual with an address of 200 Alamos Road, Portola Valley, California 94028 (“Junior Creditor”), AE BIOFUELS, INC., a Nevada corporation (“AEB”), AE ADVANCED FUELS KEYES, INC., a Delaware corporation (“AEAFK,” and together with AEB, individually and collectively, the "Company") and THIRD EYE CAPITAL CORPORATION, as Agent (in such capacity (“Agent”).





WHEREAS, AEB and/or its wholly owned subsidiary, International Biodiesel, Inc., are indebted to Junior Creditor pursuant to a Revolving Line of Credit, dated August 17, 2009 which is secured by a lien on all assets of AEB pursuant to a Security Agreement, dated August 17, 2009;





WHEREAS, AEB has entered into that certain Note and Warrant Purchase Agreement, dated as of May 16, 2008 with Agent and the Purchasers a party thereto (as amended, supplemented or otherwise modified from time to time, the “AEB Purchase Agreement”) pursuant to which the Purchasers a party thereto have made loans and other financial accommodations to AEB;





WHEREAS, AEAFK has entered into that certain Note Purchase Agreement, dated as of October 18, 2010 with Agent and the Purchasers a party thereto (as amended, supplemented or otherwise modified from time to time, the “AEAFK Purchase Agreement,” and together with the AEB Purchase Agreement, collectively, the “Purchase Agreements”) pursuant to which the Purchasers a party thereto have made loans and other financial accommodations to AEAFK;





WHEREAS, the AEB Purchase Agreement is secured by a first priority security interest in all working capital assets of AEB, and the AEAFK Purchase Agreement is secured by a first priority security interest in all assets of AEAFK, and all collateral and guarantees for the Purchase Agreements are cross-collateralized, cross-secured and cross-defaulted;





WHEREAS, AEB has requested that Agent and Purchasers consent to further modifications and waivers under the AEB Purchase Agreement; and





WHEREAS, it is a condition to Agent and Purchasers entering into the AEAFK Purchase Agreement and granting the modifications and waivers to the AEB Purchase Agreement that the Company and Junior Creditor execute and deliver this Agreement to evidence the subordination of all obligations of the Company to Junior Creditor to all obligations of the Company to Agent and Purchasers and to set forth the relative priorities of any liens in any assets of the Company and its subsidiaries securing such obligations, as more fully set forth below;




1





NOW, THEREFORE, for good and valuable consideration, receipt whereof is hereby acknowledged, the undersigned agrees as follows:





1.  All obligations of the Company, howsoever created, arising or evidenced, whether direct or indirect, absolute or contingent, now or hereafter existing, or due or to become due, are called "Liabilities".  All Liabilities of the Company to Agent and/or Purchasers under or in connection with the Purchase Agreements are called "Senior Liabilities"; and all Liabilities of the Company to Junior Creditor are called "Junior Liabilities"; it being expressly understood and agreed that the term "Senior Liabilities," as used herein, shall include, without limitation, any and all interest accruing on any of the Senior Liabilities after the commencement of any proceedings referred to in Section 4, notwithstanding any provision or rule of law which might restrict the rights of Agent and/or Purchasers, as against the Company or anyone else, to collect such interest.





2.  Notwithstanding any financing statements or other instruments perfecting liens securing any of the Junior Liabilities, the Agent’s liens and security interests in any and all assets of the Company and any of its subsidiaries and affiliates (collectively, the “Collateral”), shall at all times be prior and senior to each and every lien and security interest in any such Collateral held by Junior Creditor or otherwise securing the Junior Liabilities regardless of the time, manner or order of perfection or attachment of any such security interest or other lien, the time or order of the filing of any financing statement or any other matter whatsoever, and whether any such security interest or other lien of Agent or any Purchaser is set aside, avoided or unperfected, and Junior Creditor hereby expressly subordinates all of its liens and security interests on any Collateral securing the Junior Liabilities to each and every lien and security interest in the Collateral now or hereafter held by Agent.  In furtherance of the foregoing, the Junior Creditor agrees not to contest the validity, perfection, priority or enforceability of the Senior Liabilities or any of the documents evidencing such Senior Liabilities or any collateral securing such Senior Liabilities, or, without the prior written consent of Agent, take any action to perfect any security interest in or other lien on any Collateral.  In the event that Agent releases or agrees to release any security interest or other lien in any such Collateral in connection with the sale or other disposition thereof or any such Collateral is sold, disposed of or retained pursuant to a foreclosure or similar action, the Junior Creditor shall promptly deliver or execute and deliver (as appropriate) such termination statements and releases as Agent shall request to release any security interest or other lien of the Junior Creditor covering any of such Collateral that is the subject of such release, sale, disposition or retention. In furtherance of the foregoing, the Junior Creditor hereby appoints Agent as attorney-in-fact for Junior Creditor, with full authority in the place and stead of Junior Creditor and in the name of Junior Creditor or otherwise, to deliver or execute and deliver (as appropriate) any document, agreement, instrument or other writing which the Junior Creditor may be requested to deliver pursuant to this Section 2.  Agent shall have the exclusive right as to the exercise and enforcement of all privileges and rights with respect to the Collateral in its sole discretion, including, without limitation, the exclusive right to take or retake control or possession of such Collateral and to hold, prepare for sale, process, sell, lease, dispose of, or liquidate such Collateral or settle or adjust insurance claims with respect thereto.





3.  Except as expressly otherwise provided herein or as Agent and Purchasers may hereafter otherwise expressly consent in writing, the payment of all Junior Liabilities shall be postponed and subordinated to the payment in full in cash of all Senior Liabilities, and no payment or other distribution whatsoever in respect of any Junior Liabilities shall be made, nor shall any property or assets of any Company be applied to the purchase or other acquisition or retirement of any Junior Liabilities until all Senior Liabilities have been paid in full in cash provided that there are excepted from the terms of the foregoing provisions of this Section 3 those payments to the undersigned by the Company that are listed as exceptions on Schedule I hereto. Except as expressly permitted under Schedule I, each of the Company and the Junior Creditor agree that until all Senior Liabilities are indefeasibly paid in full in cash to Agent and Purchasers, neither Company nor any of its subsidiaries or affiliates shall, directly or indirectly, make any payment of any Junior Liabilities and that no Collateral or guarantees or proceeds thereof will be enforced or applied to any Junior Liabilities, except in favor of Agent and Purchasers as provided herein or as expressly permitted under this Agreement.




2





4.  The Junior Creditor shall not take any Enforcement Action with respect to any Junior Liabilities, the Company, its subsidiaries and affiliates or any of the obligors of the Junior Liabilities or the Collateral until the Senior Liabilities have been indefeasibly paid in full in cash and the Purchase Agreement has been terminated.  “Enforcement Action” shall mean any action, whether legal, equitable, judicial, non-judicial or otherwise, to collect or receive any amounts under or with respect to the Junior Liabilities or to enforce or realize upon any lien, security interest, restriction, encumbrance, charge, claim, right or other interest or arrangement now or in the future existing, including, without limitation, any repossession, foreclosure, public sale, private sale, collection, receipt, obtaining of a receiver or retention of all or any part of amounts paid pursuant to the Junior Liabilities or the Collateral, or any acceleration of the Junior Liabilities or the exercise or enforcement of any other right, power or remedy with respect to the Junior Liabilities or the Collateral.





5.  Junior Creditor and the Company will, from time to time, (a) promptly notify Agent and Purchasers of the creation of any Junior Liabilities of the Company, and of the issuance of any promissory note or other instrument to evidence any Junior Liabilities, and (b) upon request by Agent and Purchasers, cause any Junior Liabilities which are not evidenced by a promissory note or other instrument of any Company to be so evidenced.





6.  In the event of any dissolution, winding up, liquidation, reorganization or other similar proceeding relating to any Company or to its creditors, as such, or to its property (whether voluntary or involuntary, partial or complete, and whether in bankruptcy, insolvency or receivership, or upon an assignment for the benefit of creditors, or any other marshalling of the assets and liabilities of any Company, or any sale of all or substantially all of the assets of any Company, or otherwise), all Senior Liabilities shall first be paid in full in cash before the undersigned shall be entitled to receive and to retain any payment or distribution in respect of any of the Junior Liabilities, and, in order to implement the foregoing:





(a)  all payments and distributions of any kind or character in respect of the Junior Liabilities to which the undersigned would be entitled if the Junior Liabilities were not subordinated pursuant to this Agreement shall be made directly to Agent and Purchasers until all Senior Liabilities shall first be paid in full,





(b)  the undersigned shall promptly file a claim or claims, in the form required in such proceeding, for the full outstanding amount of the Junior Liabilities, and shall cause said claim or claims to be approved and all payments and other distributions in respect thereof to be made directly to Agent and Purchasers until all Senior Liabilities shall first be paid in full, and





(c)  the undersigned hereby irrevocably agrees that Agent and Purchasers may, at its sole discretion, in the name of the undersigned or otherwise, demand, sue for, collect, receive and receipt for any and all such payments or distributions, and file and prove, and vote or consent in any such proceedings with respect to, any and all claims of the undersigned relating to the Junior Liabilities until all Senior Liabilities shall first be paid in full.





7.  In the event that the undersigned receives any payment or other distribution of any kind or character from any Company or from any other source whatsoever in respect of any of the Junior Liabilities, other than as expressly permitted by the terms of this Agreement, such payment or other distribution shall be received in trust for Agent and Purchasers and promptly turned over by the undersigned to Agent and Purchasers.  The undersigned will cause to be clearly inserted in any promissory note or other instrument which at any time evidences any of the Junior Liabilities a statement to the effect that the payment thereof is subordinated in accordance with the terms of this Agreement.  The undersigned will execute such further documents or instruments and take such further action as Agent and Purchasers may reasonably from time to time request to carry out the intent of this Agreement.




3





8.  All payments and distributions received by Agent and Purchasers in respect of the Junior Liabilities, to the extent received in or converted into cash, may be applied by Agent and Purchasers first to the payment of any and all expenses (including reasonable attorneys' fees and legal expenses) paid or incurred by Agent and Purchasers in enforcing this Agreement or in endeavoring to collect or realize upon any of the Junior Liabilities or any security therefor, and any balance thereof shall be applied by Agent and Purchasers, in such order of application as Agent and Purchasers may from time to time select, toward the payment of the Senior Liabilities remaining unpaid; but, as between the Company and its creditors, no such payment or distribution of any kind or character shall be deemed to be a payment or distribution in respect of the Senior Liabilities; and, notwithstanding any such payment or distribution received by Agent and Purchasers in respect of the Junior Liabilities and so applied by Agent and Purchasers toward the payment of the Senior Liabilities, the undersigned shall be subrogated to the then existing rights of Agent and Purchasers in respect of the Senior Liabilities only at such time as this Agreement shall have been discounted and the Senior Liabilities shall have been finally paid in full in cash.





9.  The undersigned hereby waives:





(a)  notice of acceptance by Agent and Purchasers of this Agreement;





(b)  notice of the existence or creation or non-payment of all or any of the Senior Liabilities; and





(c)  all diligence in collection or protection of or realization upon the Senior Liabilities or any thereof or any security therefor.





10.  The undersigned will not without the prior written consent of Agent and Purchasers:





(a)  cancel, waive, forgive, transfer or assign, or attempt to enforce or collect, or subordinate to any Liabilities other than the Senior Liabilities, any Junior Liabilities or any rights in respect thereof;





(b)  convert any Junior Liabilities into stock or other equity interests; or





(c)  commence, or join with any other creditor in commencing, any bankruptcy, reorganization or insolvency proceeding with respect to any Company.





11.  This Agreement shall in all respects be a continuing agreement and shall remain in full force and effect (notwithstanding, without limitation, the dissolution of the undersigned or that at any time or from time to time all Senior Liabilities may have been paid in full) until all Senior Liabilities shall have been finally paid in full in cash and all commitments under and as defined in the Purchase Agreement shall have terminated.





12.  Agent and Purchasers may, from time to time, at its sole discretion and without notice to the undersigned take any or all of the following actions:





(a)  retain or obtain security interest in any property to secure any of the Senior Liabilities,





(b)  retain or obtain the primary or secondary obligation of any other obligor or obligors with respect to any of the Senior Liabilities,





(c)  extend or renew for one or more periods (whether or not longer than the original period), alter or exchange any of the Senior Liabilities, or release or compromise any obligation of any nature of any obligor with respect to any of the Senior Liabilities, and





(d)  release its security interest in, or surrender, release or permit any substitution  or exchange for, all or any part of any property securing any of the Senior Liabilities, or extend or renew for one or more periods (whether or not longer than the original period) or release, compromise, alter or exchange any obligation of any nature of any obligor with respect to any such property.




4





13.  Agent and Purchasers may, from time to time, without notice to the undersigned, assign or transfer its interest in any or all of the Senior Liabilities; and, notwithstanding any such assignment or transfer or any subsequent assignment or transfer thereof, such Senior Liabilities shall be and remain Senior Liabilities for the purposes of this Agreement, and every immediate and successive assignee or transferee of any of the Senior Liabilities or of any interest therein shall, to the extent of the interest of such assignee or transferee in the Senior Liabilities, be entitled to the benefits of this Agreement to the same extent as the applicable assignor or transferor.





14.  Agent and Purchasers shall not be prejudiced in its rights under this Agreement by any act or failure to act of the Company or the undersigned, or any noncompliance of the Company or the undersigned with any agreement or obligation, regardless of any knowledge thereof which Agent and Purchasers may have or with which Agent and Purchasers may be charged; and no action of Agent and Purchasers permitted hereunder shall in any way affect or impair the rights of Agent and Purchasers and the obligations of Junior Creditor or any Company under this Agreement.





15.  No delay on the part of Agent and Purchasers in the exercise of any right or remedy shall operate as a waiver thereof, and no single or partial exercise by Agent and Purchasers of any right or remedy shall preclude other or further exercise thereof or the exercise of any other right or remedy; nor shall any modification or waiver of any provision of this Agreement be binding upon Agent and Purchasers except as expressly set forth in a writing duly signed and delivered on behalf of Agent and Purchasers.





16.  This Agreement shall be binding upon the undersigned and upon the successors and assigns of the undersigned; and all references herein to the Company and to Junior Creditor, respectively, shall be deemed to include their respective heirs, successors or assigns.





17.  This Agreement shall be construed in accordance with and governed by the laws of the State of New York.  Wherever possible each provision of this Agreement shall be interpreted in such manner as to be effective and valid under applicable law, but if any provision of this Agreement shall be prohibited by or invalid under such law, such provision shall be ineffective to the extent of such prohibition or invalidity, without invalidating the remainder of such provision or the remaining provisions of this Agreement.





18.  The undersigned (and, by accepting the benefits hereof, Agent and Purchasers) expressly waive any right to a trial by jury in any action or proceeding to enforce or defend any rights under this Agreement or under any amendment, instrument, document or agreement delivered or which may in the future be delivered in connection herewith or arising from any banking relationship existing in connection with this Agreement and agree that any such action or proceeding shall be tried before a court and not before a jury.




5





IN WITNESS WHEREOF, the undersigned have executed this Agreement as of the date first above written.




JUNIOR CREDITOR:By:
/s/ Laird Q CaganLAIRD Q. CAGANCOMPANY:AE BIOFUELS, INC.By:
/s/Eric A. McAfeeCEOAE ADVANCED FUELS KEYES, INC.By:
/s/ Eric A. McAfeeCEOAGENT:THIRD EYE CAPITAL CORPORATIONBy:
/s/ Arif N. BhalwaniArif N,. BhalwaniManaging Director
  6





SCHEDULE I





EXCEPTIONS





So long an no default or event of default has occurred and is continuing under the Purchase Agreement, Junior Creditor may receive regularly scheduled payments of interest at the non-default rate of interest.