There should (in theory) be a simple solution to stopping immigrants living of the UK state. I have no idea if it would be contrary to EU laws, or even legal, but surely can't we simply say that to claim UK benefits, you have to hold, or at least qualify to hold, a UK passport?