
611 N.W.2d 270 (2000)
MINCKS AGRI CENTER, INC., Appellee,
v.
BELL FARMS, INC., Appellant.
No. 98-28.
Supreme Court of Iowa.
June 1, 2000.
*271 Bruce L. Walker and Michael J. Pugh, Phelan, Tucker, Mullen, Walker, Tucker & Gelman, L.L.P., Iowa City, for appellant.
William Scott Power of Aspelmeier, Fisch, Power, Warner & Engberg, P.L.C., Burlington, for appellee.
Considered en banc.
TERNUS, Justice.
The appellee, Mincks Agri Center, Inc. (Mincks), sued the appellant, Bell Farms, Inc., claiming Bell Farms had breached several contracts calling for the sale of grain to Mincks. The determinative issue is whether Mincks, who did not have a grain dealer license at the time it was required to accept delivery of the grain, may still enforce the contracts by recovering damages for Bell Farms' failure to make delivery. The district court ruled that the contracts were enforceable. The Iowa Court of Appeals reversed and this court granted further review. We agree with the court of appeals that Mincks may not enforce the contracts. Therefore, we affirm the court of appeals' decision, reverse the district court's judgment, and remand for entry of judgment in favor of Bell Farms.

I. Background Facts and Proceedings.

Mincks is a grain elevator owned by Tim Mincks (Tim). Between February and May of 1995 Mincks entered into seven grain contracts with Bell Farms. Pursuant to these contracts, Bell Farms sold corn and soybeans to Mincks with delivery to be made at a river terminal in Muscatine during the months of October, November and December 1995.
Prior to July 1995, Mincks engaged in speculation on the grain futures market, unrelated to Bell Farms' grain contracts. In July 1995 Tim wrote checks totaling $78,000 to cover margin calls on wheat futures. Mincks' bank refused to honor these checks and informed Tim that Mincks had exceeded its lending limit.
That very afternoon Tim visited with Oakville Feed & Grain, Inc. to determine if Oakville would take over the contracts held by Mincks with local producers and assume operation of the business. Oakville agreed not only to enter into contracts with Mincks' producers on the same terms as the original contracts, but also agreed to lease Mincks' premises and continue a grain business at that location.
Tim testified he took this action because he wanted to make sure that if the price of grain went down that fall, the farmers would get their contracted price. This testimony at first blush appears at odds with the fact that Mincks had hedged its contracts with producers, the purpose of which is to guarantee a price for the purchased grain so the grain dealer will be assured of funds with which to pay the producers for their grain. See Top of Iowa Coop. v. Sime Farms, Inc., 608 N.W.2d 454, 456-57 (Iowa 2000) (explaining *272 the concept of hedging). But Mincks testified in his deposition, which was read at trial, that "we weren't able to hedge our purchases on the board any longer and if the market had dropped, say corn went to $2.00[,] I knew that we were going to have a bunch of farmers angry because they weren't getting their money." Another Mincks employee confirmed this explanation, stating that Mincks "had corn purchased that there wasn't going to be enough money to cover, so Tim sold the contracts to Oakville, and Oakville assumed them." Thus, the transaction with Oakville included Oakville's purchase of the hedges held by Mincks.
Mincks then sent a letter to the producers with whom it had contracted asking them to come into the office and sign new contracts with Oakville. Although other producers complied with this request, Bell Farms refused to contract with Oakville. (Mincks was unable to unilaterally assign the Bell Farms contracts to Oakville because the contracts stated that they were not assignable.) Upon Bell Farms' refusal to contract with Oakville, Oakville canceled the hedges it held on the Bell Farms contracts.
After making arrangements with Oakville to take over its business, Mincks informed the Grain Warehouse Bureau of the Iowa Department of Agriculture and Land Stewardship that it had leased its facilities to Oakville, that all grain delivered to the Mincks facility since August 1, 1995 had been recorded on Oakville's account, and that all storage and payment obligations of Mincks had been transferred to Oakville. Mincks requested that the Bureau cancel its grain dealer and warehouse licenses. The Bureau thereupon canceled Mincks' licenses effective September 1, 1995.
At trial Tim claimed he surrendered Mincks' grain dealer license because there was no longer any need for it. While that may be true, as Mincks had transferred its contracts and facilities to Oakville, it is clear from Tim's own testimony that the reason Oakville was asked to take over Mincks' business was that Mincks could no longer meet its financial obligations for margin calls and ultimately for contract payments to producers. In fact, Tim admitted in answers to interrogatories that he surrendered the grain dealer license "because of [Mincks'] financial condition."
Bell Farms did not deliver the grain to the Muscatine river terminal in late 1995 as it was required to do under its contracts with Mincks. Consequently, in July 1996, Mincks brought this action seeking damages for Bell Farms' alleged breach of contract.
Bell Farms filed a motion for summary judgment alleging that Mincks' failure to have a grain dealer license at the time performance was due rendered the contracts void and illegal. The district court denied summary judgment on this basis. This issue was again raised in a motion in limine prior to trial and in motions for directed verdict during trial. Recognizing that the issue was a legal question for the court, see Bovard v. American Horse Enters., Inc., 201 Cal.App.3d 832, 247 Cal. Rptr. 340, 343 (1988), the court reaffirmed its rejection of Bell Farms' argument, relying on the Iowa Court of Appeals decision in S & S, Inc. v. Meyer, 478 N.W.2d 857 (Iowa App.1991). Mincks' contract claim was ultimately submitted to a jury, which returned a verdict in Mincks' favor. Bell Farms raised its illegality defense once again in a motion for judgment notwithstanding the verdict, which was denied by the trial court. This appeal followed.
The appeal was transferred initially to the Iowa Court of Appeals. That court reversed the trial court, holding that the contracts were not enforceable because Mincks did not have a grain dealer license. The court of appeals reasoned that enforcement of the contracts would, therefore, violate the public policy evident in Iowa's licensing statute. We granted Mincks' application for further review.


