4. Debt | Debt consists of the following: March 31, 2018 December 31, 2017 Third Eye Capital term notes $ 7,024 $ 6,931 Third Eye Capital revolving credit facility 38,523 35,371 Third Eye Capital revenue participation term notes 11,794 11,636 Third Eye Capital acquisition term notes 23,352 20,048 Third Eye Capital promissory note 2,287 - Cilion shareholder seller notes payable 5,861 5,824 Subordinated notes 9,016 8,725 EB-5 long term promissory notes 36,247 36,039 Unsecured working capital loans 3,606 4,861 GAFI Term and Revolving loans 24,480 24,351 Total debt 162,190 153,786 Less current portion of debt 35,156 15,625 Total long term debt $ 127,034 $ 138,161 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). On January 4, 2018, a Promissory Note (the January 2018 Note) for $160 thousand 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) April 1, 2018. In consideration of the January 2018 Note, $10 thousand of the total proceeds were paid to Third Eye Capital as financing charges. As of March 31, 2018, the outstanding balance of principal and interest on the January 2018 note was $162 thousand. On April 1, 2018, the January 2018 Note was paid in full. On February 27 2018, a Promissory Note (the February 2018 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) April 30, 2018. In consideration of the February 2018 Note, $0.1 million of the total proceeds were paid to Third Eye Capital as financing charges. As of March 31, 2018, the outstanding balance of principal and interest on the February 2018 note was $2.1 million. On March 27, 2018, Third Eye Capital agreed to Limited Waiver and Amendment No. 14 to the Note Purchase Agreement, or Amendment No. 14, to: (i) extend the maturity date of the Third Eye Capital Notes two years to April 1, 2020 in exchange for an amendment fee consisting of 6% (3% per year) of the outstanding note balance in the form of an increase in the fee payable in the event of a redemption of the Third Eye Capital Notes (as defined in the Note Purchase Agreement); (ii) provide that the maturity date may be further extended at our election to April 1, 2021 in exchange for an extension fee of 5%; (iii) provide for an optional waiver of the ratio of note indebtedness covenant until January 1, 2019 with the payment of a waiver fee of $0.25 million; and (iv) remove the redemption fee described in (i) above from the calculation of the ratio of note indebtedness covenant. In addition to the fee discussed in (i), as consideration for such amendment and waiver, the borrowers also agreed to pay Third Eye Capital an amendment and waiver fee of $0.5 million to be added to the outstanding principal balance of the Revolving Credit Facility. We have evaluated Amendment No. 14 in accordance with ASC 470-60 Troubled Debt Restructuring. Troubled Debt Restructuring On March 27, 2018, Third Eye Capital agreed to a one-year reserve liquidity facility governed by a promissory note, payable in the principal amount of up to six million dollars. Borrowings under the facility are available from March 27, 2018 until maturity on April 1, 2019. Interest on borrowed amounts accrues at a rate of 30% per annum, paid monthly in arrears, or 40% if an event of default has occurred and continues. The outstanding principal balance of the indebtedness evidenced by the promissory note, plus any accrued but unpaid interest and any other sums due thereunder, shall be due and payable in full at the earlier to occur of (a) the closing of any new debt or equity financing, refinancing or other similar transaction between Third Eye Capital or any fund or entity arranged by them and the Company or its affiliates, (b) receipt by the Company or its affiliates of proceeds from any sale, merger, equity or debt financing, refinancing or other similar transaction from any third party and (c) April 1, 2019. The promissory note is secured by liens and security interests upon the property and assets of the Company. If any amounts are drawn under the facility, the Company will pay a non-refundable fee in the amount of $0.2 million payable from the proceeds of the first drawing under the facility. As of March 31, 2018, no draws were outstanding on this Note. Terms of Third Eye Capital Notes A. Term Notes B. Revolving Credit Facility C. Revenue Participation Term Notes D. Acquisition Term Notes D. Reserve Liquidity Notes 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 terms of the Third Eye Capital Notes allow the lender to accelerate the maturity in the occurrence of any event that could reasonably be expected to have a material adverse effect, such as any change in the business, operations, or financial condition. The Third Eye Capital Notes are secured by first priority liens on all real and personal property of, and assignment of proceeds from all government grants and guarantees from Aemetis, Inc. The Third Eye Capital Notes all 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. Cilion shareholder seller notes payable Subordinated Notes On January 1, 2018, the Subordinated Notes were amended to extend the maturity date until the earlier of (i) June 30, 2018; (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, 2018 amendment and the refinancing terms of the Subordinated Notes and applied modification accounting treatment in accordance with ASC 470-50 Debt – Modification and Extinguishment At March 31, 2018 and December 31, 2017, the Company had, in aggregate, $9.0 million and $8.7 million in principal and interest outstanding, respectively, under the Subordinated Notes. On January 14, 2013, Laird Cagan, a related party, loaned $0.1 million through a promissory note with a five percent annualized interest rate and the right to exercise 5 thousand warrants exercisable at $0.01 per share. On December 12, 2017, Company issued 165,375 shares of common stock to extinguish this promissory note. 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. 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 to the date of this filing. As of March 31, 2018, $34.5 million has been released from the escrow amount to the Company. As of April 26, 2018, $0.5 million of the remaining amount has been released to the Company from escrow, with $0.5 million remaining in escrow and $0.5 million to be funded to escrow. As of March 31, 2018, $34.5 million in principal and $1.7 million in accrued interest was outstanding on the EB-5 Notes. Out of the $36.2 million total outstanding, $20.2 million will be due within a year. 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 of Aemetis, Inc. and Goodland Advanced Fuels, Inc. Unsecured working capital loans In November 2008, the Company entered into an operating agreement with Secunderabad Oils Limited (“Secunderabad Oils”). The 2008 agreement provided the working capital and had the first priority lien on assets in return for 30% of the plant’s monthly net operating profit. These expenses were recognized as operational support charges by the Company in the financials. All terms of the 2008 agreement with Secunderabad Oils were terminated to amend the agreement as below. On July 15, 2017, the agreement with Secunderabad Oils was amended to provide the working capital funds for British Petroleum business operations (“BP Operations”) only in the form of inter-corporate deposit for an amount of approximately $2.3 million for a period of 95 days at 14.75% per annum interest rate. Secunderabad Oils has a second priority lien on the assets of the Company’s Kakinada plant after this agreement. During the three months ended March 31, 2018 and 2017, the Company made principal and interest payments to Secunderabad Oils of approximately $1.4 million and $0.5 million, respectively. As of March 31, 2018 and December 31, 2017, the Company had nil and $1.3 million outstanding under this agreement, respectively. Variable Interest Entity (GAFI) Term loan and Revolving loan On July 10, 2017, GAFI entered into the GAFI Note Purchase Agreement with Third Eye Capital and the noteholders made a party thereto from time to time (the GAFI Noteholders). See “Part I, Item 1. Financial Statements – Note 5. Variable Interest Entity.” Pursuant to the GAFI Note Purchase Agreement, the GAFI Noteholders agreed, subject to the terms and conditions of the GAFI Note Purchase Agreement and relying on each of the representations and warranties set forth therein, to make (i) the GAFI Term Loan in an aggregate amount of fifteen million dollars and (ii) the GAFI Revolving Loan in an amount not to exceed ten million dollars in the aggregate. The interest rate per annum applicable to the GAFI Term Loan is equal to 10%. The interest rate per annum applicable to the GAFI Revolving Loan is the greater of the Prime Rate plus seven and three quarters percent (7.75%) and twelve percent (12%). The maturity date of the GAFI Loans is July 10, 2019. The maturity date may be extended at the option of GAFI for up to two additional one-year periods upon prior written notice and upon satisfaction of certain conditions and the payment of a renewal fee for such extension. An initial advance under the GAFI Revolving Loan was made for $2.2 million as a prepayment of interest on the GAFI Term Loan for the first eighteen months of interest payments. In addition, a fee of $1.0 million was paid in consideration to the Noteholders. As of March 31, 2018 and December 31, 2017, GAFI had $15.0 million outstanding on the term loan and $10.0 million on the revolving loan with $0.1 million interest paid in arrears respectively. GAFI, the Company and its subsidiary AAPK also entered into separate intercompany revolving promissory notes (the GAFI Intercompany Notes), dated July 10, 2017, pursuant to which GAFI may, from time to time, lend a portion of the proceeds of the GAFI Revolving Loan borrowed under the GAFI Note Purchase Agreement. As of March 31, 2018 and December 31, 2017, the Company and AAPK had a $5.5 million and $5.7 million outstanding on the GAFI Intercompany Notes. Scheduled debt repayments for the Company’s loan obligations follow: Twelve months ended Mar 31, Debt Repayments 2019 $ 35,156 2020 29,605 2021 95,386 2022 4,000 2023 111 Total debt 164,258 Discounts (2,068 ) Total debt, net of discounts $ 162,190 |