There was no such problem in the former USSR because everyone had to work unless he cant due to illness or so. So there was no welfare for them who did not work.