We consider general networks of bilateral contracts that include supply chains. We define a new stability concept, called trail stability, and show that any network of bilateral contracts has a trailstable outcome whenever agents' choice functions satisfy full substitutability. Trail stability is a natural extension of chain stability, but is a stronger solution concept in general contract networks. Trail-stable outcomes are not immune to deviations of arbitrary sets of firms. In fact, we show that outcomes satisfying an even more demanding stability property -full trail stability -always exist. For fully trailstable outcomes, we prove results on the lattice structure, the rural hospitals theorem, strategy-proofness and comparative statics of firm entry and exit. We pin down a condition under which trail-stable and fully trail-stable outcomes coincide. We then completely describe the relationships between various other concepts. When contracts specify trades and prices, we also show that competitive equilibrium exists in networked markets even in the absence of fully transferrable utility. The competitive equilibrium outcome is (fully) trail-stable.Keywords: trail stability, chain stability, set stability, matching markets, supply chains, networks, contracts, competitive equilibrium.JEL Classification: C78, L14 * We would like to thank Samson Alva, Scott Kominers and Michael Ostrovsky for their valuable comments on the recent versions of the paper. Vincent Crawford, Umut Dur, Jens Gudmundsson, Claudia Herrestahl, Paul Klemperer, Collin Raymond, and Zaifu Yang also gave great comments on much earlier drafts. We had enlightening conversations with Alex Nichifor, Alex Westkamp and M. Bumin Yenmez about the project. Moreover, we are also grateful to seminar participants at the Southern