Debt | Debt Net carrying amounts of debt are as follows: September 30, 2019 December 31, 2018 (In thousands) Principal Unamortized Debt (Discount) Premium Change in Fair Value Net Balance Principal Unamortized Debt (Discount) Premium Change in Fair Value Net Balance Convertible notes payable 6% convertible notes $ 62,825 $ — $ 327 $ 63,152 $ 60,000 $ — $ (2,082 ) $ 57,918 August 2013 financing convertible note — — — — 4,415 (70 ) — 4,345 2015 Rule 144A convertible notes — — — — 37,887 (2,413 ) — 35,474 2014 Rule 144A convertible notes — — — — 24,004 (867 ) — 23,137 62,825 — 327 63,152 126,306 (3,350 ) (2,082 ) 120,874 Related party convertible notes payable 2014 Rule 144A convertible notes 9,705 — — 9,705 24,705 (1,038 ) — 23,667 Loans payable and credit facilities Ginkgo note 12,000 (3,377 ) — 8,623 12,000 (4,047 ) — 7,953 Nikko notes 9,122 (938 ) — 8,184 4,598 (1,047 ) — 3,551 Schottenfeld notes 12,500 (8,151 ) 4,349 — — — — Other loans payable 1,280 — — 1,280 312 — — 312 GACP secured term loan facility — — — — 36,000 (1,349 ) — 34,651 34,902 (12,466 ) — 22,436 52,910 (6,443 ) — 46,467 Related party loans payable Foris secured term loan facility 71,041 (8,829 ) — 62,212 — — — — Foris unsecured note 19,000 (6,681 ) — 12,319 — — — — DSM notes 33,000 (5,135 ) — 27,865 25,000 (6,311 ) — 18,689 Naxyris note 10,957 (4,403 ) — 6,554 — — — — 133,998 (25,048 ) — 108,950 25,000 (6,311 ) — 18,689 Total debt 241,430 (37,514 ) 327 204,243 228,921 (17,142 ) (2,082 ) 209,697 Less: current portion (78,716 ) (147,677 ) Long-term debt, net of current portion $ 125,527 $ 62,020 August 2013 Financing Convertible Note On January 14, 2019, Wolverine Flagship Fund Trading Limited (Wolverine) agreed to waive payment of the August 2013 Financing Convertible Note held by Wolverine at its January 15, 2019 maturity until July 15, 2019 in exchange for a fee, payable on or prior to July 15, 2019, of $0.6 million . The due date of the waiver fee was extended to October 13, 2019 and was subsequently paid on October 29, 2019. The Company concluded that the maturity date extension represented a debt modification, and the fee was accounted for as additional debt discount to be amortized over the remaining term. On July 8, 2019, $5.1 million principal balance of the convertible note and unpaid interest was exchanged for 1.8 million shares of common stock with a total fair value of $5.9 million or $3.30 per share and a warrant to purchase 1.1 million shares of common stock with a fair value of $1.9 million . The Company recorded a $2.7 million loss on debt extinguishment in the three and nine months ended September 30, 2019 for the difference between the carrying value of the debt and the sum of the fair values of the common stock and warrant. See Note 6, “Stockholders’ Deficit” for additional information regarding the fair value measurement of the common stock and warrant issued in connection with this exchange. Foris Credit Agreements On April 8, 2019, the Company and Foris entered into a credit agreement to make available to the Company an unsecured credit facility in an aggregate principal amount of $8.0 million (the April Foris Credit Agreement), which the Company borrowed in full on April 8, 2019 and issued to Foris a promissory note in the principal amount of $8.0 million (the April Foris Note). The April Foris Note has a maturity date of October 14, 2019, which has no stated interest rate. The Company agreed to pay Foris a fee of $1.0 million , payable on or prior to the maturity date; provided, that the fee will be reduced to $0.5 million if the Company repays the April Foris Note in full by July 15, 2019. The Company accrues this fee as interest expense over the six-month term of the note. On June 11, 2019, the Company and Foris entered into a credit agreement to make available to the Company an unsecured credit facility in an aggregate principal amount of $8.5 million , which the Company borrowed in full on June 11, 2019 and issued to Foris a promissory note in the principal amount of $8.5 million (the June Foris Note). The June Foris Note (i) accrues interest at a rate of 12.5% per annum and is payable on the maturity date or the earlier repayment or other satisfaction of the June Foris Note, and (ii) matured on August 28, 2019. On July 10, 2019, the Company and Foris entered into a credit agreement to make available to the Company an unsecured credit facility in an aggregate principal amount of $16.0 million (the July Foris Credit Agreement), of which the Company borrowed $8.0 million on July 10, 2019 and $8.0 million on July 26, 2019 and issued to Foris promissory notes, each in the principal amount of $8.0 million , on such dates (the July Foris Notes). The July Foris Notes (i) accrue interest at a rate of 12.5% per annum, which is payable on the maturity date or the earlier repayment or other satisfaction of the applicable July Foris Note, and (ii) mature on December 31, 2019. In connection with the entry into the July Foris Credit Agreement, the Company and Foris amended the warrant issued to Foris on August 17, 2018 to reduce the exercise price of such warrant from $7.52 per share to $2.87 per share. The warrant modification resulted in $4.0 million of incremental value which was accounted for as a debt discount to the $16 million July Foris Notes. See Note 6, “Stockholders’ Deficit” for additional information regarding the fair value measurement of the modified warrant. On August 14, 2019, the April Foris Note, the June Foris Note and the July Foris Notes were added to the loans under the LSA, made subject to the LSA and secured by the security interest in the collateral granted to Foris under the LSA, and such notes were cancelled in connection therewith. See "LSA Assignment, Amendments and Waiver" below for further information. 2015 and 2014 Rule 144A Convertible Notes On April 16, 2019, the Company repaid in cash the $37.9 million outstanding principal, as well as accrued and unpaid interest, under its 9.50% Convertible Senior Notes due 2019 (the 2015 Rule 144A Convertible Notes). On May 10, 2019, the Company exchanged $13.5 million aggregate principal amount of its 6.50% Convertible Senior Note (the 2014 Rule 144A Convertible Notes) held by certain non-affiliated investors, including accrued and unpaid interest thereon for an aggregate of 3.5 million shares of common stock and warrants to purchase an aggregate of 1.4 million shares of common stock at an exercise price of $5.02 per share, with an exercise term of two years from issuance, in a private exchange pursuant to the exemption from registration under Section 3(a)(9) of the Securities Act of 1933, as amended (the Securities Act). On May 14, 2019, the Company exchanged $5.0 million aggregate principal amount of the 2014 Rule 144A Convertible Notes held by Foris, including accrued and unpaid interest thereon, for 1.1 million shares of common stock and a warrant to purchase up to 0.4 million shares of common stock at an exercise price of $4.56 per share, with an exercise term of two years from issuance, in a private exchange pursuant to the exemption from registration under Section 3(a)(9) of the Securities Act. On August 28, 2019, the Company and Foris agreed to reduce the exercise price of such warrant from $4.56 per share to $3.90 per share. See “August 2019 Foris Credit Agreements” below and Note 6, “Stockholders’ Deficit” for additional information. On May 15, 2019, the Company exchanged $10.0 million aggregate principal amount of the 2014 Rule 144A Convertible Notes held by Maxwell (Mauritius) Pte Ltd for 2.5 million shares of common stock in a private exchange pursuant to the exemption from registration under Section 3(a)(9) of the Securities Act. The Company evaluated the May 2019 exchanges described above and concluded that the transactions resulted in a debt extinguishment. The Company recorded a $5.9 million loss on debt extinguishment of the 2014 144A Convertible Notes in the three months ended June 30, 2019. The loss represented the difference between the $30.8 million fair value of 7.1 million common shares issued upon exchange, $3.8 million fair value of warrants issued to purchase 1.7 million shares of common stock and $0.4 million of fees incurred, less the $29.1 million carrying value of the debt that was extinguished. See Note 6. "Stockholders’ Deficit" for further information regarding the fair value measurement of the common stock and warrants issued in connection with the May 2019 exchanges discussed above. On May 15, 2019, the Company exchanged $9.7 million aggregate principal amount of the 2014 Rule 144A Convertible Notes held by Total Raffinage Chimie (Total) for a new senior convertible note with an equal principal amount and with substantially identical terms, except that the new note had a maturity date of June 14, 2019, in a private exchange pursuant to the exemption from registration under Section 3(a)(9) of the Securities Act. Effective June 14, 2019, the Company and Total agreed to extend the maturity date of the new note from June 14, 2019 to July 18, 2019. Effective July 18, 2019, the Company and Total agreed to (i) further extend the maturity date of the new note from July 18, 2019 to August 28, 2019 and (ii) increase the interest rate on the new note to 10.5% per annum, beginning July 18, 2019. Effective August 28, 2019, the Company and Total agreed to (i) further extend the maturity date of the new note from August 28, 2019 to October 28, 2019 and (ii) increase the interest rate on the new note to 12% per annum, beginning August 28, 2019. See Note 12, “Subsequent Events” for information regarding further modifications to the new note subsequent to September 30, 2019. The Company accounted for the series of exchanges with Total as a debt modification; however, no additional fees were paid, and the modifications had no impact on the debt discount or interest expense in the three and nine months ended September 30, 2019. 6% Convertible Notes Exchanges On May 15, 2019 and June 24, 2019, the Company exchanged $53.3 million and $4.7 million principal amount, respectively, of the 6% Convertible Notes, including accrued and unpaid interest thereon, representing all then-outstanding 6% Convertible Notes, for new senior convertible notes with an equal principal amount and warrants to purchase up to 2.0 million and 0.2 million shares of common stock, respectively, at an exercise price of $5.12 per share, with an exercise term of two years from issuance, in private exchanges pursuant to the exemption from registration under Section 3(a)(9) of the Securities Act. The new notes have substantially identical terms as the 6% Convertible Notes being exchanged, except that (i) the holders agreed to waive, until July 22, 2019, certain covenants relating to the effectiveness of the registration statement covering the shares of common stock issuable upon conversion of, or otherwise pursuant to, the new notes and the filing by the Company of reports with the SEC and (ii) during the period from July 22, 2019 to July 29, 2019, inclusive, the holders have the right to require the Company to redeem the new notes, in whole or in part, at a price equal to 125% of the principal amount being redeemed. Since the Company has elected the fair value accounting option for the 6% Convertible Notes and records all changes in fair value through the gain/loss on change in fair value of debt line item in the statement of operations each reporting period, this exchange is not required to be evaluated for modification or extinguishment accounting treatment. However, the Company considered the issuance of the warrant as compensation to the noteholders for waiving certain covenant violations during the period, and recorded a $4.4 million increase to additional paid in capital and a charge to interest expense for the fair value of the equity-classified May 15, 2019 and June 24, 2019 warrants. See Note 6, “Stockholders’ Deficit” for information regarding the fair value measurement and issuance of this warrant. On July 24, 2019, the Company further exchanged $53.3 million principal amount of the previously-exchanged 6% Convertible Senior Notes, as well as the warrant to purchase up to 2.0 million shares of common stock issued on May 15, 2019, for a new senior convertible note with a principal amount of $68.3 million (the Second Exchange Note) and a new warrant to purchase up to 2.0 million shares of common stock at an exercise price of $2.87 per share, with an exercise term of two years from May 15, 2019 (the Second Exchange Warrant) in a private exchange pursuant to the exemption from registration under Section 3(a)(9) of the Securities Act. The Second Exchange Note and Second Exchange Warrant have substantially similar terms as the note and warrant, respectively, issued on May 15, 2019, except that (i) the principal amount of the Second Exchange Note would be $68.3 million , reflecting accrued and unpaid interest and late charges under the exchanged note and a 25% premium accruing as a result of the Company’s failure to make an installment payment on the exchanged note due July 1, 2019 in the amount of $6.4 million , provided that upon an event of default under the Second Exchange Note, the Company would not be required to redeem the Second Exchange Note in cash at a price greater than the intrinsic value of the shares of common stock underlying the Second Exchange Note, (ii) the Second Exchange Note bears interest at a rate of 18% per annum, (iii) the holder agreed to extend its waiver of certain covenant breaches relating to the failure by the Company to timely file periodic reports with the SEC from July 22, 2019 to September 16, 2019, (iv) the Company is required to (A) make principal payments on the Second Exchange Note in the amount of $3.2 million on each of August 2, 2019 and August 22, 2019, and (B) pay all remaining amounts then outstanding under the Second Exchange Note on September 16, 2019, and if the Company fails to make any such payment on the applicable payment date, the conversion price of the Second Exchange Note would be reset to the volume-weighted average price of the common stock on the trading day immediately following the Company’s filing of a Current Report on Form 8-K with respect to its failure to make the payment due on September 16, 2019, if such volume-weighted average price is lower than the conversion price of the Second Exchange Note then in effect, subject to a price floor and (v) the Second Exchange Warrant has an exercise price of $2.87 per share. Since the Company has elected the fair value accounting option for the 6% Convertible Notes and records all changes in fair value through the gain/loss on change in fair value of debt line item in the statement of operations each reporting period, this second note exchange is not required to be evaluated for modification or extinguishment accounting treatment. However, the Company considered the modification of the warrant as compensation to the noteholder for waiving certain covenant violations during the period, and recorded a $0.9 million increase to additional paid in capital and a charge to interest expense for the incremental fair value of the modification. See Note 6, “Stockholders’ Deficit” for information regarding the fair value measurement of this warrant modification. On July 26, 2019, one of the holders of $4.7 million principal amount of the 6% Convertibles Notes issued on June 24, 2019, exercised their right to require the Company to redeem such note in whole at a price equal to 125% of the principal amount being redeemed, plus accrued and unpaid interest on such note to the date of repayment. Redemption of such note was initially due on July 30, 2019 and subsequently extended to August 30, 2019. The Company redeemed such note in full on August 30, 2019. On September 16, 2019, the Company failed to pay an aggregate of $63.6 million of outstanding principal and accrued interest on the Second Exchange Note when due. The failure resulted in an event of default under the Second Exchange Note and also triggered cross-defaults under other debt instruments of the Company which permitted the holders of such indebtedness to accelerate the amounts owing under such instruments. The Company subsequently received waivers from all holders of such other debt instruments to waive the right to accelerate. As a result, the indebtedness with respect to which the Company has obtained such waivers continues to be classified as long-term on the Company’s balance sheet. The indebtedness reflected by the Second Exchange Note continues to be classified as a current liability on the Company’s balance sheet. In addition, as a result of the payment default, the conversion price of the Second Exchange Note is subject to adjustment in accordance with the terms of the Second Exchange Note. On November 8, 2019, the Company entered into a Securities Exchange Agreement with certain private investors (the “Investors”), pursuant to which, upon the purchase by the Investors of the Second Exchange Note, the Second Exchange Note would be exchanged for new senior convertible notes with an aggregate principal amount of $66.0 million (see Note 12, “Subsequent Events”). In connection with the entry into the Securities Exchange Agreement, (i) the holder of the Second Exchange Note and the Investors entered into a Securities Purchase Agreement providing for the purchase by the Investors of the Second Exchange Note and (ii) the Company and the holder of the Second Exchange Note entered into an agreement by which such holder agreed to immediately dismiss its complaint against the Company (see Note 8, “Commitments and Contingencies”) with prejudice upon the purchase of the Second Exchange Note by the Investors. Nikko Loan Agreement On July 29, 2019, the Company and Nikko Chemicals Co., Ltd. (Nikko) entered into a loan agreement (the Nikko Loan Agreement) to make available to the Company secured loans in an aggregate principal amount of $5.0 million , to be issued in separate installments of $3.0 million and $2.0 million , respectively, with each installment being subject to certain closing conditions, including the entry into certain commercial agreements and other arrangements relating to the Aprinnova JV (see Note 11, “Related Party Transactions” in Part II, Item 8 of the 2018 Form 10-K/A). On July 30, 2019, the Company borrowed the first installment of $3.0 million under the Nikko Loan Agreement and received net cash proceeds of $2.8 million , with the remaining $0.2 million being withheld by Nikko as prepayment of the interest payable on such loan through the maturity date. On August 8, 2019, the Company borrowed the remaining $2.0 million available under the Nikko Loan Agreement and received net cash proceeds of $1.9 million , with the remaining $0.1 million being withheld by Nikko as prepayment of the interest payable on such loan through the maturity date. The loans (i) mature on December 18, 2020, (ii) accrue interest at a rate of 5% per annum from and including the applicable loan date through the maturity date, which interest is required to be prepaid in full on the date of the applicable loan, and (iii) are secured by a first-priority lien on 12.8% of the Aprinnova JV interests owned by the Company. Aprinnova Working Capital Loan Effective July 31, 2019, the Company and Nikko agreed to extend the term of the Second Aprinnova Note (see Note 5, “Debt” in Part II, Item 8 of the 2018 Form 10-K/A) from August 1, 2019 to August 1, 2020. LSA Assignment, Amendments and Waivers On April 4, 2019, the Company and GACP Finance Co., LLC (GACP) amended the Loan and Security Agreement, dated June 29, 2018 (as amended, the LSA), to (i) effective December 31, 2018, eliminate the conditions giving rise to the early maturity date, so that loans under the GACP Term Loan Facilities would have a maturity date of July 1, 2021, (ii) remove certain Company intellectual property related to the Cannabinoid Agreement from the lien granted by the Company to GACP under the LSA, (iii) eliminate the Company’s ability to obtain an incremental term loan facility, (iv) eliminate the Company’s reinvestment rights with respect to mandatory prepayments upon asset sales, (v) restrict the Company’s ability to pay interest and principal on other indebtedness without the consent of GACP, and (vi) provide that the Company must have at all times at least $15 million of unrestricted, unencumbered cash subject to a control agreement in favor of GACP. Also, on April 4, 2019, the Company and GACP entered into a waiver agreement, pursuant to which GACP agreed to waive breaches of certain covenants under the LSA occurring prior to, as of and after December 31, 2018 through April 8, 2019, including covenants related to quarterly minimum revenues, minimum liquidity amounts and a minimum asset coverage ratio. In connection with such waiver, the Company agreed to pay GACP fees of $0.8 million , which the Company paid in April 2019. This waiver fee was recorded as interest expense in the statement of operations in the nine months ended September 30, 2019. On April 15, 2019, the Company, GACP and Foris Ventures, LLC (Foris), an entity affiliated with director John Doerr of Kleiner Perkins Caufield & Byers, a current stockholder, and an owner of greater than five percent of the Company’s outstanding common stock) entered into a Loan Purchase Agreement, pursuant to which Foris agreed to purchase and assume from GACP, and GACP agreed to sell and assign to Foris, the outstanding loans under the LSA and all documents and assets related thereto. In connection with such purchase and assignment, the Company agreed to repay Foris $2.5 million of the purchase price and accrued interest paid by Foris to GACP (the LSA Obligation). The Company accounted for the LSA Obligation as a debt modification and recorded the $2.5 million fee as additional debt discount to be amortized to interest expense under the effective interest method over the remaining term of the LSA. The closing of the loan purchase and assignment occurred on April 16, 2019. On August 14, 2019, the Company and Foris entered into an Amendment No 5 and Waiver to the LSA (the LSA Amendment and Waiver), pursuant to which (i) the maturity date of the loans under the LSA was extended from July 1, 2021 to July 1, 2022, (ii) the interest rate for the loans under the LSA was modified from the sum of (A) the greater of (x) the prime rate as reported in the Wall Street Journal or (y) 4.75% plus (B) 9% to the greater of (A) 12% or (B) the rate of interest payable with respect to any indebtedness of the Company, (iii) the amortization of the loans under the LSA was delayed until December 16, 2019, (iv) certain accrued and future interest and agency fee payments under the LSA were delayed until December 16, 2019, (v) certain covenants under the LSA, including related definitions, were amended to provide the Company with greater operational and financial flexibility, including, without limitation, to permit the incurrence of the indebtedness under the Naxyris Loan Facility (as described below) and the granting of liens with respect thereto, subject to the terms of an intercreditor agreement between Foris and Naxyris S.A. (Naxyris) governing the respective rights of the parties with respect to, among other things, the assets securing the Naxyris Loan Agreement (as defined below) and the LSA (the Intercreditor Agreement), (vi) certain outstanding unsecured promissory notes issued by the Company to Foris on April 8, 2019, June 11, 2019, July 10, 2019 and July 26, 2019 (as described in the “Foris Credit Agreements” section above), in an aggregate principal amount of $32.5 million , as well as the $2.5 million LSA Obligation, were added to the loans under the LSA, made subject to the LSA and secured by the security interest in the collateral granted to Foris under the LSA, and such promissory notes and contractual obligation were canceled in connection therewith, and (vii) Foris agreed to waive certain existing defaults under the LSA, including with respect to covenants related to quarterly minimum revenues, minimum liquidity amounts and a minimum asset coverage ratio. After giving effect to the LSA Amendment and Waiver, there is $71.0 million aggregate principal amount of loans outstanding under the LSA. The Company also issued to Foris a warrant (the LSA Warrant) on August 14, 2019 to purchase up to 1.4 million shares of common stock at an exercise price of $2.87 per share, with an exercise term of two years from issuance. The warrant had a fair value of $2.9 million which was measured using a Black-Scholes option pricing model. See Note 6, “Stockholders’ Deficit” for further information regarding the fair value measurement and issuance of this warrant. Due to multiple changes in key provisions of the LSA from April 15, 2019 through August 14, 2019, the Company analyzed the before and after cash flows resulting from the increased principal balance, decreased interest rate, extended maturity date, waiver of default interest and the fair value of the new LSA Warrant provided to Foris in order to determine if these changes result in a modification or extinguishment of the original LSA. Based on the combined before and after cash flows of the five separate note balances making up the new principal balance of the LSA and the fair value of the LSA warrant, the change in cash flows was not significantly different. Consequently, the LSA Amendment and Waiver was accounting for as a debt modification with the $2.9 million fair value of the LSA Warrant recorded as an increase to additional paid in capital and as a debt discount to be amortized to interest expense under the effective interest method over the remaining term of the LSA. See Note 12, “Subsequent Events” for more information regarding the LSA. Naxyris Loan and Security Agreement On August 14, 2019, the Company, certain of the Company’s subsidiaries (the Subsidiary Guarantors) and, as lender, Naxyris, an existing stockholder of the Company and an investment vehicle owned by Naxos Capital Partners SCA Sicar, which is affiliated with NAXOS S.A.R.L. (Switzerland), for which director Carole Piwnica serves as director, entered into a Loan and Security Agreement (the Naxyris Loan Agreement) to make available to the Company a secured term loan facility in an aggregate principal amount of up to $10.4 million (the Naxyris Loan Facility), which the Company borrowed in full on August 14, 2019. In connection with the funding of the Naxyris Loan Facility, the Company paid Naxyris an upfront fee of $0.4 million . Loans under the Naxyris Loan Facility have a maturity date of July 1, 2022 and accrue interest at a rate per annum equal to the greater of (i) 12% or (ii) the rate of interest payable with respect to any indebtedness of the Company plus 25 basis points, which interest will be payable monthly in arrears, provided that all interest accruing from and after August 14, 2019 through December 1, 2019 shall be due and payable on December 15, 2019. The obligations of the Company under the Naxyris Loan Facility are (i) guaranteed by the Subsidiary Guarantors and (ii) secured by a perfected security interest in substantially all of the assets of the Company and the Subsidiary Guarantors (the Collateral), junior in payment priority to Foris subject to certain limitations and exceptions, as well as the terms of the Intercreditor Agreement. Mandatory prepayments of the outstanding amounts under the Naxyris Loan Facility will be required upon the occurrence of certain events, including asset sales, a change in control, and the incurrence of additional indebtedness, subject to certain exceptions and reinvestment rights. Outstanding amounts under the Naxyris Loan Facility must also be prepaid to the extent that the borrowing base exceeds the outstanding principal amount of the loans under the Naxyris Loan Facility. In addition, the Company may at its option prepay the outstanding principal amount of the loans under the Naxyris Loan Facility in full before the maturity date. Any prepayment of the loans under the Naxyris Loan Facility prior to the maturity date, whether pursuant to a mandatory or optional prepayment, is subject to a prepayment charge equal to one year’s interest at the then-current interest rate for the Naxyris Loan Facility. Upon any repayment of the loans under the Naxyris loan facility, whether on the maturity date or earlier pursuant to an optional or mandatory prepayment, the Company will pay Naxyris an end of term fee based on a percentage of the aggregate amount borrowed. In addition, (i) the Company will be required to pay a fee equal to 6% of any amount the Company fails to pay within three business days of its due date and (ii) any interest that is not paid when due will be added to principal and will bear compound interest at the applicable rate. The affirmative and negative covenants in the Naxyris Loan Agreement relate to, among other items: (i) payment of taxes; (ii) financial reporting; (iii) maintenance of insurance; and (iv) limitations on indebtedness, liens, mergers, consolidations and acquisitions, transfers of assets, dividends and other distributions in respect of capital stock, investments, loans and advances, and corporate changes. The Naxyris Loan Agreement also contains financial covenants, including covenants related to minimum revenue, liquidity, and asset coverage. The Naxyris Loan Facility also contained a mandatory redemption feature that was not clearly and closely related to the debt host instrument, and thus, required bifurcation and separate accounting as a derivative liability. The embedded feature had an initial fair value of $0.3 million and was recorded as a derivative liability and a debt discount to be amortized to interest expense under the effective interest method over the term of the Naxyris Loan Facility. See Note 3, “Fair Value Measurements” for information regarding the fair value measurement and subsequent accounting for the embedded mandatory redemption feature. In connection with the entry into the Naxyris Loan Agreement, on August 14, 2019 the Company issued to Naxyris a warrant (the Naxyris LSA Warrant) to purchase up to 2.0 million shares of common stock at an exercise price of $2.87 per share, with an exercise term of two years from issuance. See Note 6, “Stockholders’ Deficit” for information regarding the fair value measurement and issuance of this warrant. The warrant had a $4.0 million Black-Scholes fair value and a $3.0 million relative fair value after allocating the Naxyris Loan Facility proceeds to the $0.3 million fair value of the embedded mandatory redemption feature contained in the Naxyris Loan Facility, and allocating on a residual basis, to the relative fair values of the Naxyris Loan Facility and the Naxyris LSA Warrant. The $3.0 million relative fair value of the Naxyris LSA Warrant was recorded as an increase to additional paid in capital and as a debt discount to be amortized to interest expense under the effective interest method over the term of the Naxyris Loan Agreement. In addition to the $3.0 million relative fair value of the Naxyris LSA Warrant and the $0.3 million fair value of the embedded mandatory redemption feature, the Naxyris Loan Facility contained $0.4 million original issue discount, $0.5 million mandatory end of term fee and $0.3 million of issuances costs, all totaling $4.5 million . All such amounts were recorded as a debt discount to be amortized as interest expense over the term of the Naxyris Loan Agreement. See Note 12, “Subsequent Events” for more information regarding the Naxyris Loan Agreement. August 2019 Foris Credit Agreements On August 28, 2019, the Company and Foris entered into a credit agreement to make available to the Company an unsecured credit facility in an aggregate principal amount of $19.0 million (the August 2019 Foris Credit Agreement), which the Company borrowed in full on August 28, 2019 and issued to Foris a promissory note in the principal amount of $19.0 million (the August 2019 Foris Note). The August 2019 Foris Note (i) accrues interest at a rate of 12% per annum from and including August 28, 2019, which interest is payable quarterly in arrears on each March 31, June 30, September 30 and December 31, beginning December 31, 2019, and (ii) matures on January 1, 2023. The Company may at its option repay the amounts outstanding under the August 2019 Foris Note before the maturity date, in whole or in part, at a price equal to 100% of the amount being repaid plus accrued and unpaid interest on such amount |