Rewarding Good Behavior in Peer-to-Peer Networks