Credit Contagion in Financial Markets: A Network-Based Approach