In this paper, we study the nonlinear diffusion equation associated with a particle system where the common drift depends on the rate of absorption of particles at a boundary. We provide an interpretation of this equation, which is also related to the supercooled Stefan problem, as a structural credit risk model with default contagion in a large interconnected banking system. Using the method of heat potentials, we derive a coupled system of Volterra integral equations for the transition density and for the loss through absorption. An approximation by expansion is given for a small interaction parameter. We also present a numerical solution algorithm and conduct computational tests.