A quasi-contract is an obligation imposed by law that requires one party to compensate another party. It arises in situations where there is no valid contract but where justice demands compensation be provided. Key features of a quasi-contract include that it is not based on a formal agreement and can only be enforced against specific individuals involved in the situation, not the world at large. Common examples include a plumber mistakenly installing a sprinkler system and then being required to be paid, or goods being left at someone's house by mistake and the person keeping the goods for their own use. The goal of a quasi-contract is to prevent unjust enrichment at another's expense.