Similarly, the Uniform Commercial Code says:A contract is a promise or a set of promises for the breach of which the law gives a remedy, or the performance of which the law in some way recognizes as a duty.
A short-hand definition is: “A contract is a legally enforceable promise.”Contract means the total legal obligation which results from the parties’ agreement as affected by this Act and any other applicable rules of law.
Generally speaking, in the United States parties may enter into contracts for whatever they wish and under any terms that they agree on. In other words, parties may assent to agreements even if those agreements represent bad bargains. However, there are certain external restrictions on our abilities to form contracts. Additionally, certain internal (to the contract) restrictions may exist on our abilities to exercise rights or to engage in other contracts.
Legal restrictions, external to the contract, limit our ability to bargain. For example, if you wanted to hire someone to work for your company, you could not contract with that person to work 100-hour workweeks at 25 cents per hour. Even if you could find someone to work under those conditions and even if you both agreed to those terms of the contract, our statutory and regulatory laws prohibit you from entering into a contract with those terms. Such wages would violate minimum wage laws.
There may also be restrictions that are internal to the contract. Imagine that you entered into an employment contract with a company to work for $55,000 per year, plus benefits, and for a term of two years. You might be pretty happy about that. But what if, one month later, another company offered you the same position at its company, but for a salary of $65,000 per year, plus benefits. The better offer does not invalidate your first contract. In fact, in such a case, your first contract would probably contain a noncompete clause that would prohibit you from working in a similar capacity for a specified length of time and geographic area. So even if you decided to breach your first contract to enter into the second, you would be prohibited from doing so under the noncompete clause.