  In this paper, we take up the analysis of a principal/agent model with moral
hazard introduced in [17], with optimal contracting between competitive
investors and an impatient bank monitoring a pool of long-term loans subject to
Markovian contagion. We provide here a comprehensive mathematical formulation
of the model and show using martingale arguments in the spirit of Sannikov [18]
how the maximization problem with implicit constraints faced by investors can
be reduced to a classical stochastic control problem. The approach has the
advantage of avoiding the more general techniques based on forward-backward
stochastic differential equations described in [6] and leads to a simple
recursive system of Hamilton-Jacobi-Bellman equations. We provide a solution to
our problem by a verification argument and give an explicit description of both
the value function and the optimal contract. Finally, we study the limit case
where the bank is no longer impatient.
