In this paper shareholders face the trade-off between providing managers with incentives to exert beneficial effort and to engage in costly fraudulent activity. We solve for the optimal compensation package, given that shareholders can either grant (restricted) stock or stock options and given fixed average compensation costs. We show that if the negative effect of fraud on the company's value is sufficiently large then stock based compensation is optimal. Otherwise, stock option based compensation is optimal. Furthermore, we show that the fraud to effort ratio is increasing in the strike price and that the optimal strike price is decreasing in the size of the negative effects of fraud on the company's value.