The Carrot or the Stick: Rewards, Punishments, and Cooperation by James Andreoni, William Harbaugh and Lise Vesterlund. Published in volume 93, issue 3, pages 893-902 of American Economic Review, June 2003
Andreoni et al. (Thu,) studied this question.