
    371 P.3d 322
    COUNTRYWIDE HOME LOANS, INC., Plaintiff-Counterdefendant-Third Party Defendant-Respondent, v. Ralph E. SHEETS, Jr. and Debra Sheets, as individuals with an interest in the property legally described as: See File for Description, Defendants-Counterclaimants-Third Party Plaintiffs-Appellants, v. Bank of America, N.A., successor by merger and name change to BAC Home Loans, f/k/a Countrywide Home Loans, Inc., and BAC Home Loan Servicing, L.P., f/k/a Countrywide Home Loan Servicing, LP, and ReconTrust Company, N.A., Third Party Defendants-Respondents.
    No. 42063.
    Supreme Court of Idaho, Boise, November 2016 Term.
    April 26, 2016.
    
      John Curtis Hucks, New Meadows, for appellants.
    Routh Crabtree Olsen, P.C., Boise and Murr Siler & Accomazzo, P.C., Denver, Colorado, for respondents. Daniel Delaney argued.
   HORTON, Justice.

This is a case involving a dispute over a mistakenly released deed of trust, which secured a 2004 residential mortgage between Ralph Sheets and the lender, Bank of America, N.A., fik/a Countrywide Home Loans, Inc. (Countrywide); the servicer of the loan; and the trustee who executed the mistaken release (companies collectively referred to as “Bank of America”). The district court granted summary judgment reinstating the deed of trust and dismissing Sheets’ counterclaims. We affirm.

I. FACTUAL AND PROCEDURAL BACKGROUND

In December of 2004, Sheets borrowed $65,250 from Countrywide, He executed a promissory note, secured by a deed of trust to his home in New Meadows. Between December of 2004 and April of 2009, Sheets timely paid the amounts due on the note.

In 2008, Countrywide sent Sheets a letter telling Sheets that he “may” qualify for a lower interest rate on a refinancing loan and estimating he had $88,056 equity in the home. Around this time, Bank of America acquired and merged with Countrywide.

In the late spring of 2009, Sheets applied for a new loan (the 2009 Refinancing). The loan application indicated that the loan would be for the principal sum of $87,500 -at an interest rate of 5.125%. However, Sheets claimed that he was orally promised a loan of $108,000 at a lower interest rate in subsequent telephone conversations with a loan officer, Paul Campbell. ‘

Closing on the new loan was scheduled for October 27, 2009. Sheets testified that the title company agent at the closing would not let him execute the documents because they were “bad” and incomplete. Thus, the 2009 Refinancing did not close. Sheets arrived home and found proposed closing documents, but he did not sign the documents because he did not agree with the terms contained therein. Sheets testified that, based upon his previous conversations with Campbell, he understood that Bank of America had agreed to not include a requirement for an escrow payment.

On November 9, 2009, the trustee of the deed of trust, ReconTrust Company, N.A (ReeonTrust), erroneously recorded a full re-conveyance of the deed of trust securing Sheets’ original note.' How the erroneous reconveyance came to be recorded is not clear. Bank of America claims that it caused the reconveyance to be recorded because it mistakenly proceeded as if the 2009 ‘ Refinancing had closed; Sheets claims 'that Bank of América had a darker, ulterior motive which it subsequently tried to conceal by failing to turn over relevant evidence in discovery. Sheets does not explain what this ulterior motive might be.

For some time after the reconveyance was recorded, the status of Sheets’’ loan was confused. Sheets claimed he repeatedly tried to contact Bank of America representatives who failed to timely respond and that he tried to make loan payments in November and December of 2009. At the end of November, Sheets’ online banking statement incorrectly stated that he had two obligations to Bank of America: the original 2004 loan, with a balance of $48,263.84; and a new loan with a balance of $87,750. Sheets hired counsel in late November of 2009 to assist him with the matter, On January 25, 2010, Bank of America sent Sheets a notice of its intent to accelerate his obligation and foreclose the deed of trust .if Sheets did not bring his account current and pay late fees.

