Shareholder agreements govern the relations among shareholders in privately-held companies, such as joint ventures or venture capital-backed firms. We provide an economic explanation for the use of put and call options, preemption rights, catch-up clauses, drag-along rights, demand rights, andtag-along rights in shareholder agreements. We view these clauses as a response to a problem of dynamic, double moral hazard, whereby the value of the venture depends on ex ante investments and ex post transfers. Contract clauses i) preserve the incentives to make ex ante investments andii) minimize ex post transfers. We extend our framework to discuss the use of other clauses, such as the option to extend the life of a business alliance