We study the optimal design of clearing systems. We analyze how counterparty risk should be allocated, whether traders … should be fully insured against that risk, and how moral hazard affects the optimal allocation of risk. The main advantage of … centralized clearing, as opposed to no or decentralized clearing, is the mutualization of risk. While mutualization fully insures …