On March 29, 2010, Bank of America sent Sheets a letter asking Sheets to stipulate to rescinding the reconveyance. The next day, Bank of America filed a complaint against Sheets seeking reinstatement of the deed of trust. On May 25, 2010, Bank of America sent Sheets a notice of its intent to commence foreclosure proceedings. Sheets filed an answer, counterclaim, demand for jury trial, and third party complaint against the third-party defendants in this action. He brought counterclaims for: (1) breach of contract; (2) specific performance; (3) violation of the Idaho Consumer Protection Act; (4) violation of the federal Fair Credit Reporting Act; (5) slander of credit; and (6) violation of Idaho Code section 45-1502.

In 2012, Bank of America filed two motions for summary judgment, seeking reinstatement of the deed of trust and dismissal of Sheets’ counterclaims. The district court ruled in favor of Bank of America on all issues. When considering Bank of America’s motion for summary judgment on its complaint, the district court determined that the terms of the deed of trust were dispositive and that it was clear that Sheets was not entitled to reconveyance of the trust deed until he fully paid the underlying note which the trust deed secured. The district court alternatively granted summary judgment on the theory of unjust enrichment, reasoning that it would be inequitable for Sheets to obtain the benefit of the reconveyance.

The district court dismissed Sheets’ counterclaims, finding that a valid contract did not exist between Sheets and Bank of America because there was no written contract complying with the statute of frauds and no evidence of a meeting of the parties’ minds as to the terms of the alleged contract. Based upon this determination, the district court denied Sheets’ request for specific performance because no contract existed. Sheets timely appealed.

II. STANDARD OF REVIEW

“When reviewing a grant of summary judgment, this Court employs the same standard as the district court.” Idaho Youth Ranch, Inc. v. Ada Cnty. Bd. of Equalization, 157 Idaho 180, 182, 335 P.3d 25, 27 (2014). Summary judgment is appropriate when “the pleadings, depositions, and admissions on file, together with the affidavits, if any, show that there is no genuine issue as to any material fact and that the moving party is entitled to a judgment as a matter of law.” I.R.C.P. 56(c). “When considering a motion for summary judgment, this Court liberally construes the record in a light most favorable to the party opposing the motion and draws all reasonable inferences in that party’s favor.” Kepler-Fleenor v. Fremont Cnty., 152 Idaho 207, 210, 268 P.3d 1159, 1162 (2012). When “the evidence reveals no disputed issues of material fact, then only a question of law remains, over which this Court exercises free review.” Stonebrook Const., LLC v. Chase Home Fin., LLC, 152 Idaho 927, 930, 277 P.3d 374, 377 (2012) (quoting Lockheed Martin Corp. v. Idaho State Tax Comm’n, 142 Idaho 790, 793, 134 P.3d 641, 644 (2006)).

III. ANALYSIS

Sheets contends that the district court erred by granting summary judgment in Bank of America’s favor and dismissing his counterclaims. We address these claims in turn.

A. The district court properly granted summary judgment rescinding the re-conveyance.

The district court granted summary judgment in favor of Bank of America’s complaint on the theory of unjust enrichment because allowing Sheets to gain a benefit from the erroneous reconveyance would be inequitable. It determined that unclean hands did not bar Bank of America from equitable relief. It reasoned that, although Bank of America “clearly acted without oversight and without awareness of the actions of its agents,” such conduct did not amount to conduct that was “inequitable, unfair and dishonest, or fraudulent and deceitful,” which is necessary for application of the doctrine of unclean hands.

Sheets contends that two documents created by Bank of America’s agents, which he refers to as the Beltran and Wigner Documents, were false and bar Bank of America from seeking equitable relief. Bank of America responds that Sheets’ insinuation that Bank of America’s mistaken reconveyance was part of an undefined “sinister scheme” is unsupportable.

