Restatement Second of Contracts § 199
Restitution Where Party Withdraws or Situation Is Contrary to Public Interest
A party has a claim in restitution for performance that he has rendered under or in return for a promise that is unenforceable on grounds of public policy if he did not engage in serious misconduct and
- he withdraws from the transaction before the improper purpose has been achieved, or
- allowance of the claim would put an end to a continuing situation that is contrary to the public interest.
Copyright, The American Law Institute