Social Contract

In what way is the social contract an attempt to solve problems that Rousseau identifies in the Discourse on the Origin of Inequality? To what extent do you think this attempt is successful?