Exhibit 10.4

 

SECURITY AGREEMENT

 

This SECURITY AGREEMENT (“Agreement”), is made effective as of August 17, 2016
(this “Agreement”), by and among BioPharmX Corporation, a Delaware corporation
(the “Company”), each of the persons executing a copy of this Agreement, and
their respective successors and assigns (each an “Investor” and, collectively,
the “Investors”), and RTW Master Fund, LTD as collateral agent for the Investors
(in such capacity, the “Collateral Agent”).

 

1.                                      Purpose.  This Agreement is granted by
the Company in favor of the Collateral Agent for the benefit of the Investors
under (i) that certain Subscription Agreement, effective as of the date hereof,
by and among the Company and the Investors (the “Purchase Agreement”), and
(ii) the secured convertible promissory notes issued to Investors by the Company
under the Purchase Agreement (as may be amended, restated, modified or replaced
from time to time, the “Notes”).  The Company has agreed to secure all
Liabilities (as hereinafter defined) of the Company to Investors in accordance
with the terms and conditions of this Agreement.

 

2.                                      Defined Terms.  Capitalized terms not
defined in this Agreement have the meaning set forth under the Purchase
Agreement, and the following terms as well as all uncapitalized terms which are
defined in the Uniform Commercial Code as the same may, from time to time, be in
effect in the State of California (as amended, revised or replaced, the “UCC”)
have the meaning set forth therein:  Accounts, Chattel Paper, Commercial Tort
Claims, Deposit Accounts, Documents, Electronic Chattel Paper, Equipment,
Fixtures, General Intangibles, Goods, Instruments, Inventory, Investment
Property, Letter-of-Credit Rights, Payment Intangibles, Proceeds, Securities
Account Supporting Obligations, and Tangible Chattel Paper.  In addition, the
following terms have the meanings specified below:

 

“Copyright Collateral” means all copyrights of the Company, registered or
unregistered and whether published or unpublished, now or hereafter in force
throughout the world including all of the Company’s rights, titles and interests
in and to all copyrights registered in the United States Copyright Office or
anywhere else in the world, and registrations and recordings thereof and all
applications for registration thereof, whether pending or in preparation, all
copyright licenses, the right to sue for past, present and future infringements
of any of the foregoing, all rights corresponding thereto, all extensions and
renewals of any thereof and all proceeds of the foregoing, including licenses,
royalties, income, payments, claims, damages and Proceeds of suit, which are
owned or licensed by the Company.

 

“Intellectual Property” means, collectively, the Copyright Collateral, the
Patent Collateral, the Trademark Collateral, and the Trade Secrets Collateral.

 

“Patent Collateral” means (a) all inventions and discoveries, whether patentable
or not, all letters patent and applications for letters patent, and any patent
applications in preparation for filing, (b) all reissues, divisions,
continuations, continuations in part, extensions, renewals and reexaminations of
any of the items described in clause (a),

 

--------------------------------------------------------------------------------

 

(c) all patent licenses, and other agreements providing the Company with the
right to use any items of the type referred to in clauses (a) and (b) above, and
(d) all proceeds of, and rights associated with, the foregoing (including
licenses, royalties income, payments, claims, damages and proceeds of
infringement suits), the right to sue third parties for past, present or future
infringements of any patent or patent application, and for breach or enforcement
of any patent license.

 

