Three Toed Sloth has a nice exposition on the difficulties of optimizing an economy, including the best explanation of convex optimization ever:
If plan A calls for 10,000 diapers and 2,000 towels, and plan B calls for 2,000 diapers and 10,000 towels, we could do half of plan A and half of plan B, make 6,000 diapers and 6,000 towels, and not run up against the constraints.
it says nothing about whether it is friendly or unfriendly. If it extracts rents from things humans don't actually want in reflective equilibrium and channels it into things they do want it is friendly, vice versa unfriendly.
it is also phenomenally unlikely that the most powerful optimization an AI will be able to do is piggyback our financial system.