UBI wouldn't be needed if we got rid of loans. Loans block the increase in prosperity, as they become hard to pay if the economy improves, and misallocate resources on the bank's whim. The great depression likely wouldn't happen at all (or to a much limited extent, as some people would have to find new jobs) and instead the prices would drop until most people could live off their savings.