We're outlining an agreement for helping to sell a certain IT product (web site). If we are successful to sell it, we're entitled to a %% of the sale (only when it's actually sold). But what if the party who developed the product terminates our agreement before it's sold, and finalizes sale to a client who we worked with? Let's say we did 80% of the job to find a buyer but didn't finalize the deal, then our client terminates the agreement, we are left with nothing. What are the ways to protect ourselves from such situation?