Courts will also void agreements that are valid from the perspective of contract law, but are otherwise in violation of public policy (illegal contracts).
Criminal sanctions are a more effective way to handle illegal agreements.
Claims for restitution are usually precluded, but sometimes allowed if:
1.
The claimant is not in part delicto (equally blameworthy) with the defendant, or
2.
The claimant is in locus poenitentiae (withdrew before consummation of the illegal bargain).
A mere agent or depository of the proceeds of an illegal transaction is not permitted to assert the defense of illegality in an action to recover the proceeds by a party to the illegal transaction.