
352 N.W.2d 794 (1984)
Richard J. ANDERSON, Appellant,
v.
Thomas J. DeLISLE, et al., Respondents.
No. CO-83-2040.
Court of Appeals of Minnesota.
August 7, 1984.
*795 Larry K. Houk, Houk, Raia & Associates, St. Paul, for appellant.
Peter McCall, Stapleton, Nolan & McCall, St. Paul, for respondents.
Considered and decided by FOLEY, P.J. and SEDGWICK and RANDALL, JJ., with oral argument waived.

OPINION
FOLEY, Judge.
Vendee sought to recover under a theory of unjust enrichment for improvements made to the vendor's property before cancellation of the parties' contract for deed. The trial judge granted judgment notwithstanding the verdict for the vendors, finding that he committed an error of law by submitting the issue of unjust enrichment to the jury in the absence of any evidence of mistake or fraud by the vendor. The vendee appeals. We reverse and reinstate the jury award as modified.

FACTS
The parties stipulated to the trial court's findings of fact for purposes of this appeal. The trial court found that in July 1979, Anderson signed an earnest money contract to purchase real estate from DeLisles for $275,000. Even before the contract was signed he began making improvements on the property. With the knowledge of the DeLisles, he spent $25,000 on materials and labor. All of the improvements were completed by December 1979 when the parties entered into a contract for deed. Anderson's work enhanced the value of the property by $47,000. The value of the improvements greatly exceeded any damages DeLisles may have suffered from Anderson's ultimate default.
DeLisles knew when the contract for deed was signed that Anderson had financial problems and was unlikely to be able to perform under the contract. The contract specified that all existing improvements were the property of the DeLisles. It gave DeLisles the usual option to cancel the contract if Anderson defaulted upon any payments. It also provided that in the event of cancellation "all improvements made upon the premises, and all payments made hereunder, shall belong to [vendors] as liquidated damages for the breach of this contract by [vendees]."
After Anderson's down payment check was dishonored, DeLisles cancelled the contract in accordance with Minn.Stat. § 559.21 (1982). Anderson never took possession of the property.
The trial court denied DeLisles' motion for a directed verdict. The jury found that DeLisles were unjustly enriched and awarded Anderson $47,000. The trial court granted judgment notwithstanding the verdict. Anderson appeals.

ISSUES
In the absence of mistake or fraud by the vendor, does Minnesota recognize a cause *796 of action for unjust enrichment brought by a defaulting vendee after statutory cancellation of a contract for deed?
In an action for unjust enrichment for improvements to the vendors' property, can a defaulting vendee recover more than he invested to make the improvements?

ANALYSIS
The trial judge granted judgment notwithstanding the verdict because, in his view, he erred in submitting the case to the jury. He concluded that in the absence of mistake or fraud by the vendor, Minnesota does not recognize a cause of action for unjust enrichment brought by a defaulting vendee after statutory cancellation of a contract for deed. Since there was no evidence of mistake or fraud by the DeLisles, he found that, as a matter of law, Anderson has no cause of action for unjust enrichment.
We find that the question was properly submitted to the jury and that there is evidence in the record to support the jury's finding of unjust enrichment.
Statutory cancellation does not preclude a suit for unjust enrichment on executory real estate contracts in Minnesota. Zirinsky v. Sheehan, 413 F.2d 481, 488, cert. den., 396 U.S. 1059, 90 S.Ct. 754, 24 L.Ed.2d 753 (1969). Fraud and mistake are not the only grounds for recovery under the theory of unjust enrichment. An action for unjust enrichment may be based on failure of consideration, fraud, mistake, and situations where it would be morally wrong for one party to enrich himself at the expense of another. Klass v. Twin City Federal Savings and Loan Ass'n, 291 Minn. 68, 71, 190 N.W.2d 493, 495 (1971); Cady v. Bush, 283 Minn. 105, 110, 166 N.W.2d 358, 361-62 (1969).
In this case there was no mistake or fraud by the vendors. But, DeLisles stood silent and watched Anderson make extensive improvements to their property. They contracted to retain those improvements upon default knowing that because of Anderson's financial problems there was little or no chance that he could perform under the contract. In such a situation, the jury reasonably could find that equity and good conscience require DeLisles to compensate Anderson for the improvements.
However, the damages awarded by the jury are unreasonable. Although Anderson invested only $25,000, the jury found the improvements enhanced the value of the property by $47,000 and awarded him that sum. In general, recovery for unjust enrichment is based upon what the person enriched has received rather than what the opposing party has lost. Zirinsky, 413 F.2d at 489, Georgopolis v. George, 237 Minn. 176, 185, 54 N.W.2d 137 (1952). This rule cannot be applied mechanically to situations where the alleged value of improvements exceeds their cost. Equity cuts both ways.
Anderson began making the improvements without the consent of the DeLisles before he even signed an earnest money agreement. He signed a contract for deed knowing he was financially unable to perform the contract. His down payment check bounced and he made no further payments. Even though the improvements enhanced the value of the DeLisles' property by $47,000, it would be grossly inequitable to allow Anderson to recover more than he invested in the improvements. To award him more would be to reward him for defaulting on the contract.

DECISION
The unusual stipulated facts of this case compel us to reverse the award of judgment notwithstanding the verdict and to order the judgment we feel appropriate in equity. We remand to the trial court with instructions to enter judgment in favor of Anderson for $25,000.
