The optimal contract maximizes the entrepreneur's expected compensation:

Subject to the entrepreneur's incentive constraint

and the investor's breakeven constraint:

My notes say that the optimal contract is but I have no idea how to set up the Lagrangian's to solve for this.

- entrepreneur's effort

- no effort

- return for borrower if project is success

- return for borrower if project fails

- benefit per unit of investment, when no effort

- investment

- cash holding

- return on investment if success

- return on investment if failure