When a firm has external debt and monitoring by shareholders is essential, managerial bonuses are shown to be an optimal solution. A small managerial bonus linked to firm's performance not only reduces moral hazard between managers and shareholders, but also between creditors and monitoring shareholders. A negative relation between corporate bond yields and managerial bonuses can be predicted. Furthermore, the model shows how higher managerial pay-performance sensitivity goes hand in hand with greater company leverage and lower company diversification. These predictions find some support in the empirical literature.