Optimal Transparency and Risk-Taking to Avoid Currency Crises