In this paper we present a macroeconomic microfounded framework with heterogeneous agents -- households, firms, banks -- which interact through a decentralized matching process presenting common features across four markets -- goods, labor, credit and deposit. We study the dynamics of the model...