*273 II. Issue on Appeal and Scope of Review.

Although Bell Farms raises several alleged errors on appeal, we find it necessary to address only oneits claim that the contracts were illegal and unenforceable. This claim was raised for the final time in Bell Farms' motion for judgment notwithstanding the verdict. We review the trial court's denial of this motion for correction of errors of law. See Field v. Palmer, 592 N.W.2d 347, 350 (Iowa 1999).

III. Governing Legal Principles.

A. Law applied by the trial court. We start our discussion of the law with a review of the legal principles applied by the trial court in rejecting Bell Farms' argument that the contracts were unenforceable. As noted in our review of the procedural background of this case, the trial court relied on S & S, Inc. v. Meyer to support its conclusion that the contracts were enforceable. In S & S, the court of appeals held that the suspension of a grain dealer's license did not automatically void an executory sales contract that was valid at its inception where the contract may be valid at the time of performance if the license is reinstated or the contract is assigned to a licensed dealer. 478 N.W.2d at 861. The contract at issue in S & S had, in fact, been assigned by the grain dealer prior to performance. Id. The court held, therefore, that the grain dealer's loss of its license did not affect the enforceability of the contract. Id.
The trial court here held that "[b]ecause Bell failed to agree to assignment of the contracts, Bell should not now be allowed to void the contracts by arguing that they were invalid because Plaintiff temporarily turned in his grain dealer's license." This rationale is faulty for several reasons. In contrast to S & S, where the contracts were "freely assignable," id. at 860, the record here shows that Mincks had no right to unilaterally assign its contracts with Bell Farms and Bell Farms had no obligation to agree to such an assignment. Moreover, the contracts at issue in S & S had been validly assigned to a licensed dealer prior to performance being due, a fact clearly absent in the present case. Finally, there is no support in the record for the characterization of Mincks' unlicensed state as "temporary." The record reveals no subsequent reinstatement of Mincks' license nor an intention by Mincks that it would even seek reinstatement of its license. For these reasons, the trial court's ruling was based on erroneous principles of law. We turn now to a determination of the appropriate rules of law that govern the matter before us.
B. Case law. A review of our early cases shows that Bell Farms has support for its claim that a contracting party's failure to hold a license required by law for performance renders the contract void. See Keith Furnace Co. v. MacVicar, 225 Iowa 246, 280 N.W. 496 (1938). In Keith Furnace, the plaintiff brought a claim against the defendant to collect on a promissory note issued in payment for the installation of a furnace in the defendant's home. 225 Iowa at 247, 280 N.W. at 496. The defendant asserted as a defense that the plaintiff had not obtained a permit for the work as required under the city building code. Id. at 247, 280 N.W. at 496-97. In considering this claim, the court applied the following legal principles:
If a statute or city ordinance prohibits the practice of a profession or the carrying on of a business without first procuring a license and a fine is imposed for violating the law, recovery cannot be had for services rendered in such occupation.
It is a general rule that an agreement which violates a provision of a constitution or of a constitutional statute or which cannot be performed without violation of such a provision is illegal and void.

