Conditions for sustainable cooperation