  In this paper we formulate a contract design problem where a primary license
holder wishes to profit from its excess spectrum capacity by selling it to
potential secondary users/buyers. It needs to determine how to optimally price
the excess spectrum so as to maximize its profit, knowing that this excess
capacity is stochastic in nature, does not come with exclusive access, and
cannot provide deterministic service guarantees to a buyer. At the same time,
buyers are of different {\em types}, characterized by different communication
needs, tolerance for the channel uncertainty, and so on, all of which a buyer's
private information. The license holder must then try to design different
contracts catered to different types of buyers in order to maximize its profit.
We address this problem by adopting as a reference a traditional spectrum
market where the buyer can purchase exclusive access with fixed/deterministic
guarantees. We fully characterize the optimal solution in the cases where there
is a single buyer type, and when multiple types of buyers share the same, known
channel condition as a result of the primary user activity. In the most general
case we construct an algorithm that generates a set of contracts in a
computationally efficient manner, and show that this set is optimal when the
buyer types satisfy a monotonicity condition.