Id. at 250, 280 N.W. at 498 (emphasis added) (citations omitted); accord 51 Am. Jur.2d Licenses and Permits § 66, at 72 *274 (1970) ("It is generally agreed that the courts will not enforce a contract made without a license called for by legislation that expressly prohibits the carrying on of the particular activity without a license and sets up a penalty for operating without the license, where the legislation discloses no intent to limit its scope to exaction of the penalty and was enacted for protection of the public, rather than a mere revenue measure."). See generally 17A Am.Jur.2d Contracts § 306, at 309 (1991) (noting the basis for the rule is that no court should issue a judgment that "will consummate an act forbidden by law"). This court concluded that the contract at issue in Keith Furnace did not fall within the general rule because the statutory violation at issue did not involve a requirement that the plaintiff obtain a license to carry on its business. Keith Furnace, 225 Iowa at 250, 280 N.W. at 498. The court noted that "a distinction must be made between the doing of a thing which the law prohibits, and the doing of a thing which the law allows, but in a manner prohibited." Id. at 251, 280 N.W. at 499. The legal principle to be gleaned from Keith Furnace, therefore, is that if a contracting party is required to have a license to engage in his business and a violation of the licensing requirement is made a crime, a contract calling for performance in violation of this requirement is illegal and void.
In a more recent case having facts similar to those in Keith Furnace, we employed a multi-factor test to determine the enforceability of a contract that violated a statutory provision. In Beneficial Finance Co. v. Lamos, 179 N.W.2d 573 (Iowa 1970), this court considered the effect of a financing company's failure to provide the debtors with receipts for installment payments, as required by an Iowa statute. 179 N.W.2d at 578-79. The district court had entered judgment in favor of the financing company on a promissory note signed by the debtors. Id. at 575-76. On appeal, the defendants/debtors argued that the court erred in finding the obligation in question was enforceable in light of the financing company's noncompliance with the statutory requirement that the debtor be given a receipt for each payment made. Id. at 578-79. In deciding that the financing company's omission did not prevent enforcement of the contract, this court considered "[t]he degree of the illegal factor, extent of public harm that may be involved, and moral quality of the conduct of the parties." Id. at 580. These factors are similar to those listed in Restatement (Second) of Contracts section 178 (1981), which sets forth rules governing the unenforceability of contracts on public policy grounds.
We specifically looked to the Restatement for guidance in Smith Fertilizer & Grain Co. v. Wales, 450 N.W.2d 814 (Iowa 1990). In that case, we held that a seller of fertilizer could not recover payment from the purchaser where the seller had violated the statutory requirements with respect to weighing and issuance of scale tickets. Smith Fertilizer, 450 N.W.2d at 815 (citing Restatement section 178 for the rule that a contract in violation of a regulatory statute will not be enforced when the "statute itself denies enforceability"). Most recently, in Fausel v. JRJ Enterprises, Inc., 603 N.W.2d 612, 622 (Iowa 1999), we remanded a case to the district court to determine whether the plaintiff's claim was barred under Restatement section 181, which advocates a balancing test to determine whether the failure to have a required license renders a contract unenforceable. In the case before us, the Court of Appeals, in determining that enforcement of the contracts at issue would violate public policy, also applied the factors set forth in the Restatement.
The initial decision that this court must make, then, is whether to adhere to our bright-line rule that there can be no recovery under a contract requiring performance in violation of a licensing statute. The alternative is to apply the Restatement factors to determine on a case-by-case basis whether a party's failure to comply with a licensing requirement renders *275 the contract unenforceable on public policy grounds. We think a more flexible rule is preferable. Therefore, we turn now to a review of the principles set forth in the Restatement (Second) of Contracts.
C. Restatement principles. Restatement (Second) of Contracts section 178 states the general principle governing the unenforceability of contracts on public policy grounds:
A promise or other term of an agreement is unenforceable on grounds of public policy if legislation provides that it is unenforceable or the interest in its enforcement is clearly outweighed in the circumstances by a public policy against the enforcement of such terms.

Restatement (Second) of Contracts § 178(1), at 6 (1981) (emphasis added) [hereinafter "Restatement"]; see also Rogers v. Webb, 558 N.W.2d 155, 156 (Iowa 1997) ("Contracts that contravene public policy will not be enforced."); Wunschel Law Firm, P.C. v. Clabaugh, 291 N.W.2d 331, 335 (Iowa 1980) (same); Beneficial Finance, 179 N.W.2d at 580 (noting that where the illegality "is of such nature that the public interest and welfare of those persons for whose protection the particular element has been declared to be illegal will be best subserved by denying plaintiff a remedy it would be [the court's] province to do so"). A more specific application of the public policy aspect of this principle is found in section 181, which provides:
If a party is prohibited from doing an act because of his failure to comply with a licensing, registration or similar requirement, a promise in consideration of his doing that act or of his promise to do it is unenforceable on grounds of public policy if
(a) the requirement has a regulatory purpose, and
(b) the interest in the enforcement of the promise is clearly outweighed by the public policy behind the requirement.
Restatement § 181, at 21.
Restatement section 178 provides helpful guidance in determining whether the interest in enforcing the contract is outweighed by the public policy at stake:
(2) In weighing the interest in the enforcement of a term, account is taken of
(a) the parties' justified expectations,
(b) any forfeiture that would result if enforcement were denied, and
(c) any special public interest in the enforcement of the particular term.
(3) In weighing a public policy against enforcement of a term, account is taken of
(a) the strength of that policy as manifested by legislation or judicial decisions,
(b) the likelihood that a refusal to enforce the term will further that policy,
(c) the seriousness of any misconduct involved and the extent to which it was deliberate, and
(d) the directness of the connection between that misconduct and the term.
Restatement § 178(2)-(3), at 6-7. Before we apply the principles and factors set forth in the Restatement, we will review the relevant statutory provisions that are the source of the public policy at issue in this case.

