In this paper we study optimal policies in an environment where search frictions both in labor and goods markets give rise to unemployment and fiat money, as in Berentsen, Menzio, and Wright (American Economic Review, 2011). The underlying frictions that give rise to endogenous unemployment and fiat money also result in inefficient outcomes. Here we show that efficiency can be restored whenever lump sum monetary transfers are possible and a decentralized production subsidy financed by money printing and a vacancy subsidy financed by a dividend tax exist. This is the case even when the Hosios and Friedman rules do not hold.