Which risk scenarios can drive the emergence of costly cooperation?

Which risk scenarios can drive the emergence of costly cooperation?