Social
contract theory, nearly as old as philosophy itself, is the view that
persons' moral and/or political obligations are dependent upon a
contract or agreement among them to form the society in which they live.
Socrates uses something quite like a social contract argument to
explain to Crito why he must remain in prison and accept the death
penalty.
Hope this helps :)