EX 10.4


    Execution
      Version

    


    PATENT
      SECURITY AGREEMENT

     

    This
      Agreement is dated the 28th
      day of
      September, 2007, among Diomed Holdings, Inc., a Delaware corporation, Diomed,
      Inc., a Delaware corporation, each with its chief executive office and principal
      place of business located at One Dundee Park, Andover, Massachusetts 01810,
      (each, a “Grantor”
and
      collectively, the “Grantors”
),
      and
      Hercules Technology Growth Capital, Inc., a Maryland corporation, with its
      chief
      executive office and principal place of business located at 400 Hamilton Avenue,
      Suite 310, Palo Alto, California 94301 (“Secured
      Party”).

     

    RECITALS

     

    A. Each
      Grantor owns Patents (as defined in the Loan Agreement (as defined below))
      and
      Patent applications and are party, whether individually or collectively, to
      the
      Patent Licenses to which it is a party (as defined in the Loan Agreement),
      all
      as listed on Schedule
      1
      hereto;

     

    B. Grantors
      and Secured Party are parties to a Loan and Security Agreement dated as of
      September 28, 2007 and all ancillary documents entered into in connection with
      such Loan and Security Agreement, all as may be amended from time to time
      (hereinafter referred to collectively as the “Loan
      Agreement”);

     

    C. Pursuant
      to the terms of the Loan Agreement, each Grantor has granted to Secured Party
      a
      first priority security interest in all of the tangible and intangible property
      of such Grantor, including all right, title and interest of such Grantor in,
      to
      and under all of such Grantor’s Patents and Patent Licenses, whether presently
      existing or hereafter arising or acquired, and all products and proceeds
      thereof, including, without limitation, any and all causes of action which
      may
      exist by reason of infringement thereof for the full term of the Patents, to
      secure the payment of the Secured Obligations;

     

    D.
      All
      capitalized terms not defined herein shall have the meanings set forth in the
      Loan Agreement;

     

    NOW,
      THEREFORE, in consideration of the premises contained herein, each Grantor
      agrees with Secured Party as follows:

     

    1.
      To
      secure the complete and timely satisfaction of all Secured Obligations, each
      Grantor hereby grants, and conveys to Secured Party a continuing security
      interest in and lien on all of such Grantor’s entire right, title and interest
      in and to, whether presently existing or hereafter arising or acquired, the
      Patents and Patent Licenses to which it is a party, including those listed
      on
Schedule
      1
      hereto
      (as may be amended from time to time), including, without limitation, all
      proceeds thereof (such as, by way of example, license royalties and proceeds
      of
      infringements, all rights corresponding thereto throughout the world and all
      reissues, divisions, continuations, renewals, extensions and
      continuations-in-part thereof).

     

    2.
      Each
      Grantor represents, warrants and covenants that:

     

    a)
      such
      Grantor is the sole and exclusive owner of the entire and unencumbered right,
      title and interest in and to each of the Patents owned by such Grantor, free
      and
      clear of any liens, charges and encumbrances, including, without limitation,
      pledges, assignments, licenses, shop rights and covenants by Grantor not to
      sue
      third persons, except
      for any
      license disclosed in Schedule
      1;

     

    b)
      The
      Patents are subsisting and have not been adjudged invalid or unenforceable,
      in
      whole or in part;

     

    
      
        
        

      

      
        
        

        
          

        

      

      
        
        

      

    


    c)
      To the
      best of such Grantor’s knowledge, each of the Patents is valid and enforceable;
      and

     

    d)
      such
      Grantor has the unqualified right to enter into this Patent Security Agreement
      and perform its terms.

     

    3.
      Each
      Grantor agrees that, until all of the Secured Obligations shall have been
      satisfied in full in cash, such Grantor will not enter into any agreement
      relating to such Grantor’s Patents (for example, a license agreement) which is
      inconsistent with such Grantor’s obligations under this Patent Security
      Agreement, without Secured Party’s prior written consent; provided,
      that so
      long as no Default or Event of Default shall have occurred and be continuing,
      such Grantor may grant licenses to third parties to use the Patents in the
      ordinary course of business of such Grantor and such third party on arm’s length
      and customary business terms.

     

    4.
      If,
      before the Secured Obligations shall have been satisfied in full in cash, any
      Grantor shall obtain rights to any new patentable inventions, or become entitled
      to the benefit of any Patent for any reissue, division, continuation, renewal,
      extension, or continuation-in-part of any Patent or any improvement on any
      Patent, the provisions of paragraph
      1
      shall
      automatically apply thereto and such Grantor shall give to Secured Party prompt
      notice thereof in writing.

     

    5.
      Each
      Grantor authorizes Secured Party to unilaterally modify this Patent Security
      Agreement by amending Schedule
      1
      to
      include any future Patents which are Patents under paragraph
      1
      or