“Trademark Collateral” means (a) (i) all trademarks, trade names, corporate
names, company names, business names, fictitious business names, trade styles,
service marks, certification marks, collective marks, logos and other source or
business identifiers, and all goodwill of the business associated therewith, now
existing or hereafter adopted or acquired by the Company, whether currently in
use or not, all registrations and recordings thereof and all applications in
connection therewith, whether pending or in preparation for filing, including
further registrations, recordings and applications in the United States Patent
and Trademark Office or in any office or agency of the United States of America,
or any State thereof or any other country or political subdivision thereof or
otherwise, and all common law rights relating to the foregoing, and (ii) the
right to obtain all reissues, extensions or renewals of the foregoing (the
subject matter of clause (a) is collectively referred to as the “Trademark”),
(b) all trademark licenses for the grant by or to the Company of any right to
use any trademark, (c) all of the goodwill of the business connected with the
use of, and symbolized by the items described in, clause (a), and to the extent
applicable clause (b), (d) the right to sue third parties for past, present and
future infringements of any Trademark Collateral described in clause (a) and, to
the extent applicable, clause (b), and (e)  all Proceeds of, and rights
associated with, the foregoing, including any claim by the Company against third
parties for past, present or future infringement or dilution of any Trademark,
Trademark registration, or Trademark license, or for any injury to the goodwill
associated with the use of any such Trademark or for breach or enforcement of
any Trademark license and all rights corresponding thereto throughout the world.

 

“Trade Secrets Collateral” means all common law and statutory trade secrets and
all other confidential, proprietary or useful information and all know how
obtained by or used in or contemplated at any time for use in the business of
the Company, (all of the foregoing being collectively called a “Trade Secret”),
including all documents and things embodying, incorporating or referring in any
way to such Trade Secret, all Trade Secret licenses, and including the right to
sue for and to enjoin and to collect damages for the actual or threatened
misappropriation of any Trade Secret and for the breach or enforcement of any
such Trade Secret license.

 

3.                                      Grant of Security Interest.  The Company
hereby grants to Collateral Agent, for the ratable benefit of the Investors, a
continuing security interest in and continuing lien on the “Collateral”
described in Section 4 below to secure the prompt and complete payment of all
outstanding amounts due under the Notes plus all interest, costs, expenses, and
reasonable attorneys’ fees, which may be made or incurred by the Collateral
Agent and/or Investors in the disbursement, administration, and collection of
such amounts, and in the protection, maintenance, and liquidation of the
Collateral (collectively, “Liabilities”).  This Agreement shall be and become
effective when, and

 

2

--------------------------------------------------------------------------------

 

continue in effect, as long as any Liabilities of the Company to Investors are
outstanding and unpaid, and except as expressly permitted herein, the Company
will not sell, assign, transfer, pledge or otherwise dispose of or encumber any
Collateral to any third party while this Agreement is in effect without the
prior written consent of the Collateral Agent and Investors holding Notes
representing at least a majority of the unpaid principal under all outstanding
Notes (the “Required Holders”).

 

4.                                      Collateral.  The “Collateral” covered by
this Agreement is all of the Company’s right, title and interest in, to and
under all assets of the Company, real and personal, tangible and intangible,
which it now owns or shall hereafter acquire or create, immediately upon the
acquisition or creation thereof, and includes, but is not limited to, the
following:

 

(1)                                 all Accounts;

 

(2)                                 all Chattel Paper (whether Tangible Chattel
Paper or Electronic Chattel Paper);

 

(3)                                 all Commercial Tort Claims;

 

(4)                                 all Deposit Accounts other than payroll,
withholding tax and other fiduciary Deposit Accounts;

 

(5)                                 all Documents;

 

(6)                                 all General Intangibles;

 

(7)                                 all Goods (including, without limitation,
all Inventory, Equipment and Fixtures);

 

(8)                                 all Instruments;

 

(9)                                 all Investment Property;

 

