We study pollution permit markets in which a fraction of permits are allocated to firms based on their output. Output-based allocations, which are receiving increasing attention in the design of carbon markets around the world (e.g., Europe, California, New Zealand), are shown to be optimal under demand and supply volatility despite the output distortions they may create. In a market that covers multiple sectors, the optimal design combines auctioned permits with output-based allocations that are specific to each sector and increasing in its volatility. When firms are better informed about the latter or must self select, the regulator resort to some free (i.e., lump-sum) allocations to sort firms out. Numerical exercises illustrate the policy relevance of our results: the gains from considering output-based allocations can be substantial