Primates may trade altruistic behaviours, such as grooming, either for itself or for different rank-related benefits, such as tolerance or agonistic support. Ecological conditions are expected to affect competition and thus the steepness of dominance hierarchies. This, in turn, may influence the value of the different currencies that primates exchange. Thus, it can be hypothesized that, as the dominance hierarchy becomes steeper, more grooming is directed up the hierarchy (in exchange for tolerance or agonistic support) and less grooming is exchanged for other grooming. We assembled a large database of within-group grooming distribution in primates (38 social groups belonging to 16 species and eight genera) and tested these hypotheses both within species (i.e. comparing different groups of the same species) and between species (using comparative methods that control for phylogenetic relatedness). We found within-species evidence that steeper dominance hierarchies were associated with more grooming being directed up the hierarchy, and that a trade-off occurred between the tendency to groom up the hierarchy and the degree of grooming reciprocation (although, in some analyses, only a nonsignificant trend was observed). By contrast, phylogenetically controlled comparisons between species did not reveal evidence of correlated evolution between the steepness of the dominance hierarchy, the tendency to direct grooming up the hierarchy, and the degree of grooming reciprocation. © 2008 The Linnean Society of London, Biological Journal of the Linnean Society, 2008, 95, 439–446.