This paper presents a class of examples where a barter economy develops through agents' optimizing decisions into a monetary economy. A barter economy with m commodities is characterized by m(m-1)/2 commodity pair trading posts for active trade of each good for every other. Monetary equilibrium is characterized by active trade concentrated on m-1 posts, those trading in 'money' versus the m-1 other nonmonetary commodities. Specialization, the concentration of the trading function in a few trading posts in the monetary trade arrangement, reflects the workings of scale economies in transaction costs. As households discover that some pairwise markets (those with high trading volumes) have lower transaction costs, they restructure their trades to take advantage of the low cost. When a trading post's transaction cost is sufficiently low, households find it advantageous to use the low transaction cost goods as intermediary goods in their transactions, rather than trade directly (at high transaction cost trading posts) for the goods they want. The process converges to an equilibrium where only the high volume trade through a single intermediary good ('money') takes place. Monetization of trade results from dynamic adjustment to scale economies in the transaction technology.