Functional Inequalities and Analysis of Contagion in the Financial Networks