SMS dit: Endogenous Market Structures and the Macroeconomy