In this note we develop a simple heterogeneous-agent model with incomplete markets to explain the prevalence of a large, low-productivity, informal sector in developing countries. In our models, taxes levied on formal sector agents are used to finance the provision of a productive public infrastructure, which creates a productivity premium from formalization. Our model offers endogenous differentiation of rich and poor countries. Complete formalization is an equilibrium only in countries with the appropriate initial conditions. We discuss existence of this equilibrium and highlight the ambiguous effect of taxes.