Welfare analysis of bank capital requirements with endogenous default