  One of the most defining features of the global financial network is its
inherent complex and intertwined structure. From the perspective of systemic
risk it is important to understand the influence of this network structure on
default contagion. Using sparse random graphs to model the financial network,
asymptotic methods turned out powerful to analytically describe the contagion
process and to make statements about resilience. So far, however, they have
been limited to so-called {\em rank one} models in which informally the only
network parameter is the degree sequence (see (Amini et. al. 2016) and
(Detering et. al. 2019) for example) and the contagion process can be described
by a one dimensional fix-point equation. These networks fail to account for a
pronounced block structure such as core/periphery or a network composed of
different connected blocks for different countries. We present a much more
general model here, where we distinguish vertices (institutions) of different
types and let edge probabilities and exposures depend on the types of both, the
receiving and the sending vertex plus additional parameters. Our main result
allows to compute explicitly the systemic damage caused by some initial local
shock event, and we derive a complete characterisation of resilient
respectively non-resilient financial systems. This is the first instance that
default contagion is rigorously studied in a model outside the class of rank
one models and several technical challenges arise. Moreover, in contrast to
previous work, in which networks could be classified as resilient or non
resilient, independent of the distribution of the shock, information about the
shock becomes important in our model and a more refined resilience condition
arises. Among other applications of our theory we derive resilience conditions
for the global network based on subnetwork conditions only.
