  We consider the robust contract design problem when the principal only has
limited information about the actions the agent can take. The principal
evaluates a contract according to its worst-case performance caused by the
uncertain action space. Carroll (AER 2015) showed that a linear contract is
optimal among deterministic contracts. Recently, Kambhampati (JET 2023) showed
that the principal's payoff can be strictly increased via randomization over
linear contracts. In this paper, we characterize the optimal randomized
contract, which remains linear and admits a closed form of its cumulative
density function. The advantage of randomized contracts over deterministic
contracts can be arbitrarily large even when the principal knows only one
non-trivial action of the agent. Furthermore, our result generalizes to the
model of contracting with teams, by Dai and Toikka (Econometrica 2022).
