The solution is not to get rid of greed. Because greed is not a problem, and it's not possible anyway.
Are you really sure that greed cannot be eliminated in principle (even counting technology advancements in the future)? Can you bet your own Bitcoins to protect this argument?

A welfare state that depends on taking money from those who work and giving it to those who do not requires a constant influx of young taxpayers, and we do not have it. Every western nation will collapse as a result of this. That's the problem we need to find a solution to, and there are only two ways. Either we need to have more kids, or we need to dismantle the welfare system. There are no other ways out at this point.
Population decrease is not a problem while growth of productivity (automation and robotics) offset it.