Stav dette: Endogenous Market Structures and the Macroeconomy