This paper analyzes a model where investors use a credit rating to decide whether to finance a firm. The rating quality depends on the unobservable effort exerted by a credit rating agency (CRA). We analyze optimal compensation schemes for the CRA that differ depending on whether a social...