Absence of well-functioning formal institutions leads to reliance on social networks to enforce informal contracts. Social ties may aid cooperation, but agents vary in network centrality, and this hierarchy may hinder cooperation. To assess the extent to which networks substitute for enforcement, we conducted high-stakes games across 34 Indian villages. We randomized subjects' partners and whether contracts were enforced to estimate how partners' relative network position differentially matters across contracting environments. Socially close pairs cooperate even without enforcement, distant pairs do not. Pairs with unequal importance behave less cooperatively without enforcement. Thus capacity for cooperation depends on the underlying network.