We propose an algorithm to model contagion in the interbank market via what we term the credit quality channel. In existing models on contagion via interbank credit, external shocks to banks often spread to other banks only in case of a default. In contrast, shocks are transmitted via asset...