We model the different ways in which precedents and contract standardization shape the development of markets and the law. In a setup where more resourceful parties can distort contract enforcement to their advantage, we find that the introduction of a standard contract reduces enforcement distortions relative to precedents, exerting two effects: i) it statically expands the volume of trade, but ii) it crowds out the use of innovative contracts, hindering contractual innovation. We shed light on the large scale commercial codification occurred in the 19th century in many countries (even Common Law ones) during a period of booming commerce and long distance trade.