the solution, is boarding houses, that require a waiver of privacy rights when it comes to drug searches.
a person gets a room. they share kitchens and living areas and bathrooms. the government lends money to non-profit organizations to build and maintain these boarding houses. that takes out the profit motive and corruption. residents pay a third of their income for costs... if they dont have much income, or no income, they dont pay much. this means the only ones who are homeless... is drug addicts who refuse to submit, and dangerous criminals, and dangerous mentally ill people. maybe these people can be taken care of on a case by case basis, but these guys are their own category which i acknowledge my solutions dont solve.
instead of flat out paying people's rent like the government does now, and doing nothing about affordability, boarding houses bring back economical structures. we probably already spend enough money on housing, to instead lend out money that's going to be repaid to the government eventually anyway.
the highest ranked debater here pointed out that when you put a bunch of poor people together, it causes social ills and stuff like drug problems and destroys the whole cost savings paradigm. that killed my idea for a solution before... but now my solution to, is for residents to waive their rights to not be searched. drug searches can happen at will, and randomly, and arbitrarily.