We consider a model of debt management, where a sovereign state trade some bonds to service the debt with a pool of risk-neutral competitive foreign investors. At each time, the government decides which fraction of the gross domestic product (GDP) must be used to repay the debt, and how much to devaluate its currency. Both these operations have the effect to reduce the actual size of the debt, but have a social cost in terms of welfare sustainability. Moreover, at any time the sovereign state can declare bankruptcy by paying a correspondent bankruptcy cost. We show that this optimization problems admits an equilibrium solution, leading to bankruptcy or to a stationary state, depending on the initial conditions.