4. Debt | Debt consists of the notes from our senior lender, Third Eye Capital, acting as Agent for the Purchasers (Third Eye Capital), other working capital lenders and subordinated lenders as follows: June 30, 2017 December 31, 2016 Third Eye Capital term notes $ 6,737 $ 6,577 Third Eye Capital revolving credit facility 30,293 24,927 Third Eye Capital revenue participation term notes 11,311 11,042 Third Eye Capital acquisition term notes 19,525 19,085 Third Eye Capital promissory note 3,669 - Cilion shareholder seller notes payable 5,748 5,674 Subordinated notes 8,200 7,565 EB-5 long term promissory notes 35,651 35,027 Unsecured working capital loans 3,697 1,817 Total debt 124,831 111,714 Less current portion of debt 17,217 11,409 Total long term debt $ 107,614 $ 100,305 Third Eye Capital Note Purchase Agreement On July 6, 2012, Aemetis, Inc. and Aemetis Advanced Fuels Keyes, Inc. (“AAFK”), entered into an Amended and Restated Note Purchase Agreement with Third Eye Capital (the “Note Purchase Agreement”). Pursuant to the Note Purchase Agreement, Third Eye Capital extended credit in the form of (i) senior secured term loans in an aggregate principal amount of approximately $7.2 million to replace existing notes held by Third Eye Capital (the “Term Notes”); (ii) senior secured revolving loans in an aggregate principal amount of $18.0 million (“Revolving Credit Facility”); (iii) senior secured term loans in the principal amount of $10.0 million to convert the prior revenue participation agreement to a note (“Revenue Participation Term Notes”); and (iv) senior secured term loans in an aggregate principal amount of $15.0 million (“Acquisition Term Notes”) used to fund the cash portion of the acquisition of Cilion, Inc. (the Term Notes, Revolving Credit Facility, Revenue Participation Term Notes and Acquisition Term Notes are referred to herein collectively as the Original Third Eye Capital Notes). After this financing transaction, Third Eye Capital obtained sufficient equity ownership in the Company to be considered a related party. The Original Third Eye Capital Notes have a maturity date of April 1, 2018. On January 31, 2017, a Promissory Note (the “January 2017 Note”, together with the Original Third Eye Capital Notes, the “Third Eye Capital Notes”) for $2.1 million was advanced by Third Eye Capital to Aemetis, Inc., as a short-term credit facility for working capital and other general corporate purposes with an interest rate of 14% per annum maturing on the earlier of (a) receipt of proceeds from any financing, refinancing, or other similar transaction, (b) extension of credit by payee, as lender or as agent on behalf of certain lenders, to the Company or its affiliates, or (c) May 30, 2017. In addition, as part of the January 2017 Note agreement, Aemetis used $0.5 million of the total proceeds to buy back 275 thousand common shares that were held by Third Eye Capital. In consideration of the January 2017 Note, $133 thousand of the total proceeds were paid to Third Eye Capital as financing charges. As of June 30, 2017, the outstanding balance on the January 2017 Note was $2.1 million. On July 10, 2017, the January 2017 Note was paid in full (see Note 9 Subsequent Events On March 1, 2017, Third Eye Capital agreed to Amendment No. 13 to the Note Purchase Agreement to: (i) extend the maturity date of the Third Eye Capital Notes to April 1, 2018 in exchange for a 5% extension fee consisting of adding $3.1 million to the outstanding principal balance of the Note Purchase Agreement and allowing for the further extension of the maturity date of the Third Eye Capital Notes to April 1, 2019, at the Company’s election, for an additional extension fee of 5% of the then outstanding Third Eye Capital Notes outstanding balance, (ii) waive the free cash flow financial covenant under the Note Purchase Agreement for the three months ended December 31, 2016, (iii) provide that such covenant will be deleted prospectively from the Note Purchase Agreement, (iv) waive the default under the Note Purchase Agreement relating to indebtedness outstanding to Laird Cagan and (v) waive the covenant under the Note Purchase Agreement to permit the Company to pay off the defaulted Laird Cagan subordinated note by issuing stock. The borrowers agreed to use their best efforts to close the transaction to purchase assets in Goodland, Kansas from Third Eye Capital as described in a non-binding offer to purchase letter between an affiliate of the Company and Third Eye Capital. On July 10, 2017, the Goodland transaction was closed. As consideration for such amendment and waiver, the borrowers agreed to pay Third Eye Capital an amendment and waiver fee of $750 thousand to be added to the outstanding principal balance of the Revolving Credit Facility. As a result of the extension of the maturity date in Amendment No. 13, the Third Eye Capital Notes are classified as non-current debt. We evaluated the Amendment of the Notes and applied modification accounting treatment in accordance with ASC 470-50 Debt – Modification and Extinguishment On April 28, 2017, a Promissory Note (the “April 2017 Note”, and together with the Original Third Eye Capital Notes, the “Third Eye Capital Notes”) for $1.5 million was advanced by Third Eye Capital to Aemetis, Inc., as a short-term credit facility for working capital and other general corporate purposes with an interest rate of 14% per annum maturing on the earliest of (a) closing of the Financing, (b) receipt of proceeds from any financing, refinancing or other similar transaction, (c) extension of credit by the Lender, or Agent on behalf of certain lenders or the Noteholders, to the Debtors or their affiliates, and (d) June 15, 2017. In addition, $1 million of this note represents fees payable by Goodland Advanced Fuels, Inc. upon the closing of the Goodland transaction. On July 10, 2017, the April 2017 Note was paid in full (see Note 9 Subsequent Events Terms of Third Eye Capital Notes A. Term Notes B. Revolving Credit Facility C. Revenue Participation Term Note D. Acquisition Term Notes E . January 2017 Note. F . April 2017 Note. The Third Eye Capital Notes contain various covenants, including but not limited to, debt to plant value ratio, minimum production requirements, and restrictions on capital expenditures. The Third Eye Capital Notes are secured by first priority liens on all real and personal property of, and assignment of proceeds from government grants and guarantees from Aemetis, Inc. The Third Eye Capital Notes contain cross-collateral and cross-default provisions. McAfee Capital, LLC (“McAfee Capital”), owned by Eric McAfee, the Company’s Chairman and CEO, provided a guaranty of payment and performance secured by all of its Company shares. In addition, Eric McAfee provided a blanket lien on substantially all of his personal assets, and McAfee Capital provided a guarantee in the amount of $8.0 million. *The note maturity date can be extended by the Company to April 2019. As a condition to any such extension, the Company would be required to pay a fee of 5% of the carrying value of the debt. By this ability to extend the maturity at the Company’s will, the Third Eye Capital Notes are classified as non-current debt. Cilion shareholder seller notes payable Subordinated Notes On January 1, 2017, the Subordinated Notes were amended to extend the maturity date until the earlier of (i) June 30, 2017; (ii) completion of an equity financing by AAFK or Aemetis in an amount of not less than $25.0 million; or (iii) after the occurrence of an Event of Default, including failure to pay interest or principal when due and breaches of note covenants. A 10% cash extension fee was paid by adding the fee to the balance of the new note and warrants to purchase 113 thousand shares of common stock were granted with a term of two years and an exercise price of $0.01 per share. We evaluated the January 1, 2017 amendment and the refinancing terms of the notes and applied modification accounting treatment in accordance with ASC 470-50 Debt – Modification and Extinguishment On July 1, 2017, the Subordinated Notes were amended to extend the maturity date until the earlier of (i) December 31, 2017; (ii) completion of an equity financing by AAFK or Aemetis in an amount of not less than $25.0 million; or (iii) after the occurrence of an Event of Default, including failure to pay interest or principal when due and breaches of note covenants. A 10% cash extension fee was paid by adding the fee to the balance of the new note and warrants to purchase 113 thousand shares of common stock were granted with a term of two years and an exercise price of $0.01 per share. We will evaluate the July 1, 2017 amendment and the refinancing terms of the notes and determine the accounting treatment in accordance with ASC 470-50 Debt – Modification and Extinguishment On January 14, 2013, Laird Cagan, a related party, loaned $0.1 million through a promissory note maturing on December 31, 2016 with a five percent annualized interest rate and the right to exercise 5 thousand warrants exercisable at $0.01 per share. At June 30, 2017, the Company owed, in aggregate, the amount of $8.2 million in principal and interest under the Subordinated Notes. EB-5 long-term promissory notes Advanced BioEnergy, LP arranges investments with foreign investors, who each make loans to the Keyes plant in increments of $0.5 million. As of June 30, 2017, the Company has sold an aggregate principal amount of $36.0 million of EB-5 Notes under the EB-5 Phase I funding since 2012, of which $34.5 million have been released from the escrow amount to the Company, with $0.5 million remaining in escrow and $1.0 million to be funded to escrow. As of June 30, 2017, $34.5 million in principal and $1.2 million in accrued interest remained outstanding. On October 16, 2016, the Company launched its EB-5 Phase II funding, with plans to issue $50.0 million in additional EB-5 Notes on substantially similar terms and conditions as those issued under the Company’s EB-5 Phase I funding to refinance indebtedness and capital expenditures. Unsecured working capital loans On April 16, 2017, the Company entered into a similar operating agreement with Gemini Edibles and Fats India Private Limited (“Gemini”). Under this agreement, Gemini agreed to provide the Company with working capital, on an as needed basis, to fund the purchase of feedstock and other raw materials for its Kakinada biodiesel facility. Working capital advances bear interest at the actual bank borrowing rate of Gemini of twelve percent (12%). In return, the Company agreed to pay Gemini an amount equal to 30% of the plant’s monthly net operating profit and recognized these as operational support charges in the financials. In the event that the Company’s biodiesel facility operates at a loss, Gemini owes the Company 30% of the losses as operational support charges. The agreement can be terminated by either party at any time without penalty. Additionally, Gemini received a first priority lien on the assets of the Kakinada biodiesel facility. During the three months ended June 30, 2017, the Company made principal and interest payments to Gemini of approximately $2.8 million. As of June 30, 2017, the Company had $3.7 million outstanding on this raw material purchase agreement, respectively. In October 2016, the Company made an agreement with a supplier of palm stearin to its Kakinada plant to pay 12% interest on an unpaid balance under the raw material purchase agreement of $1.9 million. As of June 30, 2017 and December 31, 2016, the Company had nil and $1.5 million outstanding on this raw material purchase agreement, respectively. Scheduled debt repayments for loan obligations follow: Twelve months ended June 30, Debt Repayments 2018 $ 17,217 2019 92,027 2020 5,000 2021 13,248 Total debt 127,492 Discounts (2,661 ) Total debt, net of discounts $ 124,831 |