This paper studies a multilateral matching market in which each participant can sign contracts with any other agents. This market subsumes the two-sided matching and the roommate problem as special cases. We consider a hypergraph (I, C), with possible multiple (hyper)edges and loops, in which the vertices i is an element of I are interpreted as agents, and the edges c is an element of C as contracts that can be concluded between agents. The preferences of each agent i are given by a choice function fi possessing the so-called path independent property. In this general setup we consider the notion of stable contract network. The paper contains two main results. The first one is that a general stable contract problem for (I, C, f ) can be reduced to a special one in which preferences of the agents are given by weak orders, or, equivalently, by utility functions. However, stable contract systems may not exist. Trying to overcome this trouble, we introduce a weaker notion of meta-stability for contract systems. Our second result is that meta-stable systems always exist. A proof of this result relies on an appealing theorem on the existence of the so-called compromise function. (c) 2023 Elsevier B.V. All rights reserved.