The law of restitution is the law of gain-based recovery. It is wider than the law of unjust enrichment. Restitution for unjust enrichment is a subset of the law of restitution in the same way that compensation for breach of contract is a subset of the law relating to compensation.