paragraph
      4
      hereof.

     

    6.
      If any
      Event of Default shall have occurred and be continuing, Secured Party shall
      have, in addition to all other rights and remedies given it by this Patent
      Security Agreement or the Loan Agreement, those allowed by law and the rights
      and remedies of a secured party under the Uniform Commercial Code as enacted
      in
      any jurisdiction in which the Patents may be located and, without limiting
      the
      generality of the foregoing, Secured Party may immediately, without demand
      of
      performance and without other notice (except as set forth below) or demand
      whatsoever to any Grantor, all of which are hereby expressly waived, and without
      advertisement, sell at public or private sale or otherwise realize upon, the
      whole or from time to time any part of the Patents, or any interest which any
      Grantor may have therein, and after deducting from the proceeds of sale or
      other
      disposition of the Patents all expenses (including reasonable expenses for
      brokers’ fees and legal services), shall apply the residue of such proceeds
      toward the payment of the Secured Obligations. Any remainder of the proceeds
      after payment in full in cash of the Secured Obligations shall be paid over
      to
      Grantor. Notice of any sale or other disposition of the Patents shall be given
      to the Lead Borrower at least ten (10) days before the time of any intended
      public or private sale or other disposition of the Patents is to be made, which
      each Grantor hereby agrees shall be reasonable notice of such sale or other
      disposition. At any such sale or other disposition Secured Party may, to the
      extent permissible under applicable law, purchase the whole or any part of
      the
      Patents sold, free from any right of redemption on the part of such Grantor,
      which right is hereby waived and released.

     

    7.
      Each
      Grantor hereby authorizes and empowers Secured Party to make, constitute and
      appoint any officer or agent of Secured Party, as Secured Party may select
      in
      its exclusive discretion, as such Grantor’s true and lawful attorney-in-fact,
      with the power, after and during the continuance of an Event of Default, to
      endorse such Grantor’s name on all applications, documents, papers and
      instruments necessary for Secured Party to use the Patents, or to grant or
      issue
      any exclusive or nonexclusive license under the Patents to any third person,
      or
      necessary for Secured Party to, pledge, convey or otherwise transfer title
      in or
      dispose of the Patents
      to any third person as a part of Secured Party’s realization on such collateral
      upon acceleration of the Secured Obligations following an Event of Default.
      Each
      Grantor hereby ratifies all that such attorney shall lawfully do or cause to
      be
      done by virtue hereof. This power of attorney being coupled with an interest
      shall be irrevocable for the life of this Patent Security
      Agreement.

     

    
      
        
        

      

      
        2

        
          

        

      

      
        
        

      

    

     

    8.
      At
      such time as Grantors shall completely satisfy all of the Secured Obligations
      (other than inchoate indemnity obligations), this Patent Security Agreement
      shall terminate and Secured Party shall execute and deliver to Grantors all
      terminations or other instruments as may be necessary or proper terminate the
      security interest granted herein and to terminate the applicable Grantor’s
      obligations hereunder, subject to any disposition thereof which may have been
      made by Secured Party pursuant hereto.

     

    9.
      Any
      and all reasonable fees, costs and expenses, of whatever kind or nature,
      including the reasonable attorneys’ fees and legal expenses incurred by Secured
      Party in connection with the preparation of this Patent Security Agreement
      and
      all other documents relating hereto and the consummation of this transaction,
      the filing or recording of any documents (including all taxes in connection
      therewith) in public offices, the payment or discharge of any taxes, counsel
      fees, maintenance fees, encumbrances or otherwise protecting, maintaining or
      preserving the Patents, or in defending or prosecuting any actions or
      proceedings arising out of or related to the Patents, shall be borne and paid
      by
      Grantors jointly and severally on demand by Secured Party and until so paid
      shall be added to the principal amount of the Secured Obligations and shall
      bear
      interest at the highest applicable Default Rate.

     

    10.
      Each
      Grantor shall have the duty, through counsel reasonably acceptable to Secured
      Party, to prosecute diligently any Patent applications pending as of the date
      of
      this Patent Security Agreement or thereafter until the Secured Obligations
      shall
      have been paid in full in cash, to make application on unpatented but patentable
      inventions (provided that such registration will not significantly compromise
      such Grantor’s competitive position) and to preserve and maintain all rights in
      Patents, including, without limitation, the payment of all maintenance fees.
      Any
      expenses incurred in connection with such an application shall be borne by
      Grantors. No Grantor shall abandon any right to file a Patent application,
      or
      any pending Patent application or Patent without the prior written consent
      of
      Secured Party, which consent shall not be unreasonably withheld.

     

    11.
      Each
      Grantor shall have the right, with the consent of Secured Party, which consent
      shall not be unreasonably withheld, to bring suit in its own name and to join
      Secured Party, if necessary, as a party to such suit so long as Secured Party
      is
      satisfied, in the exercise of reasonable judgment, that such joinder will not
      subject it to any risk of liability, to enforce the Patents. Each Grantor shall
      promptly, upon demand, reimburse and indemnify Secured Party for all damages,
      costs and expenses, including reasonable attorneys’ fees incurred by Secured
      Party, in accordance with the Loan Agreement and this Patent Security
      Agreement.

     

    12.
      No
      course of dealing between any Grantor and Secured Party, nor any failure to
      exercise, nor any delay in exercising, on the part of Secured Party, any right,
      power or privilege hereunder or under the Loan Agreement shall operate as a
      waiver thereof; nor shall any single or partial exercise of any right, power
      or
      privilege hereunder or thereunder preclude any other or further exercise thereof
      or the exercise of any other right, power or privilege.

     

    13.
      At any time and from time to time,
      upon the written request of Secured Party, and at the sole expense of Grantors,
      Grantors will promptly and duly execute and deliver such further instruments
      and
      documents and take such further action as Secured Party may reasonably request
      for the purpose of obtaining or preserving the full benefits of this Patent
      Security Agreement and the Loan Agreement, and of the rights and powers herein
      and therein granted, including, without limitation, the filing of any
      additional, supplemental, or amended Patent Security Agreements, or the filing
      of any financing statements or continuation statements under the Uniform
      Commercial Code in effect in any jurisdiction with respect to the Liens created
      hereby or in any of the Loan Agreements.

     

    
      
        
        

      

      
        3

        
          

        

      

      
        
        

      

    

     

    14.
      All
      of Secured Party’s rights and remedies with respect to the Patents, whether
      established hereby or by the Loan Agreement or any other agreements or by law
      shall be cumulative and may be exercised singularly or
      concurrently.

     

    15.
      The
      provisions of this Patent Security Agreement are severable, and if any clause
      or
      provision shall be held invalid and unenforceable in whole or in part in any
      jurisdiction, then such invalidity or unenforceability shall affect only such
      clause or provision, or part thereof, in such jurisdiction, and shall not in
      any
      manner affect such clause or provision in any other jurisdiction, or any clause
      or provision of this Patent Security Agreement in any jurisdiction.

     

    16.
      This
      Patent Security Agreement is subject to modification only by a writing signed
      by
      the parties hereto, except as provided in paragraph
      5.

     

    17.
      This
      Patent Security Agreement shall be binding upon Grantors and Secured Party
      and
      their respective permitted successors and assigns, and shall inure to the
      benefit of Grantors, Secured Party and the respective permitted successors
      and
      assigns of Grantors and Secured Party.

     

    18.
      The
      validity and interpretation of this Patent Security Agreement and the rights and
      obligations of the parties shall be governed by the laws of the State of
      California.

     

    19.
      Section 11.2 (Notice)
      of the
      Loan Agreement is hereby incorporated herein in its entirety, save that
      references therein to the term Lender shall be deemed to be references to
      Secured Party herein and references therein to the term Borrower or Borrowers
      shall be deemed to be references to any Grantor or the Grantors, as applicable,
      herein.

     

    [Remainder
      of Page Intentionally Left Blank]

     

    
      
        
        

      

      
        4

        
          

        

      

      
        
        

      

    

    


    IN
      WITNESS WHEREOF,
      the
      execution hereof under seal as of the day and year first above written.


     

    
      	
              DIOMED
                HOLDINGS, INC.

            
	 	 
	
              By:

            	
               

            
	 	
              Name:

            
	 	
              Title:

            
	 	 
	
              DIOMED,
                INC.

            
	 	 
	
              By:

            	
               

            
	 	
              Name:

            
	 	
              Title:

            


    

     

    
      
        
        

      

      
        
        

        
          

        

      

      
        
        

      

    

    


    
      	
              HERCULES
                TECHNOLOGY GROWTH CAPITAL,
                INC.

            
	 
	
              By:

            	
               

            
	
              Name:

            	
              K.
                Nicholas Martitsch

            
	
              Its:
                

            	
              Associate
                General Counsel

            


    

     

    
      
        
        

      

      
        
        

        
          

        

      

      
        
        

      

    


    SCHEDULE
      1 TO

    PATENT
      SECURITY AGREEMENT

     

    PATENTS
      AND PATENT APPLICATIONS:

     

    
      	
              Patent
                Title

            	 	
              Owner

            	 	
              Registration/

              Application No.

            	 	
              Registration/

              File
                Date

            
	 	 	 	 	 	 	 
	
              METHOD
                OF ENDOVENOUS LASER TREATMENT

            	 	
              Diomed,
                Inc.

            	 	
              6986766

            	 	
              01/17/2006

            
	 	 	 	 	 	 	 
	
              MEDICAL
                LASER DEVICE

            	 	
              Diomed,
                Inc.

            	 	
              6981971

            	 	
              01/03/2006

            
	 	 	 	 	 	 	 
	
              ENDOVASCULAR
                LASER DEVICE AND TREATMENT OF VARICOSE VEINS 

            	 	
              Diomed,
                Inc.

            	 	
              6398777

            	 	
              06/04/2002

            
	 	 	 	 	 	 	 
	
              LASER
                SYSTEM

            	 	
              Diomed,
                Inc.

            	 	
              20060089629

            	 	
              04/26/2006