  Unmanned Aerial Vehicle (UAV) has been recognized as a promising way to
assist future wireless communications due to its high flexibility of deployment
and scheduling. In this paper, we focus on temporarily deployed UAVs that
provide downlink data offloading in some regions under a macro base station
(MBS). Since the manager of the MBS and the operators of the UAVs could be of
different interest groups, we formulate the corresponding spectrum trading
problem by means of contract theory, where the manager of the MBS has to design
an optimal contract to maximize its own revenue. Such contract comprises a set
of bandwidth options and corresponding prices, and each UAV operator only
chooses the most profitable one from all the options in the whole contract. We
analytically derive the optimal pricing strategy based on fixed bandwidth
assignment, and then propose a dynamic programming algorithm to calculate the
optimal bandwidth assignment in polynomial time. By simulations, we compare the
outcome of the MBS optimal contract with that of a social optimal one, and find
that a selfish MBS manager sells less bandwidth to the UAV operators.
