To meet its commitment under the Kyoto Protocol, the EU plans to implement an emissions trading system with grandfathering of allowances. Besides having distributional impacts, the choice of the grandfathering scheme may affect efficiency if firms anticipate how future allocations depend on upcoming decisions. In this paper, we determine central design rules for optimal grandfathering within a simple two-period model. We find that for (small) open trading systems, where allowance prices are exogenous, first-best second-period grandfathering schemes must not depend on firm-specific decisions in the first period. Second-best schemes correspond to a Ramsey rule of optimal tax differentiation and are generally based on both previous emissions and output. However, of closed emissions trading systems, i.e. endogeneous allowance prices, first- and second-best rules coincide and must not depend on previous output levels. They consist of an assignment proportional to the emissions in the first period plus a term which does not depend on firm-specific decisions in either of the two periods.