“Unjust enrichment occurs where a defendant receives a benefit which would be inequitable to retain without compensating the plaintiff to the extent that retention is unjust.” Vanderford Co. v. Knudson, 144 Idaho 547, 557, 165 P.3d 261, 271 (2007). “The substance of an action for unjust enrichment lies in a promise, implied by law, that a party will render to the person entitled thereto that which in equity and good conscience belongs to the latter.” Smith v. Smith, 95 Idaho 477, 484, 511 P.2d 294, 301 (1973). “The elements of unjust enrichment are that (1) a benefit is conferred on the defendant by the plaintiff; (2) the defendant appreciates the benefit; and (3) it would be inequitable for the defendant to accept the benefit without payment of the value of the benefit.” Teton Peaks Inv. Co., LLC v. Ohme, 146 Idaho 394, 398, 195 P.3d 1207, 1211 (2008). Here, Sheets borrowed money from Bank of America, used the money to purchase property for his own benefit and pledged that property to Bank of America as security for repayment of the loan. It would be inequitable for Sheets retain that property without requiring that he fulfill his promise to repay the loan. Therefore, the district court correctly determined that Sheets would be unjustly enriched if the reconveyance was not rescinded.

To avoid this result, Sheets has raised the defense of unclean hands. The unclean hands doctrine “stands for the proposition that a litigant naay be denied relief by a court of equity' on the ground that his conduct has been inequitable, unfair and dishonest, or fraudulent and deceitful as to the controversy in issue.” Ada Cnty. Highway Dist. v. Total Success Investments, LLC, 145 Idaho 360, 370, 179 P.3d 323, 333 (2008) (quotations omitted) (quoting Gilbert v. Nampa Sch. Dist. No. 131, 104 Idaho 137, 146, 667 P.2d 1, 9 (1983)). For the doctrine to apply, “[t]he conduct must be intentional or willful, rather than merely negligent.” Grazer v. Jones, 154 Idaho 58, 68, 294 P.3d 184, 194 (2013).

In determining if the clean hands doctrine applies a court has discretion to evaluate the relative conduct of both parties and to determine whether the conduct of the party seeking an equitable remedy should, in the light of all the circumstances, preclude such relief. A trial court’s decision to afford relief based on the unclean hands doctrine, or to reject its application, will not be overturned on appeal absent a demonstration that the lower court abused its discretion.

Ada Cnty. Highway Dist., 145 Idaho at 371, 179 P.3d at 334 (alterations omitted) (quoting Sword v. Sweet, 140 Idaho 242, 251, 92 P.3d 492, 501 (2004)). The three-part test for abuse of discretion asks whether the district court “(1) correctly perceived the issue as one of discretion; (2) acted within the outer boundaries of its discretion and consistently with the legal standards applicable to the specific choices available to it; and (3) reached its decision by an exercise of reason.” Sun Valley Potato Growers, Inc. v. Texas Refinery Corp., 139 Idaho 761, 765, 86 P.3d 475, 479 (2004).

The district court did not abuse its discretion in rejecting Sheets’ unclean hands defense. The district court explicitly recognized that this was a discretionary decision. The district court identified the relevant legal principles, which require the conduct to be “inequitable, unfair and dishonest, or fraudulent and deceitful as to the controversy in issue.” The district court provided a reasoned analysis, explaining why Bank of America’s conduct did not meet the requisite standard.

In doing so, the district court analyzed both the Beltran and Wigner Documents which Sheets relied upon in support of his claim that Bank of America had unclean hands. The Beltran Document is entitled “Disbursement Authorization Checklist” and certifies that the requirements for the 2009 Refinancing were satisfied and that the loan should be funded. The district court found that the document was obviously incorrect because the 2009 Refinancing did not close. The Wigner Document is a loan quality checklist, which appears to be a post-closing checklist and that shows the 2009 loan was closed. The district court reasoned that, although the documents demonstrated Bank of America’s “corporate failings” and lack of oversight, they did not evidence “inequitable, unfair and dishonest, or fraudulent and deceitful” conduct. We are unable to conclude that this finding was erroneous.

