In our model, private actors with interbank cash flows similar to, but more general than that by Carmona et al. (2013) borrow from the non-banking financial sector at a certain interest rate, controlled by the central bank, and invest in risky assets. Each private actor aims to maximize its expected terminal logarithmic wealth. The central bank, in turn, aims to control the overall economy by means of an exponential utility function. We solve all stochastic optimal control problems explicitly We are able to recreate occasions such as liquidity trap. We study distribution of the number of defaults (net worth of a private actor going below a certain threshold).