(10)                          all Letter-of-Credit Rights (whether or not the
letter of credit is evidenced by a writing;

 

(11)                          all Intellectual Property; and

 

(12)                          all Supporting Obligations.

 

5.                                      Purchase Money Liens.  Any Equipment or
Fixtures acquired pursuant to this section and subject to a purchase money lien
shall not be a part of the Collateral so long as the liens created hereunder are
specifically prohibited by the terms of such purchase money lien; provided that
this exclusion shall only apply to the specific Equipment and/or Fixtures
acquired with the proceeds of such purchase money lien.

 

3

--------------------------------------------------------------------------------

 

6.                                      Perfection of Security Interest.  The
Company shall execute and deliver to the Collateral Agent, at any time or times
after the Company’s execution of this Agreement (and pay the cost of filing or
recording same in all public offices deemed necessary by Collateral Agent), all
financing statements, assignments, certificates of title, applications for
vehicle titles, affidavits, reports, notices, schedules of Accounts,
designations of inventory, letters of authority and all other documents that
Collateral Agent may reasonably request, in form satisfactory to the Collateral
Agent, to perfect and maintain the Collateral Agent’s perfected security
interests in the Collateral.  The Company further agrees, from time to time as
requested by the Collateral Agent, to execute and deliver to the Collateral
Agent any Patent Security Agreements, Trademark Security Agreements or any other
documents necessary or advisable to perfect the Collateral Agent’s security
interest in any Intellectual Property, and further authorizes Collateral Agent,
its agents, attorneys, and representatives upon notice to Company, to file such
agreements or documents, and amendments thereto, at the Company’s expense, in
the office of the appropriate governmental agency.  In addition, the Company
irrevocably authorizes Collateral Agent, its agents, attorneys, and
representatives, to file financing statements, and amendments thereto, at the
Company’s expense, necessary to establish and maintain Collateral Agent’s
perfected security interest in the Collateral.  Any such financing statement to
be filed may describe the assets and property to be encumbered hereby in a
generic description such as “all assets of the debtor,” or words of similar
effect.  In order to fully consummate all of the transactions contemplated
hereunder, the Company shall make appropriate entries on its books and records
disclosing Collateral Agent’s security interests in the Collateral.

 

7.                                      Covenants Concerning the Company’s Legal
Status.  The Company covenants with the Collateral Agent and Investors as
follows: (a) without providing at least ten (10) days prior written notice to
the Collateral Agent, the Company will not change its name or organizational
identification number if it has one; (b) if the Company does not have an
organizational identification number and later obtains one, the Company shall
forthwith notify the Collateral Agent of such organizational identification
number; and (c) the Company will not change its type of organization,
jurisdiction of organization or other legal structure.  The Company agrees that
all documents, instruments and agreements demanded by Collateral Agent and/or
Investors in response to any of the changes described in this Section shall be
prepared, filed and recorded at the Company’s expense.

 

8.                                      Information.  The Company shall permit
Collateral Agent or its agents upon reasonable request to have access to and to
inspect all the Collateral and from time to time verify Accounts and chattel
paper, inspect, check, make copies of or extracts from the books, records and
files of the Company upon written notice, and the Company will make same
available at any time for such purposes.  In addition, the Company shall
promptly supply Collateral Agent and/or Investors with financial and such other
information concerning its affairs and assets as Collateral Agent may reasonably
request from time to time.

 

4

--------------------------------------------------------------------------------

 

9.                                      Event of Default.

 

9.1                               An “Event of Default” shall exist as and when
provided under the Notes.

 

9.2                               Upon the occurrence of an Event of Default,
the Notes and all other Liabilities may (notwithstanding any provisions thereof)
at the option of the Collateral Agent, upon notice, be declared, and thereupon
immediately shall become due and payable, and the Collateral Agent may exercise
from time to time any rights and remedies, including the right to immediate
possession of the Collateral, available to the Collateral Agent and/or Investors
under the UCC or otherwise applicable law. The Company agrees, in case of an
Event of Default, to assemble, at its expense, all the Collateral at a
convenient place acceptable to the Collateral Agent and to pay all costs of
Collateral Agent and Investors of collection of the Notes and all other
Liabilities, and enforcement of rights hereunder, including attorneys’ fees and
legal expenses, participation in bankruptcy proceedings, expense of locating the
Collateral and expenses of any repairs to any realty or other property to which
any of the Collateral may be affixed or be a part.  If any notification of
intended disposition of any of the Collateral is required by law, such
notification, if mailed, shall be deemed reasonably and properly given if sent
at least seven (7) business days before such disposition, postage prepaid,
addressed to the undersigned either at the address shown below, or at any other
address of the undersigned appearing on the records of the Collateral Agent. 
Notwithstanding the foregoing, the Collateral Agent shall not be obligated to
declare the Notes and other Liabilities due or, having done so, to take any
action authorized hereunder or by law with respect to the Collateral.  If the
Collateral Agent fails to take any action pursuant to this Section 13.2 within
sixty (60) days of being notified in writing of an Event of Default, any
Investor may, at its option, exercise the rights granted to the Collateral Agent
under this Section 13.2 or by law (the “Substitute Collateral Agent”). Provided,
however, that any amounts realized from the sale of Collateral or otherwise
hereunder shall first be distributed to reimburse the costs and expenses,
including but not limited to legal expenses and commissions, of the Collateral
Agent and the Substitute Collateral Agent in enforcing the rights hereunder and,
second, to all Investors pro-rata based upon the amount owed to each Investor
pursuant to the Notes or other Obligations held by the Investor.  Except as
provided in the immediately preceding sentence with respect to proceeds of sale,
the Collateral Agent and any Investor exercising rights pursuant to this
Section 13.2 shall not be liable to the Company or other Investors for any
action taken or not taken with respect to the Collateral other than willful
misconduct.

 

10.                               Collateral Agent.

 

10.1                        Appointment, Duties. Each Investor hereby appoints
and authorizes the Collateral Agent to take such action as the Collateral Agent
on its behalf and to exercise such powers under this Agreement, the Notes and
the Purchase Agreement (collectively, the “Transaction Documents”) as are
delegated to the Collateral Agent by the terms hereof and thereof, together with
such other powers as are incidental thereto or as the Collateral Agent and the
Investors may agree.  The Collateral Agent will have no duties,
responsibilities, obligations or liabilities other than those expressly set
forth in this Agreement and the other Transaction Documents, and no additional
duties, responsibilities, obligations or liabilities will be inferred from the

 

5

--------------------------------------------------------------------------------

 

provisions of this Agreement or the Transaction Documents or imposed on the
Collateral Agent.  As to actions that the Collateral Agent is not expressly
required to take pursuant to the provisions of this Agreement or the other
Transaction Documents (including enforcement or collection of the Notes), the
Collateral Agent will not exercise any discretion or take any action, but will
be required to act or to refrain from acting (and will be fully protected in so
acting or refraining from acting) solely upon the written instructions of the
Required Holders, and such instructions will be binding upon all of the
Investors, provided that the Collateral Agent will in no event be required to
take any action which exposes the Collateral Agent to personal liability for
which it is not indemnified hereunder, or which is contrary to the Transaction
Documents or law or with respect to which the Collateral Agent does not receive
adequate instructions from the Required Holders.  The Collateral Agent has no
duties or relationship of trust or agency with or to the Company or any of its
Affiliates.

 

10.2                        Exercise of Rights and Remedies.

 

(a)                                 The Collateral Agent shall administer the
Collateral in the manner contemplated by this Agreement and the other
Transaction Documents, and exercise, but, only upon the written instruction of,
and on behalf of, the Required Holders in accordance with this Agreement, such
rights and remedies with respect to the Collateral as are granted to it under
this Agreement and applicable law.

 

(b)                                 Upon the request of the Collateral Agent or
any other Investor, each Investor will provide the Collateral Agent and each
other Investor notice of the amount of outstanding Liabilities owed by the
Company to such Investor under the Transaction Documents.  In addition, each
Investor shall provide the Collateral Agent any other information that the
Collateral Agent may reasonably request in connection with the Collateral
Agent’s duties and responsibilities hereunder.

 

(c)                                  The Collateral Agent shall take any and all
actions and shall exercise such rights, remedies and options which it may have
under this Agreement and the other Transaction Documents as and to the extent
directed from time to time by the Required Holders, including realization and
foreclosure on all or any portion of the Collateral.

 

(d)                                 In the Event of Default, the proceeds of any
sale, disposition or other realization or foreclosure by the Collateral Agent
upon the Collateral or any portion thereof pursuant to this Agreement shall be
governed by this Section 14.2(d).  Any non-cash proceeds resulting from any such
sale, disposition or other realization or foreclosure shall, unless otherwise
directed by the Required Holders, be held by the Collateral Agent for the
benefit of the Investors until later sold or otherwise converted into cash at
the written direction of the Required Holders, at which time the Collateral
Agent shall apply such cash in accordance with this Section 14.2(d).  The
Collateral Agent shall distribute any cash proceeds net of expenses resulting
from any sale, disposition or other realization or foreclosure of the Collateral
to the Investors, promptly after receipt thereof, on a pro rata basis in
accordance with the respective outstanding amounts of the Liabilities owed to
each.

 

6

--------------------------------------------------------------------------------

 

(e)                                  The Investors and the Collateral Agent
hereby agree that if, at any time during the term of this Agreement, any
Investor or the Collateral Agent receives any payment or distribution of assets
of the Company of any kind or character, including monies or cash proceeds
resulting from liquidation of the Collateral, other than in accordance with the
terms of this Agreement, such Investor or the Collateral Agent shall hold such
payment or distribution in trust for the benefit of the Investors and shall
immediately remit such payment or distribution to the Collateral Agent for
application or distribution, as the case may be, in accordance with the terms of
this Agreement.

 

10.3                        Rights of Collateral Agent.

 

(a)                                 The Collateral Agent may delegate any of its
responsibilities or duties under this Agreement or the Transaction Documents to
one or more agents or attorneys and the Collateral Agent shall not be
responsible for any misconduct or negligence on the part of any agent or
attorney appointed with due care by it hereunder.

 

(b)                                 None of the Collateral Agent, its agents,
its attorneys or any of their respective Affiliates will be liable for any
action taken or omitted to be taken by any of them under or in connection with
this Agreement or the Transaction Documents, except that each will be liable for
its own gross negligence, willful misconduct or a material breach of the
Collateral Agent’s obligations under this Agreement.  Without limiting the
generality of the foregoing, the Collateral Agent:  (i) may treat the payee of
any Note as the holder thereof until the Collateral Agent receives written
notice of the assignment or transfer thereof signed by such payee and in form
satisfactory to the Collateral Agent; (ii) may consult with legal counsel of its
selection, independent public accountants and other experts selected by it and
will not be liable for any action taken or omitted to be taken in good faith by
it in accordance with the advice of such counsel, accountants or experts;
(iii) makes no representation or warranty to any Investor and will not be
responsible to any Investor for any statements, representations or warranties
made in or in connection with the Transaction Documents; (iv) will not, except
to the extent directed and indemnified by the Required Holders, have any duty to
ascertain or to inquire as to the performance or observance of any of the terms,
covenants or conditions of the Transaction Documents or to inspect the
Collateral or the books and records or any other properties of the Company;
(v) will not be responsible to any Investor for the due execution, legality,
validity, enforceability, genuineness, sufficiency or value of any Transaction
Document or any other document or instrument furnished pursuant thereto, or for
the failure of any Person (other than the Collateral Agent) to perform its
obligations under any Transaction Document; and (vi) will incur no liability
under or in respect of this Agreement or any other Transaction Document or
otherwise by acting upon any notice, consent, waiver, certificate or other
writing or instrument (including facsimiles, telexes, telegrams and cables)
believed by it to be genuine and signed or sent by the proper Person or Persons.

 

(c)                                  The Collateral Agent will not be deemed to
have knowledge or notice of any Default or Event of Default unless and until it
has received written notice from the Company or an Investor referring to the
Notes and this Agreement, describing the Default or Event of Default and stating
that such notice is a “notice of default.”

 

7

--------------------------------------------------------------------------------

 

(d)                                 In the event not otherwise paid by the
Company pursuant to Section 15 of this Agreement, each Investor agrees to pay
the Collateral Agent, upon demand, its pro-rata share of the Collateral Agent’s
documented out-of-pocket expenses, including the fees and expenses of its
counsel (and any local counsel) and of any experts and agents in connection with
(i) the administration of this Agreement and the other Transaction Documents,
(ii) the custody or preservation of, or the sale of, collection from or other
realization upon, any of the Collateral, (iii) the exercise or enforcement
(whether through negotiations, legal proceedings or otherwise) of any of the
rights of the Collateral Agent or the Investors hereunder or under the other
Transaction Documents or (vi) the failure by the Company to perform or observe
any of the provisions hereof or of any of the other Transaction Documents.  In
the event the Investors have made payments pursuant to this Section 14.3(d), any
corresponding amounts subsequently paid by the Company to the Collateral Agent
pursuant to Section 15 shall be returned to the Investors on a pro-rata basis. 
The agreements in this Section 14.3(d) shall survive the later of (i) payment
and satisfaction in full of the Liabilities, (ii) the resignation or removal of
the Collateral Agent, and (iii) the termination of this Agreement.

 

(e)                                  No provision of this Agreement shall
require the Collateral Agent to expend or risk its own funds or otherwise incur
any financial liability in the performance of any of its duties hereunder, or in
the exercise of any of its rights or powers, if it shall have reasonable grounds
for believing that repayment of such funds or adequate indemnity against such
risk or liability is not reasonably assured to it.

 

(f)                                   The Collateral Agent shall be provided
executed or true and correct copies of each amendment, notice, waiver, consent
or certificate made or delivered with respect to this Agreement or any of the
other Transaction Documents sufficiently far in advance of the Collateral Agent
being required to take action under this Agreement or any other Transaction
Document or in respect of any such notice, waiver, consent or other certificate
delivered in connection therewith so as to allow the Collateral Agent to take
any such action.

 

10.4                        No Reliance. Each Investor acknowledges that neither
the Collateral Agent nor any of its Affiliates has made any representations or
warranties with respect to the Company or any other matter, and agrees that no
review or other action by the Collateral Agent or any of its Affiliates will be
deemed to constitute any such representation or warranty.  Each Investor
acknowledges that it has, independently and without reliance upon the Collateral
Agent or any other Investor, and based on the documentation and information
referred to in the Purchase Agreement and such other documents and information
as it has deemed appropriate, made its own credit analysis and decision to enter
into this Agreement and the other Transaction Documents to which it is party. 
Each Investor also acknowledges and agrees that it will, independently and
without reliance upon the Collateral Agent or any other Investor, and based on
such documents and information as it will deem appropriate at the time, continue
to make its own credit decisions in taking or not taking action under the
Transaction Documents.  The Collateral Agent will provide to any Investor any
information or documents concerning or relating to the Company or any other
Person or matter that may come into the Collateral Agent’s possession.

 

8

--------------------------------------------------------------------------------

 

10.5                        Indemnification, Bankruptcy.

 

(a)                                 Each Investor, by its consent hereto, hereby
agrees to indemnify the Collateral Agent, in its capacity as such, its officers,
directors, shareholders, controlling persons, employees, agents and servants
(each “Indemnified Party”) from and against any and all claims, damages, losses,
liabilities, obligations, penalties, actions, causes of action, judgments,
suits, costs, expenses or disbursements (including, without limitation,
reasonable attorneys’ and consultants’ fees and expenses) (collectively
“Damages”) of any kind or nature whatsoever which may at any time be imposed on,
incurred by or asserted against any Indemnified Party (or which may be claimed
against any Indemnified Party by any Person) by reason of, in connection with or
in any way relating to or arising out of, (i) any Transaction Document, (ii) any
action taken or omitted by the Collateral Agent in compliance with the
provisions of this Agreement and the other Transaction Documents or (iii) any
claim based on any misstatement, inaccuracy or omission in any oral or written
information provided by the Collateral Agent or any of its representatives in
connection with this Agreement, the Collateral, the Notes or the other
Transaction Documents, provided that each Investor will not be liable to any
Indemnified Party for any portion of such claims, liabilities, obligations,
losses, damages, penalties, judgments, costs, expenses or disbursements
resulting from such Indemnified Party’s gross negligence or willful misconduct
as determined in a final, non-appealable judgment by a court of competent
jurisdiction.

 

(b)                                 Nothing contained herein shall limit or
restrict the independent right of any Investor to initiate an action or actions
in any bankruptcy, reorganization, compromise, arrangement, insolvency,
readjustment of debt, dissolution or liquidation or similar proceeding in its
individual capacity and to appear or be heard on any matter before the
bankruptcy or other applicable court in any such proceeding, including, without
limitation, with respect to any question concerning post-petition financing
arrangements.  The Collateral Agent is not entitled to initiate such actions on
behalf of any Investor or to appear and be heard on any matter before the
bankruptcy or other applicable court in any such proceeding as the
representative of any Investor.  The Collateral Agent is not authorized in any
such proceeding to enter into any agreement for, or give any authorization or
consent with respect to, the post-petition usage of the Collateral, unless such
agreement, authorization or consent has been approved in writing by the Required
Holders.  This Agreement shall survive the commencement of any such bankruptcy,
reorganization, compromise, arrangement, insolvency, readjustment of debt,
dissolution or liquidation or similar proceeding.

 

10.6                        Resignation and Removal of the Collateral Agent. 
The Collateral Agent may resign at any time by giving at least sixty (60) days’
prior written notice thereof to the Investors and the Company and may be removed
at any time by the Required Holders, with any such resignation or removal to
become effective only upon the appointment of a successor Collateral Agent under
this Section 14.6.  Upon any such resignation or removal, (i) the Required
Holders will have the right to appoint a successor Collateral Agent, and
(ii) unless a Default or Event of Default shall have occurred and be continuing,
the Company shall have the right to approve such appointed successor Collateral
Agent, such approval not to be unreasonably withheld.  If no successor

 

9

--------------------------------------------------------------------------------

 

Collateral Agent will have been so appointed by the Required Holders and will
have accepted its appointment within forty-five (45) days after the resignation
or removal of the retiring Collateral Agent, the retiring Collateral Agent or
the Required Holders may, at the expense of the Company, petition a court of
competent jurisdiction for the appointment of a successor Collateral Agent. 
Upon the acceptance of its appointment as Collateral Agent, the successor
Collateral Agent will thereupon succeed to and be vested with all the rights,
powers, privileges and duties of the retiring Collateral Agent, and the retiring
Collateral Agent will be discharged from its duties and obligations under this
Agreement.  After any retiring Collateral Agent’s resignation or removal, the
provisions of this Agreement will inure to its benefit as to any actions taken
or omitted to be taken by it while it was Collateral Agent.

 

11.                               Expenses. The Company agrees to pay or
promptly reimburse the Collateral Agent and any Investor for all charges, costs
and expenses (including, without limitation, all costs and expenses of holding,
preparing for sale and selling, collecting or otherwise realizing upon the
Collateral and all attorneys’ fees, legal expenses and court costs) incurred by
any Investor in connection with the exercise of its respective rights and
remedies under this Agreement, including, without limitation, any charges, costs
and expenses that may be incurred in any effort to enforce any of the provisions
of this Agreement or any obligation of the Company in respect of the Collateral
or in connection with (i) the preservation of the liens in favor of, or the
rights of the Collateral Agent or any other Investor under this Agreement or
(ii) any actual or attempted sale, lease, disposition, exchange, collection,
compromise, settlement or other realization in respect of, or care of, the
Collateral, including all such costs and expenses incurred in any bankruptcy,
reorganization, workout or other similar proceeding.  All amounts for which the
Company is liable pursuant to this Section 15 shall be due and payable by the
Company to the Collateral Agent or the Investors upon demand.

 

12.                               General.  Time shall be deemed of the very
essence of this Agreement.  Collateral Agent, Substitute Collateral Agent and/or
Investors shall be deemed to have exercised reasonable care in the custody and
preservation of any Collateral in their possession if they take such action for
that purpose as the Company requests in writing, but failure of Collateral
Agent, Substitute Collateral Agent or Investors to comply with any such request
shall not of itself be deemed a failure to exercise reasonable care, and failure
of Collateral Agent, Substitute Collateral Agent or Investors to preserve or
protect any rights with respect to such Collateral against any prior parties or
to do any act with respect to the preservation of such Collateral not so
requested by the Company shall not be deemed a failure to exercise reasonable
care in the custody and preservation of such Collateral.  Any delay on the part
of Collateral Agent, Substitute Collateral Agent or Investors in exercising any
power, privilege or right hereunder, or under any other instrument executed by
the Company to Collateral Agent, Substitute Collateral Agent or Investors in
connection herewith shall not operate as a waiver thereof, and no single or
partial exercise thereof, or the exercise of any other power, privilege or right
shall preclude other or further exercise thereof, or the exercise of any other
power, privilege or right.  The waiver by Collateral Agent, Substitute
Collateral Agent or Investors of any Event of Default by the Company shall not
constitute a waiver of any subsequent Events of Default, but shall be restricted
to the Event of Default so waived.  All rights, remedies

 

10

--------------------------------------------------------------------------------

 

and powers of Collateral Agent, Substitute Collateral Agent or Investors
hereunder are irrevocable and cumulative, and not alternative or exclusive, and
shall be in addition to all rights, remedies and powers given hereunder or in or
by any other instruments or by the UCC, or any laws now existing or hereafter
enacted.

 

This Agreement shall be governed by, and construed in accordance with, the
internal laws of the State of California without regard to the choice of law
principles thereof.  Each of the parties hereto irrevocably submits to the
exclusive jurisdiction of the courts of the State of California located in Santa
Clara County and the United States District Court for the Northern District of
California for the purpose of any suit, action, proceeding or judgment relating
to or arising out of this Agreement and the transactions contemplated hereby. 
Service of process in connection with any such suit, action or proceeding may be
served on each party hereto anywhere in the world by the same methods as are
specified for the giving of notices under this Agreement.  Each party hereto
irrevocably waives any objection to the laying of venue of any such suit, action
or proceeding brought in such courts and irrevocably waives any claim that any
such suit, action or proceeding brought in any such court has been brought in an
inconvenient forum.  EACH OF THE PARTIES HERETO WAIVES ANY RIGHT TO REQUEST A
TRIAL BY JURY IN ANY LITIGATION WITH RESPECT TO THIS AGREEMENT AND REPRESENTS
THAT COUNSEL HAS BEEN CONSULTED SPECIFICALLY AS TO THIS WAIVER.  Whenever
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 applicable 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.  The rights and privileges of Collateral Agent, Substitute Collateral
Agent or Investors hereunder shall inure to the benefit of their successors and
assigns and this Agreement shall be binding on all heirs, executors,
administrators, assigns and successors of the Company.

 

Any notice required or permitted by this Agreement shall be in writing and shall
be deemed sufficient if given in accordance with the Purchase Agreement.

 

This Agreement constitutes the entire understanding of the parties with respect
to the subject matter hereof and supersedes all prior written and oral
communications or understandings.  This Agreement may be amended or
supplemented, and any provision or term hereof may be waived, by a writing
signed on behalf of each of (i) the Company, (ii) the Collateral Agent and
(iii) the Required Holders.  The Company acknowledges receipt of a true and
complete copy of this Agreement.  This Agreement may be executed in two or more
counterparts, each of which shall be deemed an original and all of which
together shall constitute one instrument.  A signature to this Agreement
transmitted electronically shall have the same authority, effect and
enforceability as an original signature.

 

[signature page follows]

 

11

--------------------------------------------------------------------------------

 

The parties have executed this Security Agreement as of the date first written
above.

 

 

THE COMPANY:

 

 

 

BIOPHARMX CORPORATION

 

 

 

 

By:

/s/ Anja Krammer

 

Name:

Anja Krammer

 

Title:

President

 

[signature page to Security Agreement]

 

--------------------------------------------------------------------------------

 

 

INVESTORS:

 

 

 

 

By:

/s/ Roderick Wong

 

Printed Name:

Roderick Wong

 

Title (if applicable):

Managing Member

 

Entity Name (if applicable):

 RTW Master Fund, LTD

 

[signature page to Security Agreement]

 

--------------------------------------------------------------------------------

 

SCHEDULE 7

 

--------------------------------------------------------------------------------