IV. Iowa's Grain Dealer Licensing Statute.

Iowa Code chapter 203 (1995) governs the licensing of grain dealers. Section 203.3, entitled "License requiredfinancial responsibility," states in pertinent part:
1. A person shall not engage in the business of a grain dealer in this state without having obtained a license issued by the department.

2. The type of license required shall be determined as follows:

a. A class 1 license is required if the grain dealer purchases any grain by credit-sale contract, or if the value of grain purchased by the grain dealer from producers during the grain dealer's *276 previous fiscal year exceeds five hundred thousand dollars....[1]
....
3. . . . The application [for a license] shall be accompanied by a complete financial statement of the applicant setting forth the assets, liabilities and the net worth of the applicant....
4. In order to receive and retain a class 1 license the following conditions must be satisfied:

a. The grain dealer shall have and maintain a net worth of at least seventy-five thousand dollars, or maintain a deficiency bond or an irrevocable letter of credit in the amount of two thousand dollars for each one thousand dollars ... of net worth deficiency. . . .

b. ... [A]t any time the department [of agriculture and land stewardship] may require a financial statement that is accompanied by the report of a certified public accountant ... if the department has good cause.

Iowa Code § 203.3 (emphasis added). The statute provides the following definition of "good cause":
6. "Good cause" means that the department has cause to believe that the net worth or current asset to current liability ratio of a grain dealer presents a danger to sellers with whom the grain dealer does business, based on evidence of any of the following:

