This study develops a novel agent-based model of the interbank market with endogenous credit risk formation mechanisms. We allow banks to exchange funds through unsecured and secured transactions, which facilitates the flow of funds to the most profitable investment projects. Risk premiums result from banks׳ forecasting rules and depend on past performance of the benchmark risk factors and interest rates. Our model confirms basic stylized facts of the interbank interest rates and volumes. We also find that network structures within the secured market segment are characterized by the presence of dealer banks, while we do not observe similar patterns in the unsecured market. We perturb the model with exogenous shocks and policy scenarios which correspond to unconventional monetary policies.