This paper studies optimal incentive contracting under moral hazard when workers exhibit relative income concerns and compare their earnings with the economy’s average wage. We show that when firms have access to a rich performance measure, the optimal contract takes a binary form if effort is sufficiently low and a ternary form otherwise. We then use these results to investigate how contractual structure varies throughout the economy when firm-worker pairs are heterogeneous with respect to either their productivity, or the information system used to align incentives. We argue that our findings suggest that the incidence of pay-for-performance should be highest for jobs which significantly contribute to overall firm profitability and for which a worker’s performance is difficult to measure. These predictions appear largely consistent with recent empirical evidence.