a. The making of a payment by use of a financial instrument which is a check ... on a financial institution, and a financial institution refuses payment on the instrument because of insufficient funds in a grain dealer's account.
Id. § 203.1(6).
These provisions show that the purpose of the licensing requirement is to ensure that producers selling their crops have some protection from an insolvent grain dealer, a conclusion supported by legislative history. When the 1973 Iowa legislature first enacted the grain dealer licensing statute, which included a bond-posting requirement, the explanation accompanying the bill stated:
The bill requires a bond for the protection of the grain seller and the grain buyer in grain transactions. There have been losses suffered by producers from both truckers and grain warehousemen of [sic] grain transactions. The present Iowa bonded warehouse law only provides bond coverage for stored grain. This bill will give the additional protection needed to producers throughout the state when selling their grain as well as purchasers of grain from truckers.
See Explanation to H.F. 383, 1973 Iowa Acts ch. 276 (emphasis added) (codified at Iowa Code ch. 542 (1975) and subsequently transferred to Iowa Code ch. 203 (1993)).
It is also clear that the legislature considers violations of the licensing requirement a serious matter. Chapter 203 provides for criminal penalties for specific violations of the licensing requirement. Section 203.11 states in pertinent part:
2. A person who engages in business as a grain dealer without obtaining a license ... commits a serious misdemeanor, except that a person who commits any of these offenses after having been found guilty of the same offense commits an aggravated misdemeanor.[2]
3. ... With respect to a continuing violation, each day that the violation continues is a separate offense.
The county attorney in whose county the business is located is charged with prosecuting violations of the statute. See Iowa Code § 203.11(4). If the county attorney fails to take action within thirty days, however, *277 the department can request the attorney general's office to prosecute. Id. An injunction may also be issued. Id.
With this overview of the licensing statute, we now examine, in the context of this case, the governing legal principles with respect to the effect of a contracting party's failure to comply with licensing requirements.
V. Application of the Law to the Facts of This Case.
A comparison of the facts of this case to section 181 shows that the principles set forth in this section of the Restatement apply here. Section 181 pertains to situations where "a party is prohibited from doing an act because of his failure to comply with a licensing... requirement" and a promise has been made in consideration of the party doing that act. Restatement § 181, at 21. There is no dispute here that section 203.3(1) prohibits Mincks from dealing in grain without a license. Nor is there any dispute that Bell Farms' promise to deliver grain to Mincks is in consideration of Mincks' promise to buy the grain, an act Mincks cannot legally do if unlicensed. Thus, under the Restatement, Bell Farms' promise is unenforceable if the licensing requirement has a regulatory purpose and the interest in enforcing Bell Farms' promise is clearly outweighed by the public policy underlying the licensing requirement. See id.
With respect to the first element of this test, we readily conclude that the grain dealer licensing requirement is regulatory, as opposed to merely revenue raising, in nature. The department of agriculture and land stewardship is granted "general supervision over the business operations of grain dealers." Iowa Code § 203.2. The purpose behind the licensing scheme is to protect grain producers from selling grain to a grain dealer whose financial status presents a financial risk to the producer. See generally id. § 203.1(6) (defining "good cause" for suspension of license); Explanation accompanying H.F. 383, 1973 Iowa Acts ch. 276 (noting act is intended to give protection to producers selling their grain to grain dealers).
The determinative question, therefore, is whether the interest in enforcing Bell Farms' promise to deliver grain outweighs the public policy behind the requirement that a person not engage in the business of grain dealing without a license. We fully concur with the court of appeals that, under the circumstances of this case, enforcement of these contracts unequivocally contradicts, rather than advances, the public policy expressed in chapter 203.
The first category of factors that are relevant to balancing the competing interests centers on factors that would support enforcement of the contracts: (1) the parties' justified expectations; (2) whether a party would suffer a forfeiture if the contract were not enforced; and (3) any special public interest in enforcement. See Restatement § 178(2), at 6. We examine first Mincks' justified expectations.
It was undisputed that Tim told Darrel Bell in July 1995 that Oakville would be taking over Mincks' contracts. Not only did Oakville assume Mincks' contractual obligations to those producers who agreed to the transfer, but Oakville also purchased all of Mincks' hedges, including those covering Bell Farms' contracts. The record shows that Oakville paid Mincks for its equity in these hedges. Oakville, not Mincks, contacted Bell Farms in July 1995, inquiring whether Bell Farms would make delivery, and Oakville, not Mincks, decided to cancel its hedged positions on the Bell Farms contracts when Darrel Bell indicated that Bell Farms would not deliver to Oakville, a position Bell Farms had every right to take. If Mincks had continued to expect delivery from Bell Farms, whether justifiably or not, then it seems Mincks would have at least retained the hedges applicable to the Bell Farms contracts. That Mincks had no expectation of performance by Bell Farms is also supported by *278 the fact that Mincks made no effort to commence legal action against Bell Farms until the summer of 1996 when the bank made reorganization of Mincks' considerable debt contingent on Mincks pursuing enforcement of the Bell Farms contracts.
Not only does the record show that Mincks did not expect performance, the record also establishes that if any expectation of performance existed, it was unjustified. Tim Mincks acknowledged more than once in his testimony that Mincks needed a grain dealer license to buy and sell grain. As of September 1995 Mincks had no grain dealer license and could not legally purchase grain, a fact well known to Tim. Yet Mincks made no effort to obtain a license before delivery was due under the Bell Farms contracts and it did not have a license during the delivery period. We question how Mincks could have expected Bell Farms to deliver grain to an entity not legally able to accept it. Any claimed belief by Mincks to the contrary is simply not justified.
Turning now to the second factor, we examine whether any forfeiture would result to Mincks if enforcement were denied. There is nothing in the record to suggest that Mincks did anything in the way of preparation or performance, nor is there any evidence that Mincks incurred any costs in relation to these contracts.[3] Mincks attempts to minimize this fact by pointing out that there was nothing for it to do between the time that the contracts were signed and delivery occurred. While that may be true, it does not change the fact that Mincks will not suffer any forfeiture if these contracts are not enforced. Under the Restatement analysis, this fact is particularly compelling: "If the party who has failed to comply with the [licensing] requirement has done nothing by way of preparation or performance, the interest in enforcement of the promise is easily outweighed." Restatement § 181, cmt. c, at 22 (emphasis added).
Finally, there is no special public interest in the enforcement of these contracts. See Bovard, 247 Cal.Rptr. at 345 (stating that "the general interest in preventing a party to a contract from avoiding a debt," is not a special public interest).[4] In fact, *279 as discussed in more detail below, the public interest weighs against enforcement of these contracts for two reasons. First, Mincks' reciprocal performance is illegal and criminal. Second, the record unequivocally establishes that Mincks was financially unable to maintain its hedged positions, which would have protected Mincks from price fluctuations and thereby would have ensured Bell Farms that funds would be available to pay the contract price.[5]
We now examine the four factors weighing against enforcement: (1) the strength of the public policy manifested by the licensing legislation; (2) whether refusal to enforce the contract will further that policy; (3) the seriousness of the failure to comply with the licensing statute and the extent to which such failure was deliberate; and (4) the directness of the connection between the lack of license and the contract to be performed. See Restatement § 178(3), at 7. We will discuss each factor separately.
With respect to the first factor, the strength of the policy underlying the grain dealer licensing requirement is quite strong. The purpose of the licensing requirement is to protect producers from financially irresponsible grain dealers. By allowing only financially sound persons to deal in grain, the legislature has attempted to ensure that producers will receive payment for their grain, which under many circumstances can represent a producer's entire annual income. Darrel Bell's son, who participated in the farming operation, testified that the livelihood of five families and their landlords depended upon payment for their crops.
That brings us to the second factorwhether refusal to enforce the contracts will further this public policy. The inescapable answer to this question is "yes." Iowa's licensing legislation implicitly recognizes that only the government is realistically in a position to assess the financial strength of grain dealers. As a practical matter a producer simply does not have the resources or knowledge to make such an assessment on his own. Therefore, producers should be able to justifiably rely on the existence or nonexistence of a license to indicate the financial responsibility of a particular grain dealer. If we were to hold that a producer must deliver grain to an unlicensed dealer, we would in essence require the producer to make his own evaluation of the financial condition of the dealer, since he can no longer rely on the existence or absence of *280 a license to reflect this condition. This result is directly contrary to the goals the legislature sought to achieve in adopting the licensing statute in the first place. Consequently, the public policy underlying the licensing requirement can be furthered only by holding that contracts requiring the delivery of grain to an unlicensed dealer are unenforceable. See Springlake Corp. v. Symmarron Ltd. Partnership, 81 Md.App. 694, 569 A.2d 715, 722 (1990) (holding that taking the economic benefit out of contracts that violate a statute by holding them unenforceable "very definitely would promote the public policy established by the statute").
The third factor concerns the seriousness of the failure to have a license and the culpability of the party with respect to this failure. We think that the absence of a grain dealer license is a serious matter; any sales or purchases of grain by the unlicensed dealer are illegal and subject the dealer to fines and imprisonment. Mincks tries to minimize the seriousness of this situation by citing to testimony from a department representative that Mincks could have retained its license until December 31, 1995, had it so desired. The same witness giving this testimony also testified, however, that when the department discovers that someone is dealing in grain without a license, such as accepting delivery of grain, it considers that person in violation of the law and will seek criminal charges or an injunction to stop further violations. Moreover, the fact that the department may not take action until the producer has already delivered the grain only strengthens the need to impose earlier consequences on the unlicensed dealer (such as relieving the producer from his obligation to perform) in order to further the legislative objectives of (1) discouraging unlicensed and unregulated businesses from buying grain, and (2) protecting producers from the financial risks of selling grain to such unlicensed and unregulated businesses.
It is also highly significant that Mincks did not lose its license through innocent or even negligent conduct. The surrender of its license was caused directly by Tim Mincks' speculation in the wheat futures market in violation of his loan agreement with the bank, and by his inability to meet margin calls. A Mincks employee testified that Mincks took actions to hide its speculative dealings from the bank, including adjusting the business's balance sheet and entering into a contract for 800,000 bushels of corn with Tim's brother-in-law, knowing not only that delivery would not be made, but that it was not even expected. Bell Farms, on the other hand, had absolutely nothing to do with the decline in Mincks' financial stability that led to the surrender of its grain dealer license. Consequently, Mincks is very culpable when we examine how it came to be without a license.
Finally, with respect to the fourth factor, there is an undeniably direct connection between Mincks' lack of license and his contracts with Bell Farms. Mincks' performance of these contractsthe purchase of grainis illegal in the absence of a valid grain dealer license. Mincks' failure to have a license is not a collateral matter; it goes to Mincks' very ability to legally perform the consideration it gave for Bells Farms' contractual promise.
A balancing of the various relevant factors leads to but one conclusion: Mincks cannot enforce its contracts with Bell Farms. On one hand, we find no justifiable expectation of performance, no forfeiture if enforcement is denied, and no special public interest in enforcement of the contracts. On the other hand, we conclude that the policy underlying the licensing requirement is strong; only a refusal to enforce the contracts will further that policy; Mincks' lack of license is serious and is due to its own deliberate acts; and there is a direct connection between Mincks' misconduct, its surrender of its license, and its inability to legally perform the contracts. Under these circumstances, any interest in enforcing these contracts is clearly outweighed *281 by the public policy behind the licensing legislation. See Thomas v. Goudreault, 163 Ariz. 159, 786 P.2d 1010, 1020-21 (Ct.App.1989) (holding that the interest in advancing the goals underlying a state licensing requirement outweighed the interest in allowing recovery for unearned profits by the unlicensed plaintiff). Therefore, the promises made by Bell Farms in these contracts are unenforceable on the basis of public policy.