Sheets has not shown that the district court erred by refusing to apply the doctrine of unclean hands as a bar to the Bank of America’s claim for relief. Thus, we affirm the district court’s grant of summary judgment in favor of Bank of America on its claim for relief from the reconveyance.

B. The district court properly granted summary judgment dismissing Sheets’ counterclaims.

Sheets advanced counterclaims with respect to an alleged agreement to refinance Sheets’ loan. These counterclaims involve a breach of contract claim and a specific performance claim.

The district court determined that a valid contract did not exist between Sheets and Bank of America because there was no written contract that would comply with the statute of frauds and there was no evidence of a meeting of the minds as to the terms of the alleged contract. Sheets contends that Bank of America committed in wilting to loan Sheets money “by approving and scheduling a closing for the 2009 Refinancing.” Bank of America responds that there is no written contract and that the parties never had a meeting of the minds as to important terms of the alleged contract. Bank of America is correct on both counts.

Summary judgment was appropriate because the alleged contract to lend money in the 2009 Refinancing is not evidenced by a signed writing. Idaho’s Statute of Frauds is set forth at Idaho Code section 9-505, and provides in relevant part:

In the following cases the agreement is invalid, unless the same or some note or memorandum thereof, be in writing and subscribed by the party charged, or by his agent. Evidence, therefore, of the agreement cannot be received without the writing or secondary evidence of its contents:
5. A promise or commitment to lend money or to grant or extend credit in an original principal amount of fifty thousand dollars ($50,000) or more, made by a person or entity engaged in the business of lending money or extending credit.

Sheets has not met his burden to present a writing signed by an agent of Bank of America committing to loan him money. Sheets directs our attention to Bajrektarevic v. Lighthouse Home Loans, Inc., 143 Idaho 890, 155 P.3d 691 (2007), in support of his claim that-this Court may look to the conduct of the parties to determine whether a contract existed. However, that case does not support his assertion that a commitment to lend money may be implied from the parties’ conduct, without the requisite written document.

The district court also correctly determined that there was no evidence of a meeting of the minds between Sheets and Bank of America sufficient to establish an enforceable Contract. “Formation of a valid contract requires a meeting of the minds as evidenced by a manifestation of mutual intent to contract.” Justad v. Ward, 147 Idaho 509, 512, 211 P.3d 118, 121 (2009). “For a contract to exist, a distinct understanding that is common to both parties is necessary.” Wandering Trails, LLC v. Big Bite Excavation, Inc., 156 Idaho 586, 592, 329 P.3d 368, 374 (2014). “An enforceable contract must be complete, definite, and certain in all of the contract’s material terms.” Id.

Here, the loan application stated the loan was for the principal amount of $87,500 with an interest rate of 5.125%. However, Sheets claimed that he was orally promised a loan of $108,000 at a lower, but unspecified, interest rate in subsequent telephone conversations with loan officer, Paul Campbell. The $20,500 discrepancy in the loan amount is unexplained. The proposed- closing documents that Sheets received from Bank of America did not contain terms that Sheets found acceptable. In the absence of evidence of any agreement as to material terms, including the principal sum to be loaned and the interest rate to be paid thereon, the district court correctly determined that a meeting of the minds did not occur.

The district court denied Sheets’ request for specific performance because it determined no contract existed between the parties. It is axiomatic that a court may not order specific performance of a contract that does not exist. Therefore, the district court properly dismissed Sheets’ counterclaim.

C. We award Bank of America attorney fees on appeal.

Bank of America requests appellate attorney fees under the terms of the deed of trust and Idaho Code sections 12-123, 12-120, and 12-121. We grant Bank of America’s request for attorney fees under Idaho Code section 12-121. That statute allows an award of “reasonable attorney’s fees to the prevailing party....” I.C. § 12-121. Attorney fees are awarded to the prevailing party only if “the Court determines that the action was brought or pursued frivolously, unreasonably or without foundation.” Baker v. Sullivan, 132 Idaho 746, 751, 979 P.2d 619, 624 (1999). Sheets’ appeal meets this standard.

