Welfare analysis of currency regimes with defaultable debts