Collaboration through gain-and-pain-share mechanism