Sheets has alleged Bank of America engaged in some sort of scheme to defraud him without a shred of evidence to support that claim. There is simply no evidence of inequitable, unfair, dishonest, fraudulent, or deceitful conduct needed to support his claim that Bank of America had unclean hands. Likewise, there is no evidence supporting Sheets’ counterclaims for breach of contract and specific performance. Although he had no evidence to support his defense to Bank of America’s action or his counterclaims, Sheets has maintained this action and failed to pay on his loan for six years, apparently hoping to obtain a windfall due to Bank of America’s error in 2009. We find Sheets’ appeal to have been pursued frivolously, unreasonably, and without foundation. Thus, we award Bank of America attorney fees under Idaho Code section 12-121.

IV. CONCLUSION

We affirm the district court’s decision granting summary judgment to Bank of America on its claim to void the mistakenly recorded reconveyance and the district court’s judgment dismissing Sheets’ counterclaims. We award attorney fees and costs on appeal to Bank of America.

Chief Justice J. JONES and Justices EISMANN, BURDICK and W. JONES concur. 
      
      . Ralph Sheets' wife, Debra Sheets, had no personal liability under the note and deed of trust. Although she is a named defendant in this action, it appears that Ralph Sheets is the only party with a liability to Bank of America. As such, we refer to the defendants in this action as "Ralph Sheets" or "Sheets.”
     
      
      . Sheets has been inconsistent in his claims of the date of merger, alternatively asserting that it took place in April of 2009 and the fall of 2008. The date of merger is not established in the record.
     
      
      . The district court also granted Bank of American’s request for summary judgment for rescission of the reconveyance on an alternative theory, determining that the substance of Bank of America's claim was for a declaratory judgment and that under the terms of the deed of trust and note Sheets was not entitled to reconveyance until he paid off his loan. We do not reach this alternative ground for relief because we affirm the district court’s grant of summary judgment on the equitable theory of unjust enrichment.
     
      
      . Such a decision is consistent with the equitable decisions of other courts. See, e.g., Holiday Hospitality Franchising, Inc. v. States Res., Inc., 232 S.W.3d 41, 52-54 (Tenn.Ct.App.2006) (reinstating a mistakenly released deed of trust on summary judgment under the "equitable lien” theory); Cameron State Bank v. Sloan, 559 S.W.2d 564, 568 (Mo.Ct.App.1977) (deciding that "negligence on the part of the bank” in mistakenly releasing a deed of trust did "not permit appellants to gain an unconscionable advantage”).
     
      
      . Sheets argues that a series of discovery disputes prevented him from accessing information from various Bank of America agents who could have helped clarify what precipitated the recon-veyance and failed 2009 Refinancing. Bank of America responds by arguing Sheets waived his discovety arguments by failing to object before the district court. Sheets replies that he did file a motion to compel, much of which the district court dismissed after determining that Bank of America did not have the requested information. "The trial court has broad discretion in determining whether or not to grant a motion to compel." Nightengale v. Timmel, 151 Idaho 347, 351, 256 P.3d 755, 759 (2011). The district court did not abuse its discretion by only partially granting Sheets' motion to compel. The district court denied much of the relief Sheets sought because Sheets' requests were broad and did not comply with the Idaho Rules of Civil Procedure. The district court noted that it was “sympathetic to the Sheets' frustration at trying to recover information from an entity such as Countrywide and its association with the entity of Bank of America," but it was limited by Sheets' broad requests and Bank of America's representations that it did not have the information. The record does not show that Sheets made further attempts to refine his discovery requests. We are unable to conclude that the district court abused its discretion with regard to Sheets' motion to compel.
     
      
      . Sheets' appeal does not challenge the dismissal of certain counterclaims, including those asserting claimed violations of the Idaho Consumer Protection Act- and the federal Fair Credit Reporting Act, slander of credit, and violation of Idaho Code section 45-1502.
     