A federal voting mechanism to solve the fiscal-externality problem