Social networks – diagrams which reflect the social structure of animal groups – are increasingly viewed as useful tools in behavioural ecology and evolutionary biology. Network structure may be especially relevant to the study of cooperation, because the action of mechanisms which affect the cost:benefit ratio of cooperating (e.g. reciprocity, punishment, image scoring) is likely to be mediated by the relative position of actor and recipient in the network. Social proximity could thus affect cooperation in a similar manner to biological relatedness. To test this hypothesis, we recruited members of a real-world social group and used a questionnaire to reveal their network. Participants were asked to endure physical discomfort in order to earn money for themselves and other group members, allowing us to explore relationships between willingness to suffer a cost on another's behalf and the relative social position of donor and recipient. Cost endured was positively correlated with the strength of the social tie between donor and recipient. Further, donors suffered greater costs when a relationship was reciprocated. Interestingly, participants regularly suffered greater discomfort for very close peers than for themselves. Our results provide new insight into the effect of social structure on the direct benefits of cooperation.