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. However, social contract theory is rightly associated with
modern moral and political theory and is given its first full exposition
and defense by Thomas Hobbes