Okay how about the city would be required to purchase an insurance policy to insure they can cover their liabilities.
The insurance company could then audit and evaluate the cities current operation and charge a premium based on that evaluation.
That can already be done - credit default swaps. Unfortunately, though, the exposure through CDS and derivative markets is hundreds of trillions of dollars and no firm on earth could cover the swaps that they back - ironic isn't it?