We study how securities and issuance mechanisms can be designed to mitigate the adverse impact of market imperfections on liquidity. In our model, asset owners seek to obtain liquidity by selling claims contingent on privately observed future cash-flows. Liquidity suppliers can be competitive or strategic. In the optimal trading mechanism associated to an arbitrary given security, issuers with low cash-flows sell their entire holdings of the security, while issuers with high cash-flows are typically excluded from trade. By designing the security optimally, issuers can avoid exclusion altogether. We show that the optimal security is debt. Because of its low informational sensitivity, debt mitigates the adverse selection problem. Furthermore,...