VI. Summary and Disposition.

Under the Restatement's balancing test, the public policy underlying the grain dealer licensing requirement outweighs any interest supporting enforcement of the contracts, thereby making Bell Farms' contractual promises unenforceable. The trial court erred in ruling to the contrary. Therefore, we affirm the court of appeals' decision holding the contracts unenforceable, reverse the district court's contrary judgment, and remand the case for entry of judgment in favor of Bell Farms.
COURT OF APPEALS DECISION AFFIRMED; DISTRICT COURT JUDGMENT REVERSED AND CASE REMANDED.
All justices concur except NEUMAN, J., who dissents, and is joined by LARSON and CARTER, JJ.
NEUMAN, Justice (dissenting).
The majority has fashioned a convenient bright-line test, marshalling the facts in favor of the producer and against the grain dealer to support reversal on public policy grounds. In my view, this black-and-white approach to enforceability disregards the inherently mutual obligations of such contracts, ignores economically sound remedies available to redress legitimate concerns over future performance, and scuttles the jury's contrary fact-finding on the real issueanticipatory breach. I therefore respectfully dissent.
The district court wisely recognized that this controversy is less about enforcing the contract between Mincks and Bell Farms than it is about sorting out their mutual obligations once Mincks' ability to perform was called into question. Iowa Code section 203.12 makes plain that neither the revocation nor cancellation of a grain dealer's license relieves the dealer from liability to a producer for the purchase price of grain. In other words, a licensing violation may give rise to remedies for non-performance, but does not otherwise render the contract unenforceable. The statute effectively prevents a dealer from unilaterally walking away from future commitments. Fairness dictates that a producer likewise not be permitted to unilaterally escape corresponding obligations, especially in a rising market.
Contracts for the sale of grain are governed by article 2 of the Iowa Uniform Commercial Code (UCC), Iowa Code chapter 554. S & S, Inc., 478 N.W.2d at 860; Nora Springs, 247 N.W.2d at 747. Pertinent here are sections 554.2609 and 554.2610. Read together, these sections address the precise concerns at issue here: the action required once insecurity develops in connection with future performance under a contract, and the remedies available upon repudiation by one of the parties.
Section 554.2609 states:
1. A contract for sale imposes an obligation on each party that the other's expectation of receiving due performance will not be impaired. When reasonable grounds for insecurity arise with respect to the performance of either party the other may in writing demand adequate assurance of due performance and until that party receives such assurance may if commercially reasonable suspend any performance for which that party has not already received the agreed return.
2. Between merchants the reasonableness of grounds for insecurity and the adequacy of any assurance offered *282 shall be determined according to commercial standards.
....
4. After receipt of a justified demand failure to provide within a reasonable time not exceeding thirty days such assurance of due performance as is adequate under the circumstances of the particular case is a repudiation of the contract.
Although section 554.2609 suggests that a demand for security be in writing, sufficiently egregious conduct by the offending party may justify dispensing with the need to make a written demand for assurances. S & S, Inc., 478 N.W.2d at 862-63. Whether the demanding party has reasonable grounds for insecurity is a question for the trier of fact. Id. at 863. So also are the inevitable questions concerning the notification sufficiency of any demand for adequate assurances and whether the assurances given, if any, are adequate. Id.
Section 554.2610 states:
When either party repudiates the contract with respect to a performance not yet due the loss of which will substantially impair the value of the contract to the other, the aggrieved party may

