Design of Regulatory Mechanisms and Institutions