Optimal Contracting Model in a Social Environment and Trust-Related Psychological Costs