a. for a commercially reasonable time await performance by the repudiating party; or

b. resort to any remedy for breach (section 554.2703 or 554.2711), even though the aggrieved party has notified the repudiating party that the aggrieved party would await the latter's performance and has urged retraction; and

c. in either case suspend the aggrieved party's own performance or proceed in accordance with the provisions of this Article on the seller's right to identify goods to the contract notwithstanding breach or to salvage unfinished goods (section 554.2704).
The official commentary to this section neatly ties section 554.2610 to the preceding section on adequacy of assurance:
With the problem of insecurity taken care of by [section 554.2609] ... anticipatory repudiation centers upon an overt communication of intention or an action which renders performance impossible or demonstrates a clear determination not to continue with performance.... Repudiation can result from action which reasonably indicates a rejection of the continuing obligation. And, a repudiation automatically results under [section 554.2609] on insecurity when a party fails to provide adequate assurance of due future performance within thirty days after a justifiable demand therefore has been made.
Iowa Code § 554.2610, cmts. 1, 2 (emphasis added). This statutory scheme mirrors the Iowa common law on anticipatory repudiation:
Anticipatory breach requires a definite and unequivocal repudiation of the contract. It is committed before the time for performance and is the outcome of words or acts evincing an intention to refuse performance in the future. It is not established by a negative attitude or one which indicates more negotiations are sought or that the party may finally perform.
Williams v. Clark, 417 N.W.2d 247, 250 (Iowa App.1987) (quoting Lane v. Crescent Beach Lodge & Resort, Inc., 199 N.W.2d 78, 82 (Iowa 1972)).
Bell Farms concedes on appeal that it never demanded assurance of performance from Mincks before selling its grain elsewhere. It asserts instead that no such demand was required because (1) Darrel Bell's conversation with Tim Mincks in mid-July led Bell Farms to believe Mincks was going out of business, and (2) surrender of Mincks' grain dealer's license on September 1 confirmed that suspicion. The weakness in Bell's argument is that it ignores disputed issues of fact surrounding both circumstances. Bell's conversation with Mincks in mid-July may well have justified a request for assurance of performance. And Bell may have believed that *283 his refusal to consider Oakville as an alternative signaled an understanding that he planned to take his grain elsewhere. But a jury could also infer from the record that, given the rise in market prices, Bell Farms jumped at the chance to negotiate a more favorable contract with another dealer. Seeking assurances from Mincks might have posed an obstacle to that strategy. The fact that Bell Farms renegotiated at a higher price before learning of Mincks' license surrender further weakens its claim. A jury could have found that at no time was Mincks bankrupt, under investigation by the department of agriculture, or otherwise financially unable to fulfill the contracts.
It was within the unique province of the jury to pass on the credibility of these key witnesses. We are obliged on appeal to construe the evidence in the light most favorable to the verdict. Carson v. Mulnix, 263 N.W.2d 701, 705 (Iowa 1978).
Given this record, I find no error in the trial court's refusal to grant judgment as a matter of law for Bell Farms.
LARSON and CARTER, JJ., join this dissent.
NOTES
[1]  Mincks held a class 1 license.
[2]  A serious misdemeanor is punishable by imprisonment not to exceed one year, and a fine of at least $250, but not in excess of $1500. See Iowa Code § 903.1(1)(b). An aggravated misdemeanor is punishable by imprisonment not to exceed two years, and a fine of at least $500, but not in excess of $5000. See id. § 903.1(2).
[3]  Although Mincks at one time advanced margin money on the hedges it held for the Bell Farms contracts, this cost was recovered long before delivery was due under the contracts when Mincks was paid its equity in these hedges by Oakville. Consequently, Mincks did not forfeit any margin money as a result of Bell Farms' nonperformance in the fall of 1995.
[4]  Mincks complains that Bell Farms will receive a windfall if the contracts are not enforced because Bell Farms was able to sell its grain on the cash market at a price that was higher than the contract price. In rejecting a similar argument, the Connecticut Supreme Court made the following pertinent observation:

