What Are the Microfoundations of the Demand for Foreign Exchanges?