The shares of common stock for both the June 2017 and February 2017 offerings were offered pursuant to a shelf registration statement on Form S-3, including a base prospectus, filed by us on August 1, 2016, and declared effective by the SEC on August 12, 2016. This shelf registration statement covered the offering, issuance and sale by us of up to an aggregate of $125.0 million of our common stock, preferred stock, debt securities, warrants and/or units (the “2016 Shelf”).
We simultaneously entered into a sales agreement with Cowen and Company, LLC, as sales agent, to provide for the offering, issuance and sale by us of up to $40.0 million of our common stock from time to time in “at-the-market” offerings under the Shelf (the “Cowen Sales Agreement”). During the year ended December 31, 2017, we sold an aggregate 749,639 shares of common stock under the Cowen Sales Agreement, at an average sale price of approximately $5.01 per share for gross proceeds of $3.7 million and net proceeds of $3.6 million after paying compensation to the sales agent of $0.1 million. During the year ended December 31, 2018, we sold an aggregate 651,525 shares of common stock under the Sales Agreement, at an average sale price of approximately $6.25 per share for gross proceeds of $4.1 million and net proceeds of $3.9 million and paying total compensation to the sales agent and other costs of approximately $0.2 million. On November 5, 2018, we supplemented the 2016 Shelf to reduce the size of the Sales Agreement to up to $7,825,113 of our common stock (inclusive of amounts previously sold thereunder prior to the date hereof), effective on November 5, 2018, which equaled the aggregate gross proceeds of sales of our common stock under the Sales Agreement as of that date, and sales of our common stock under the Cowen Sales Agreement were suspended. The Cowen Sales Agreement terminated with the expiration of the 2016 Shelf on August 12, 2019.
On November 8, 2018, we closed an underwritten public offering of 19,999,999 shares of our common stock at a public offering price of $2.30 per share, which includes 2,608,695 shares of our common stock resulting from the underwriters’ exercise of their over-allotment option at the public offering price. The net proceeds to us from this offering, after deducting underwriting discounts and commissions and other offering expenses payable by us, were approximately $43.4 million. Also, on November 5, 2018, we entered into a Second Amendment to the Facility with Deerfield under which we used $7.5 million of proceeds of the offering to prepay $7.5 million of principal on the Facility otherwise due on May 11, 2019. Pursuant to the Second Amendment, the schedule of principal repayments under the facility was further modified to allow for the $15.0 million payment otherwise due on May 11, 2020 to be deferred until either May 2021 or May 2022 if certain annual revenue milestones for the years ended December 31, 2019 and December 31, 2020 were achieved. The revenue milestone was not met for the period ending December 31, 2019. Finally, the Second Amendment provides us with a right, subject to the terms and conditions of the Facility and certain other limitations, to make interest and principal payments through the issuance of our common stock, and provides Deerfield with a right, subject to the terms and conditions of the Facility and the amended and restated convertible notes (the “A&R Notes”) issued under the Facility and certain other limitations, to convert principal under the A&R Notes into our common stock, subject to a floor ranging from 95% to 83% of $10.00 per share.
On March 18, 2019, we filed a shelf registration statement covering the offering, issuance and sale by us of up to an aggregate of $100.0 million of our common stock, preferred stock, debt securities, warrants and/or units (the “2019 Shelf”), which was declared effective by the SEC on May 1, 2019. Effective as of August 12, 2019, the 2016 Shelf is no longer available for further primary offerings or sales of our securities. We simultaneously entered into a sales agreement with Cantor Fitzgerald & Co., as sales agent, to provide for the offering, issuance and sale by us of up to $30.0 million of our common stock from time to time in “at-the-market” offerings under the 2019 Shelf (the “Cantor Sales Agreement”).
On October 2, 2019, we entered into a senior secured credit agreement with Encina Business Credit, LLC (“Encina”) as agent for the lenders (the “Loan Agreement”). Under the Loan Agreement, Encina will extend up to $25.0 million in secured revolving loans to us (the “Revolving Loans”), of which up to $2.5 million may be available for short-term swingline loans, against 85% of eligible accounts receivable. For additional description of this Facility, see “—Loan and Credit facilities” below.
On April 18, 2020, we entered into a $3.6 million U.S. Small Business Administration Paycheck Protection Program Loan, (the “PPP Loan”) with First Republic Bank (the “PPP Lender”). We repaid the full amount of the PPP Loan to the PPP Lender on May 6, 2020.