To the extent that our conclusion might be viewed as allowing the defendants to receive a windfall at the expense of the plaintiffs, we note that this result is common, and, as we previously determined, necessary in many cases in which contracts are deemed unenforceable on the grounds of furthering overriding public policies.
Solomon v. Gilmore, 248 Conn. 769, 731 A.2d 280, 293 (1999) (holding that a secondary mortgage issued by an unlicensed lender is unenforceable); see also Hastings Assocs., Inc. v. Local 369 Bldg. Fund, Inc., 42 Mass. App.Ct. 162, 675 N.E.2d 403, 415-16 (1997) (holding unenforceable a contract that called for the performance of an illegal act despite the heavy forfeiture worked upon the plaintiff to the benefit of the defendant).
We also reject any argument that Bell Farms should not be able to escape liability under the contracts when it could have enforced the contracts against Mincks, had it wished to do so. Even if Bell Farms could have enforced the contracts under general principles of contract law, an issue we do not address, this fact does not automatically make the contracts enforceable against Bell Farms. Such a conclusion would be contrary to the Restatement, which comments that a contract "may be enforceable by one and not the other party or it may be unenforceable by either." Restatement § 8, cmt. a, at 22 (emphasis added). Under the Restatement view, the enforceability of a contract depends on a balancing of competing interests. See id. § 178, at 6-7. A mutual ability to enforce the contract is not one of the factors considered under section 178. Thus, whether the parties are mutually obligated under the contracts is not pertinent.
[5]  Mincks attempts to minimize its financial problems, commenting in its briefs that "Mincks resumed its normal banking relationship with its lender the following week" after the bank refused to honor Mincks' checks and that "Mincks stayed in business and was never closed." This characterization of the situation is simply not supportable. Mincks' lending relationship did not return to normal within the week. As late as June of 1996, Mincks owed the bank $598,000 and was in default. It was negotiating with the bank to reorganize its debt, these negotiations being the impetus for the present lawsuit, as noted earlier. Nor did business continue as usual. Mincks was no longer in the grain business. It surrendered its grain dealer license, transferred its contracts and margin accounts to Oakville, and leased its premises to Oakville. Business may have continued as usual at the Mincks facility, but that business was Oakville's business, not Mincks'.

Mincks also argues that the contracts called for delivery at a river terminal, not Mincks' place of business. Mincks asserts that it would have received payment from the river terminal and those monies could have been used to pay Bell Farms. This argument ignores the possibility that the cash price could easily have been lower than the contract price, in which case the payment received by Mincks from the terminal would not have been sufficient to cover the higher contract price payable to Bell Farms. Thus, the fact that Mincks believed, in hindsight, that Bell Farms was assured of being paid, despite Mincks' lack of a grain dealer license, does not avoid the potential for a much different scenariothat Bell Farms would have made delivery to the river terminal and not received payment. See Wunschel Law Firm, 291 N.W.2d at 335 ("A contract which contravenes public policy will not be enforced by the courts.... It is not necessary that the contract actually cause the feared evil in a given case; its tendency to have that result is sufficient.").
