The paper shows that a coinsurance arrangement among countries can, in principle, play a useful role in helping countries bear the risks involved in developing their economies and integrating into the global financial system. The operation of the coinsurance arrangement is examined under different loan contracts offered by the IMF. The analysis suggests that, if the IMF's objective is to safeguard its resources and be concerned about the welfare of the borrower, an ex ante loan contract is more likely to create the right incentives-induce higher effort by member countries to avoid and overcome crises-than an ex-post loan contract. Such ex ante contracts highlight the need for precommitment to contend with the Samaritan’s dilemma and time inconsistency. The paper also shows that state-contingent repayment schemes are needed to deal with King Lear's dilemma.