In this paper, I study a fiscal federation as a dynamic interregional contract which aims to provide risk sharing against household- and region-specific risk. I seek to identify the determinants of the optimal degree of regional fiscal autonomy which balances the trade-off between allowing regional governments to i) alleviate distortions due to uniform federal tax-transfer programs when regions are heterogeneous ii) reduce federal fiscal flows related to interregional risk-sharing and redistribution. My model is a two-region version of a heterogeneous agent model with incomplete markets and endogenous labor supply. The federation comprises integrated labor and capital markets. Households in different regions are exposed to distinct sequences of labor productivity shocks and are subject to tax-transfer schedules designed by a regional and a common federal government. Governments choose schedules providing different degrees of insurance and redistribution to maximize federal or regional welfare. In response, households adjust their labor supply intensity and their precautionary savings.