Case: 19-1798   Document: 42     Page: 1   Filed: 06/12/2020




   United States Court of Appeals
       for the Federal Circuit
                 ______________________

         FIRST MORTGAGE CORPORATION,
                 Plaintiff-Appellant

                            v.

                   UNITED STATES,
                   Defendant-Appellee
                 ______________________

                       2019-1798
                 ______________________

     Appeal from the United States Court of Federal Claims
 in No. 1:18-cv-00228-LKG, Judge Lydia Kay Griggsby.
                  ______________________

                 Decided: June 12, 2020
                 ______________________

    TAMI D. COWDEN, Greenberg Traurig, P.A, Las Vegas,
 NV, for plaintiff-appellant.

     VINCENT DE PAUL PHILLIPS, JR., Commercial Litigation
 Branch, Civil Division, United States Department of Jus-
 tice, Washington, DC, for defendant-appellee. Also repre-
 sented by JOSEPH H. HUNT, ELIZABETH MARIE HOSFORD,
 ROBERT EDWARD KIRSCHMAN, JR.
                 ______________________

   Before LOURIE, MAYER, and WALLACH, Circuit Judges.
 WALLACH, Circuit Judge.
Case: 19-1798     Document: 42    Page: 2    Filed: 06/12/2020




 2              FIRST MORTGAGE CORPORATION   v. UNITED STATES



     Appellant First Mortgage Corporation (“FMC”) filed a
 breach of contract action against the United States (“Gov-
 ernment”) in the U.S. Court of Federal Claims, alleging
 that the Government National Mortgage Association (“Gin-
 nie Mae”) had violated the terms of several guaranty agree-
 ments between FMC and Ginnie Mae in connection with
 Ginnie Mae’s mortgage-backed securities (“MBS”) pro-
 gram. J.A. 23–58 (Complaint). The Government moved to
 dismiss FMC’s Complaint pursuant to Rule 12(b)(6) of the
 Rules of the U.S. Court of Federal Claims (“RCFC”).
 J.A. 382–465 (Motion to Dismiss). The Court of Federal
 Claims granted the Government’s motion, concluding that
 FMC’s breach of contract claims were precluded under the
 doctrine of res judicata. See First Mortg. Corp. v. United
 States, 142 Fed. Cl. 164, 176 (2019); J.A. 1 (Judgment).
    FMC appeals. We have jurisdiction pursuant to 28
 U.S.C. § 1295(a)(3). We affirm.
                        BACKGROUND
                   I. Factual Background 1
                A. Ginnie Mae’s MBS Program
     “[Ginnie Mae] is a corporation wholly owned and con-
 trolled by the U.S. Department of Housing and Urban



     1   Because FMC appeals the dismissal of its Com-
 plaint for failure to state a claim under RCFC 12(b)(6), the
 facts recited in this Opinion draw on FMC’s Complaint, “as
 well as other sources courts ordinarily examine when rul-
 ing on Rule 12(b)(6) motions to dismiss, in particular, doc-
 uments incorporated into the [C]omplaint by reference,
 and matters of which a court may take judicial notice.”
 Tellabs, Inc. v. Makor Issues & Rights, Ltd., 551 U.S. 308,
 322 (2007); see Leatherman v. Tarrant Cty. Narcotics Intel-
 ligence & Coordination Unit, 507 U.S. 163, 164 (1993) (“We
 review here a decision granting a motion to dismiss, and
Case: 19-1798     Document: 42     Page: 3    Filed: 06/12/2020




 FIRST MORTGAGE CORPORATION    v. UNITED STATES              3



 Development (‘HUD’).”         J.A. 26; see 12 U.S.C.
 § 1717(a)(2)(A) (creating Ginnie Mae as “a body corporate
 without capital stock” within HUD). Congress created Gin-
 nie Mae to, inter alia, “provide stability in the secondary
 market for residential mortgages,” 12 U.S.C. § 1716(1), and
 “promote access to mortgage credit . . . by increasing the li-
 quidity of mortgage investments and improving the distri-
 bution of investment capital available,” id. § 1716(4); see
 J.A. 29. To this end, Ginnie Mae “is authorized, upon such
 terms and conditions as it may deem appropriate, to guar-
 antee” MBS and administer the MBS program. 12 U.S.C.
 § 1721(g)(1); see J.A. 23–24.
      Under the MBS program, Ginnie Mae “guarantee[s]
 the timely payment of principal of and interest on securi-
 ties that are based on and backed by a trust or pool com-
 posed of mortgages which are insured or guaranteed by
 [certain Government agencies].” 24 C.F.R. § 320.1; see
 J.A. 23–24. Approved private lenders originate or acquire
 residential mortgage loans insured or guaranteed by cer-
 tain Government agencies, pool and securitize those mort-
 gages, and sell the securities to investors in the secondary
 mortgage market. J.A. 23–24, 28; see J.A. 60 (Guaranty
 Agreement) (providing for the “pool[ing] of mortgages secu-
 ritized by the [i]ssuer and guaranteed by Ginnie Mae”).
 Ginnie Mae guarantees the “timely payment of principal
 and interest on those securities” to investors. J.A. 24.
 “[Ginnie Mae’s] guaranty . . . is backed by the full faith and
 credit of the United States.” 24 C.F.R. § 320.1; see J.A. 60
 (Guaranty Agreement) (providing that “the full faith and
 credit of the United States is pledged to the payment of all
 amounts which may be required to be paid under [an MBS
 program] guaranty by Ginnie Mae”).




 therefore must accept as true all the factual allegations in
 the complaint.”).
Case: 19-1798     Document: 42      Page: 4    Filed: 06/12/2020




 4              FIRST MORTGAGE CORPORATION    v. UNITED STATES



     B. Ginnie Mae’s Guaranty Agreements with FMC
     FMC is a privately held corporation based in Califor-
 nia. J.A. 3. From 1975 to 2015, FMC was “an originator
 and servicer of [G]overnment-guaranteed home mortgages
 and an issuer” of MBS in Ginnie Mae’s MBS program.
 J.A. 24; see J.A. 27, 30. As of December 2014, FMC had
 serviced more than 31,000 mortgage loans, totaling more
 than $5.1 billion in unpaid principal, with “[m]ost” of those
 mortgages “securitized into [Ginnie Mae-guaranteed]
 [MBS].” J.A. 26. Pursuant to the MBS program, Ginnie
 Mae and FMC “entered into a great many Guaranty Agree-
 ments[.]” J.A. 30. The “terms of [these Guaranty Agree-
 ments] were prescribed by [Ginnie Mae]” and
 “substantially” the same, with Ginnie Mae’s Issuer Guide
 “at all times . . . an integral and material part of each Guar-
 anty Agreement.” J.A. 30; see J.A. 60–74 (Guaranty Agree-
 ment excerpts), 107–254 (Issuer Guide excerpts); see also
 12 U.S.C. § 1721(g)(1) (authorizing Ginnie Mae to guaran-
 tee MBS “upon such terms and conditions as it may deem
 appropriate”).
     In exchange for Ginnie Mae’s guaranty, FMC agreed to
 “conform with [Ginnie Mae’s] servicing standards, proce-
 dures, methods, and practices,” comply with “any applica-
 ble requirements contained in [the Ginnie Mae Issuer
 Guide],” and “establish and maintain books, files, and ac-
 counting records in accordance with [both].” J.A. 65; see 24
 C.F.R. § 320.3(e) (providing “[e]thics and standards” for
 MBS issuers). The “cash flow from pooled mortgages,” in-
 cluding “principal and interest” payments, were considered
 “[c]ustodial [f]unds” that had to “be deposited and main-
 tained in custodial accounts[.]” J.A. 236. FMC was re-
 quired to “establish and maintain a Central [Principal &
 Interest] Custodial Account with a commercial bank” or
 other financial institution, to be “used exclusively for funds
 relating to Ginnie Mae MBS program mortgage pools.”
 J.A. 67; see J.A. 61. FMC was required to clear collection
 accounts “daily” into a custodial account, such as the
Case: 19-1798     Document: 42     Page: 5    Filed: 06/12/2020




 FIRST MORTGAGE CORPORATION    v. UNITED STATES              5



 Central Principal & Interest Custodial Account, “unless
 [FMC] use[d] [an Automated Clearing House] transfer, in
 which case the accounts [had to] be cleared every [forty-
 eight] hours.” J.A. 68. FMC was also required to “maintain
 delinquency rates” on mortgage pools “below [specified]
 threshold levels.” J.A. 252. To achieve this, FMC was al-
 lowed, per the Issuer Guide, “to repurchase a [mortgage]
 from a pool” if the mortgage had been “in a continuous pe-
 riod of default for [ninety] days or more,” then re-pool the
 mortgage and re-sell the security if the default was subse-
 quently cured. J.A. 251–52; see J.A. 160–61 (providing
 mortgage status requirements for pooling).
     Under the Guaranty Agreements, FMC would be in
 “[i]mmediate default,” “if Ginnie Mae, in its sole discretion,
 determine[d]” that “[a]ny unauthorized use of Custodial
 Funds” or “[a]ny submission of false reports, statements, or
 data or any act of dishonesty or breach of fiduciary duty to
 Ginnie Mae related to the MBS program” had occurred.
 J.A. 72–73 (Guaranty Agreement Section 10.01). In the
 event of default, “Ginnie Mae [could], in its sole discretion,
 but [was] not required to, confer and negotiate with [FMC]
 with respect to remedying and correcting the default.”
 J.A. 73 (Guaranty Agreement Section 10.03). If an agree-
 ment was reached, it had to be “placed in written contrac-
 tual form” as a supplement to the Guaranty Agreement.
 J.A. 73. In the absence of such an agreement, in “any event
 of default,” Ginnie Mae could “automatically effect and
 complete the extinguishment of any redemption, equitable,
 legal, or other right, title, or interest of [FMC] in the
 [pooled] [m]ortgages,” J.A. 73–74 (Guaranty Agreement
 Section 10.04), with all of FMC’s “authority and power . . .
 under [the Guaranty] Agreement, with respect to” any rel-
 evant securities and mortgages “automatically termi-
 nat[ing] and expir[ing],” J.A. 74 (Guaranty Agreement
 Section 10.05).
Case: 19-1798     Document: 42    Page: 6    Filed: 06/12/2020




 6              FIRST MORTGAGE CORPORATION   v. UNITED STATES



            C. FMC’s Default and Termination
     In early 2015, Ginnie Mae “learned of certain actions
 by [FMC] that constitute[d] events of immediate default
 under the terms of the Guaranty Agreements,” and, in
 March 2015, “undertook a compliance review . . . of
 [FMC’s] Ginnie Mae portfolio.” J.A. 367 (Notice of Viola-
 tion); see J.A. 37. In May 2015, Ginnie Mae served FMC
 with a Notice of Violation, stating that, during the compli-
 ance review, Ginnie Mae had “observed numerous in-
 stances where borrower payments were not moved to
 Ginnie Mae custodial accounts within [forty-eight] hours of
 receipt” and had found that FMC had “submitted false re-
 ports to Ginnie Mae” claiming that “[mortgages] were
 [ninety] days or more delinquent” when FMC “repurchased
 [them] from a pool,” when, in fact, the “loans were not
 properly delinquent,” both in breach of the Guaranty
 Agreements. J.A. 367.
      Ginnie Mae explained that FMC was, accordingly, in
 default, and that “Ginnie Mae [was] entitled to terminate
 [FMC’s] authority to act as a Ginnie Mae issuer” and to ter-
 minate and extinguish “any redemption, equitable, legal or
 other right, title[,] and interest of [FMC] in [Ginnie Mae-
 backed] mortgage pools[.]” J.A. 367; see J.A. 37. Rather
 than immediately terminate FMC from the MBS program,
 Ginnie Mae stated it would “forebear from immediately ef-
 fectuating the termination and extinguishment” provided
 that FMC responded with a timely written response to the
 Notice of Violation, providing additional information and
 affirming FMC’s “intent to comply with the conditions” as
 set by Ginnie Mae. J.A. 367; see J.A. 37–38. Ginnie Mae
 reserved the right to “tak[e] . . . further remedial action
 against [FMC and its corporate officers],” “including, but
 not limited to, termination” of FMC from the MBS pro-
 gram. J.A. 369.
     FMC timely responded. J.A. 371–76 (FMC Response);
 see J.A. 41–42. FMC expressed its intent to “fully
Case: 19-1798    Document: 42      Page: 7    Filed: 06/12/2020




 FIRST MORTGAGE CORPORATION    v. UNITED STATES             7



 remediate the issues the Notice [of Violation] describe[d]”
 and “to comply fully with [Ginnie Mae’s] conditions . . . in
 the Notice [of Violation]” and Guaranty Agreements.
 J.A. 371. With the assistance of external counsel, FMC un-
 dertook an internal investigation and provided the results
 to Ginnie Mae. J.A. 372. FMC noted that it was also “com-
 plying with requests from the [U.S.] Securities and Ex-
 change Commission [(‘SEC’)] with respect to the SEC’s
 investigation” into the same conduct. J.A. 372.
     In June 2015, Ginnie Mae terminated FMC from its
 MBS program. J.A. 378–80 (Extinguishment Letter); see
 J.A. 42. Ginnie Mae explained that, “[s]ince [its Notice of
 Violation], [it] ha[d] engaged in further analysis of the
 events described in [the Notice of Violation], and ha[d] con-
 cluded it [would] complete the extinguishment of any re-
 demption, equitable, legal or other right, title and interest
 of [FMC] in the mortgages pooled under each and every
 Guaranty Agreement,” pursuant to 12 U.S.C. § 1721(g)
 “and Sections 10.04 and 10.05 of each Guaranty Agree-
 ment.” J.A. 378.
           D. SEC Civil Enforcement Action and
                   Consent Agreement
      In May 2016, the SEC initiated a civil enforcement ac-
 tion against FMC and its corporate officers in the U.S. Dis-
 trict Court for the Central District of California (“District
 Court”). J.A. 427, 440; see J.A. 427–43 (SEC District Court
 Complaint). The SEC alleged that, “[f]rom March 2011
 through March 2015, FMC and [its corporate officers] mis-
 led investors” in its Ginnie Mae-guaranteed MBS by
 “falsely claiming to both [Ginnie Mae] and investors that
 certain mortgage loans in [FMC’s] securities were delin-
 quent when, in fact, such loans were current.” J.A. 428.
 The SEC explained that FMC had violated the Guaranty
 Agreements by “improperly exercis[ing]” its repurchase op-
 tion on loans. J.A. 429. FMC had delayed the transfer of
 “full curing [borrower] payments” into a custodial account,
Case: 19-1798     Document: 42     Page: 8    Filed: 06/12/2020




 8              FIRST MORTGAGE CORPORATION    v. UNITED STATES



 falsely pushing the borrower’s account into delinquency
 and eligibility for repurchase. J.A. 429. FMC then applied
 the delayed payments to bring the loan current and “back
 into FMC’s inventory,” J.A. 429, to be re-purchased at par,
 re-pooled, and re-sold as an MBS “at market rates, which
 reflected a premium over par[,]” J.A. 435–36; see J.A. 429
 (explaining that “par” is “essentially the remaining princi-
 pal balance on the loan”). The SEC alleged that FMC ac-
 crued “$7.5 million in illicit profits as a result of the
 practice,” J.A. 437, all while FMC was certifying to Ginnie
 Mae that FMC was in compliance with the Guaranty
 Agreements, J.A. 436.
      In June 2016, the SEC and FMC entered into a consent
 agreement. J.A. 455–60 (Consent Agreement). FMC,
 “[w]ithout admitting or denying the allegations [in the SEC
 District Court Complaint,] . . . consent[ed] to the entry
 of . . . final [j]udgment” against FMC. J.A. 455; see
 J.A. 462–65 (Final Judgment). FMC agreed to pay $7.5
 million in disgorgement, approximately $500,000 in pre-
 judgment interest, and $3.75 million in civil penalties.
 J.A. 464. FMC further agreed to “not take any action or
 make or permit to be made any public statement denying,
 directly or indirectly, any allegation in the [SEC District
 Court] [C]omplaint or creating the impression that the
 [SEC District Court] [C]omplaint is without factual basis”
 and to “not make or permit to be made any public state-
 ment to the effect that [FMC] does not admit the allega-
 tions of the [SEC District Court] [C]omplaint, or that this
 Consent [Agreement] contains no admission of the allega-
 tions, without also stating that [FMC] does not deny the
 allegations.” J.A. 458. The Consent Agreement provided
 that it did not “affect[] [FMC’s] . . . right to take legal or
 factual positions in litigation or other legal proceedings in
 which the [SEC] is not a party.” J.A. 458. In July 2016,
Case: 19-1798     Document: 42     Page: 9    Filed: 06/12/2020




 FIRST MORTGAGE CORPORATION    v. UNITED STATES              9



 the District Court entered this Consent Agreement as its
 final judgment. J.A. 462–65 (Final Judgment). 2
                 II. Procedural Background
     In February 2018, FMC filed its Complaint in the
 Court of Federal Claims, alleging that Ginnie Mae had
 “breached all of several Guaranty Agreements” when it
 wrongfully terminated FMC from its MBS program.
 J.A. 23–24. FMC alleged that Ginnie Mae’s extinguish-
 ment and termination of the Guaranty Agreements was
 “without proper cause” and, therefore, in breach of the
 Guaranty Agreements, J.A. 25, because FMC “was at all
 times in full compliance with all of its contractual obliga-
 tions” under the Guaranty Agreements, J.A. 24; see J.A. 39
 (asserting that “[t]he [Notice of Violation] was also remark-
 able for its utter lack of factual and legal support for the
 accusations it contained”), 40 (“There is no factual or legal
 basis for the events of default alleged in the [Notice of Vio-
 lation][.]”). FMC “categorically denie[d] violating any re-
 quirement in the Guaranty Agreements[.]” J.A. 40. FMC
 alleged that it did not misuse custodial funds, J.A. 39, only
 “repurchas[ed] loans that [were properly in default],”
 J.A. 35, and therefore, did not submit false reports to Gin-
 nie Mae, J.A. 39–40 (alleging that Ginnie Mae’s “claim that


     2    After entry of the Final Judgment, FMC tried to
 bring its breach of contract claims against Ginnie Mae in
 the District Court. See Complaint at 19–23, First Mortg.
 Corp. v. Gov’t Nat’l Mortg. Ass’n, No. 5:17-cv-01225, 2017
 WL 2671224 (C.D. Cal. June 20, 2017) (presenting substan-
 tively similar, if not identical, allegations to FMC’s Com-
 plaint here). The District Court dismissed these claims
 under Rule 12(b)(1) of the Federal Rules of Civil Procedure,
 for lack of subject matter jurisdiction over contract claims
 against the United States. See First Mortg. Corp. v. Gov’t
 Nat’l Mortg. Ass’n, No. EDC-17-01225-JGB, 2018 WL
 4927795, at *1 (C.D. Cal. Jan. 4, 2018).
Case: 19-1798     Document: 42       Page: 10     Filed: 06/12/2020




 10             FIRST MORTGAGE CORPORATION      v. UNITED STATES



 FMC breached the [Guaranty Agreements] by ‘submitting
 false reports to Ginnie Mae stating that loans were [ninety]
 days or more delinquent when the loans were repur-
 chased’” was “baseless”). FMC asserted that the “United
 States [wa]s,” therefore, “liable to pay damages to FMC.”
 J.A. 57.
      The Government moved to dismiss the Complaint un-
 der Rule 12(b)(6) of the RCFC. J.A. 388; see J.A. 382–410
 (Motion to Dismiss). The Court of Federal Claims dis-
 missed FMC’s Complaint, concluding that the “[G]overn-
 ment has shown that FMC’s breach of contract claims . . .
 are precluded under the doctrine of res judicata, because
 [FMC’s Court of Federal Claims] action is essentially a col-
 lateral attack on the [Final] Judgment entered by the [Dis-
 trict Court] in the SEC Civil Enforcement Action.” First
 Mortg., 142 Fed. Cl. at 176.
                           DISCUSSION
          I. Standard of Review and Legal Standard
       The Court of Federal Claims may dismiss a complaint
 if it fails “to state a claim upon which relief can be granted.”
 RCFC 12(b)(6). “We review the . . . grant of a motion to dis-
 miss for failure to state a claim de novo.” Prairie Cty.,
 Mont. v. United States, 782 F.3d 685, 688 (Fed. Cir. 2015)
 (citation omitted). To survive a motion to dismiss, the com-
 plaint must provide “‘a short and plain statement of the
 claim showing the pleader is entitled to relief,’” Bell Atl.
 Corp. v. Twombly, 550 U.S. 544, 555 (2007) (quoting Fed.
 R. Civ. P. 8(a)(2)), with “sufficient factual matter . . . to
 ‘state a claim to relief that is plausible on its face,’” Ashcroft
 v. Iqbal, 556 U.S. 662, 678 (2009) (quoting Twombly, 550
 U.S. at 570). “We take all factual allegations in the com-
 plaint as true and construe the facts in the light most fa-
 vorable to the non-moving party.” Jones v. United States,
 846 F.3d 1343, 1351 (Fed. Cir. 2017) (citation omitted).
Case: 19-1798    Document: 42      Page: 11     Filed: 06/12/2020




 FIRST MORTGAGE CORPORATION     v. UNITED STATES             11



     “The doctrine of res judicata involves the related con-
 cepts of claim preclusion and issue preclusion.” Phil-
 lips/May Corp. v. United States, 524 F.3d 1264, 1267 (Fed.
 Cir. 2008). “[I]ssue preclusion operates only as to issues
 actually litigated, whereas claim preclusion may operate
 between the parties simply by virtue of the final judgment.”
 Young Engn’rs, Inc. v. U.S. Int’l Trade Comm’n, 721 F.2d
 1305, 1314 (Fed. Cir. 1983). Claim preclusion “foreclose[es]
 any litigation of matters that . . . should have been ad-
 vanced in an earlier suit.” Phillips/May Corp., 524 F.3d at
 1267 (internal quotation marks and citation omitted). “A
 final judgment on the merits of an action precludes the par-
 ties or their privies from relitigating issues that were or
 could have been raised in that action.” Federated Dep’t
 Stores, Inc. v. Moitie, 452 U.S. 394, 398 (1981) (citing Com-
 missioner v. Sunnen, 333 U.S. 591, 597 (1948) and Crom-
 well v. Cty. of Sac, 94 U.S. 351, 352–53 (1877)).
      Generally, claim preclusion applies where: “(1) the
 parties are identical or in privity; (2) the first suit pro-
 ceeded to a final judgment on the merits; and (3) the second
 claim is based on the same set of transactional facts as the
 first.” Ammex, Inc. v. United States, 334 F.3d 1052, 1055
 (Fed. Cir. 2003) (citing Parklane Hosiery Co. v. Shore, 439
 U.S. 322, 326 n.5 (1979)). However, “somewhat different
 rules” apply to the third factor in cases of “defendant pre-
 clusion.” Nasalok Coating Corp. v. Nylok Corp., 522
 F.3d 1320, 1324 (Fed. Cir. 2008). “A defendant is precluded
 only if (1) the claim or defense asserted in the second action
 was a compulsory counterclaim that the defendant failed
 to assert in the first action, or (2) the claim or defense rep-
 resents what is essentially a collateral attack on the first
 judgment.” Id. (citing Baker v. Gold Seal Liquors, Inc., 417
 U.S. 467, 469 n.1 (1974)).
Case: 19-1798     Document: 42     Page: 12    Filed: 06/12/2020




 12             FIRST MORTGAGE CORPORATION    v. UNITED STATES



      II. The Court of Federal Claims Properly Dismissed
                        FMC’s Complaint
     The Court of Federal Claims dismissed FMC’s Com-
 plaint, concluding that “[b]ecause the parties . . . are iden-
 tical to, or in privity with, the parties to the SEC Civil
 Enforcement Action, the SEC Civil Enforcement Action
 proceeded to a final judgment on the merits, and [the Court
 of Federal Claims action] and the SEC Civil Enforcement
 Action are based on the same set of transactional facts,”
 FMC was barred “from litigating its breach of contract
 claims” against Ginnie Mae “under the doctrine of res judi-
 cata[.]” First Mortg., 142 Fed. Cl. at 176. On appeal, FMC
 argues that the Court of Federal Claims erred in dismiss-
 ing its Complaint because “the elements of claim preclusion
 have not been met.” Appellant’s Br. 12. Specifically, FMC
 argues that “the SEC and Ginnie Mae are not in privity,”
 and that its Complaint does not arise from the same set of
 transactional facts for the purposes of defendant preclu-
 sion, because FMC’s “claims are not a collateral attack on
 the [Final] Judgment.” Id. at 17. 3 We disagree with FMC.




      3   FMC does not directly contest that the Final Judg-
 ment was a final judgment on the merits. See generally
 Appellant’s Br.; see also Ammex, Inc., 334 F.3d at 1055 (re-
 quiring, inter alia, that “the first suit proceeded to a final
 judgment on the merits”). However, it does, in arguing that
 its Complaint is not a collateral attack on the Final Judg-
 ment, attempt to undermine the Consent Agreement and
 Final Judgment as “the product of pragmatic decisions” not
 “factual finding[s].” Appellant’s Br. 24–25. To the extent
 FMC challenges the Final Judgment as not a final judg-
 ment, its arguments are without merit. See Ford-Clifton v.
 Dep’t of Veterans Affairs, 661 F.3d 655, 660 (Fed. Cir. 2011)
 (providing that, for claim preclusion, “consent judgments
 entered pursuant to settlement agreements have the same
Case: 19-1798    Document: 42      Page: 13    Filed: 06/12/2020




 FIRST MORTGAGE CORPORATION    v. UNITED STATES             13



      First, the SEC and Ginnie Mae are in privity for the
 purposes of precluding FMC’s breach of contract claims.
 “There is privity between officers of the same government,”
 for the purposes of claim preclusion, if “in the earlier liti-
 gation the representative of the United States had author-
 ity to represent its interests in a final adjudication of the
 issue in controversy.” Sunshine Anthracite Coal Co. v. Ad-
 kins, 310 U.S. 381, 402–03 (1940); see Grasty v. U.S. Patent
 & Trademark Office, 211 F. App’x 952, 954 (Fed. Cir. 2007)
 (applying Sunshine Anthracite to claim preclusion); United
 States v. Alky Enterprises, Inc., 969 F.2d 1309, 1314–15
 (1st Cir. 1992) (applying Sunshine Anthracite to claim pre-
 clusion); Schrader v. United States, 75 Fed. Cl. 242, 249
 (2007) (“For purposes of res judicata, the United States is
 in privity with its authorized officials.”). It is uncontested
 that the SEC and Ginnie Mae are both officers and repre-
 sentative of the United States.              See 12 U.S.C.
 § 1717(a)(2)(A) (creating Ginnie Mae); 15 U.S.C. § 78d (es-
 tablishing the SEC); see generally Appellant’s Br. The SEC
 has the authority to represent the United States in civil
 enforcement actions, including that brought against FMC.
 J.A. 427–43 (SEC District Court Complaint); see 15 U.S.C.
 § 77t (giving the SEC the authority to investigate and bring
 civil enforcement actions in district court for “any acts or
 practices which constitute or will constitute a violation of
 [the Federal securities laws]”). The SEC has the authority
 to represent the United States in settlements resolving
 those civil enforcement actions, including the Consent
 Agreement negotiated with FMC and the resulting Final
 Judgment. J.A. 455–60 (Consent Agreement), 462–65 (Fi-
 nal Judgment); see 15 U.S.C. § 77s (enumerating the “[s]pe-
 cial powers of [the SEC],” including the “authority . . . to
 make, amend, and rescind such rules and regulations as
 may be necessary”); 17 C.F.R. § 202.5(f) (explaining that


 effect as judgments after a trial on the merits” (citation
 omitted)).
Case: 19-1798     Document: 42    Page: 14    Filed: 06/12/2020




 14             FIRST MORTGAGE CORPORATION   v. UNITED STATES



 the SEC has the authority to resolve SEC “investigations,
 civil lawsuits, and administrative proceedings” through
 settlement with respondents). The SEC, therefore, “repre-
 sent[ed] the United States” on the “issue in controversy”—
 whether FMC breached the Guaranty Agreements, precip-
 itating Ginnie Mae’s extinguishment and termination of
 FMC’s rights. Sunshine Anthracite, 310 U.S. at 403; see
 J.A. 428 (claiming that FMC “misled investors . . . by
 falsely claiming to both [Ginnie Mae] and investors that
 certain mortgage loans in these securities were delinquent
 when, in fact, such loans were current”), 429 (claiming that
 FMC had “improperly exercised . . . [the Ginnie Mae Guar-
 anty Agreements] [r]epurchase [o]ption”). Accordingly, the
 Court of Federal Claims properly concluded that the SEC
 and Ginnie Mae are in privity for the purposes of claim pre-
 clusion.
     Second, FMC’s claims constitute a collateral attack on
 the Final Judgment. A claim is a “collateral attack” on a
 final judgment where “successful prosecution of the second
 action would nullify the initial judgment or would impair
 rights established in the initial action.” Nasalok, 522 F.3d
 at 1324 (internal quotation marks and citation omitted). In
 its District Court Complaint, the SEC alleged that FMC
 “improperly exercised” its repurchase option under the
 Guaranty Agreements, J.A. 429, and falsely certified to
 Ginnie Mae that it was in compliance with the Guaranty
 Agreements, thereby perpetrating a fraud on its investors
 and Ginnie Mae and making “$7.5 million in illicit profits
 as a result[,]” J.A. 436–37 (SEC District Court Complaint).
 In the Consent Agreement, FMC agreed to “not take any
 action or make or permit to be made any public statement
 denying, directly or indirectly, any allegation in the com-
 plaint or creating the impression that the complaint is
 without factual basis.” J.A. 458. The Final Judgment, in-
 corporating the Consent Agreement, made FMC “liable for
 disgorgement of [$7.5 million], representing profits gained
 as a result of the conduct alleged in the [SEC District
Case: 19-1798     Document: 42      Page: 15    Filed: 06/12/2020




 FIRST MORTGAGE CORPORATION     v. UNITED STATES              15



 Court] Complaint[.]” J.A. 464–65. Nonetheless, in its
 Complaint here, FMC contended that Ginnie Mae, “with-
 out proper cause, breached [the Guaranty Agreements]”
 when it extinguished and terminated FMC, J.A. 25, be-
 cause FMC “was at all times in full compliance with all of
 its contractual obligations” under the Guaranty Agree-
 ments, J.A. 24. FMC alleged that it did not misuse custo-
 dial funds, J.A. 39, and only “repurchas[ed] loans that
 [were properly in default],” J.A. 34. See J.A. 39 (asserting
 that “[t]he [Notice of Violation] was also remarkable for its
 utter lack of factual and legal support for the accusations
 it contained”), 39–40 (“Equally baseless was [Ginnie Mae’s]
 claim that FMC breached the [Guaranty Agreements] by
 ‘submitting false reports to Ginnie Mae stating that loans
 were [ninety] days or more delinquent when the loans were
 repurchased[.]’”), 40 (“There is no factual or legal basis for
 the events of default alleged in the [Notice of Violation][.]”),
 40 (“FMC categorically denies violating any requirement in
 the Guaranty Agreements[.]”). That is, FMC’s Complaint
 seeks to dispute the facts laid out in the SEC District Court
 Complaint and, thereby, “impair rights established” by, if
 not “nullify,” the Consent Agreement and Final Judgment.
 Nasalok, 522 F.3d at 1324 (internal quotation marks and
 citation omitted). “[A] defense that could have been inter-
 posed cannot later be used to attack the judgment of the
 first action.” Id. at 1328 (citation omitted). Accordingly,
 the Court of Federal Claims properly concluded that FMC’s
 complaint was a collateral attack on the Final Judgment.
     FMC’s counterarguments are unpersuasive. First,
 FMC argues that the SEC and Ginnie Mae are not in priv-
 ity because privity requires that “‘precisely the same legal
 right’” be at issue in the first and second actions. Appel-
 lant’s Br. 20 (quoting Jones v. SEC, 115 F.3d 1173, 1180
 (4th Cir. 1997)). This argument confuses claim preclusion
 with issue preclusion. Compare Jet, Inc. v. Sewage Aera-
 tion Sys., 223 F.3d 1360, 1362 (Fed. Cir. 2000) (providing
 that claim preclusion “bar[s] a second suit raising claims
Case: 19-1798     Document: 42     Page: 16    Filed: 06/12/2020




 16             FIRST MORTGAGE CORPORATION    v. UNITED STATES



 based on the same set of transactional facts”), with Masco
 Corp. v. United States, 303 F.3d 1316, 1329 (Fed. Cir. 2002)
 (providing that issue preclusion bars “relitigation in a sec-
 ond suit of issues actually litigated and determined in [a]
 first suit”). Through this confusion, FMC misapprehends
 what our privity analysis requires. See Jefferson Sch. of
 Soc. Sci. v. Subversive Activities Control Bd., 331 F.2d 76,
 83 (D.C. Cir. 1963) (explaining that sharing “precisely the
 same legal right” is “sufficient” but not necessary to estab-
 lish privity). “Identity of parties is not a mere matter of
 form, but of substance.” Sunshine Anthracite, 310 U.S. at
 402 (quoting Chicago, R. I. & P. Ry. Co. v. Schendel, 270
 U.S. 611, 620 (1926)). “Identity” does not mean that the
 SEC and Ginnie Mae must be “precisely identical,” id., but
 that their “interests in a given lawsuit” are “aligned,”
 Jones, 115 F.3d at 1181 (citation omitted); see Sunshine
 Anthracite, 310 U.S. at 403 (“Where a suit binds the United
 States, it binds its subordinate officials.”); Jones, 115 F.3d
 at 1179–81 (declining to find privity between the SEC and
 a “private, nonprofit” professional organization, because
 they “represent[ed] distinct interests” and possessed dis-
 tinct “legal rights”). 4 As discussed above, the SEC had
 identity, and therefore privity, with the United States.



      4  FMC also argues that FMC is not precluded from
 bringing its breach of contract claims against Ginnie Mae
 because, while the Consent Agreement “prohibit[s] . . .
 FMC [from] taking a position contrary to the allegations in
 the SEC complaint,” it “expressly exempt[s] any litigation
 to which the SEC is not a party” and “the SEC is not a party
 to the current litigation[.]” Appellant’s Br. 12. This argu-
 ment is misplaced. The SEC negotiates Consent Agree-
 ments on behalf of the United States. See 15 U.S.C. § 77t;
 17 C.F.R. § 202.5(d), (f) (providing for the negotiation of no
 contest consent agreements in civil enforcement actions,
 but not criminal proceedings). FMC cannot now file suit
Case: 19-1798     Document: 42      Page: 17    Filed: 06/12/2020




 FIRST MORTGAGE CORPORATION     v. UNITED STATES              17



      Second, FMC argues that the SEC and Ginnie Mae are
 not in privity because the SEC “has not been granted the
 authority to represent the interests of other government
 agencies as contracting parties, or to defend against claims
 of breach of contract by such parties.” Appellant’s Br. 19.
 This argument is misplaced. Privity asks “whether or not”
 the SEC “had [the] authority to represent [the United
 States’] interests in a final adjudication of the issue in con-
 troversy”—not whether the SEC has the authority to rep-
 resent Ginnie Mae in court. Sunshine Anthracite, 310 U.S.
 at 403; see Facchiano Const. Co. v. U.S. Dep’t of Labor, 987
 F.2d 206, 211 (3d Cir. 1993) (explaining that, for privity,
 we “look to the authority” the agency had “to bind the gov-
 ernment in a final adjudication”). Here, the SEC had such
 authority. See 15 U.S.C. § 77t(d)(1) (providing the SEC
 with authority to “bring an action in a United States dis-
 trict court to seek . . . a civil penalty to be paid by the per-
 son who committed [a] violation [of Federal securities
 law]”). 5




 against the United States to avoid the consequences of its
 Consent Agreement with the United States—the SEC “rep-
 resented the United States in [the Consent Agreement and
 Final Judgment] and the delegation of that power to the
 Commission was valid, as we have said. That suit there-
 fore bound the United States, as well as the appellant.”
 Sunshine Anthracite, 310 U.S. at 402–03.
      5   FMC asserts that the Court of Federal Claims “ig-
 nored many cases which held that the SEC and the ‘United
 States’ were deemed not to be in privity[.]” Appellant’s
 Br. 19 n.2. However, the cases FMC cites, see id. at 21–23
 (collecting cases), support only the unexceptional proposi-
 tion that SEC civil enforcement actions do not preclude the
 United States from pursuing criminal sanctions for the
 same misconduct. Compare, e.g., United States v. Wan-
 land, 830 F.3d 947, 957 (9th Cir. 2016) (concluding that the
Case: 19-1798     Document: 42      Page: 18    Filed: 06/12/2020




 18             FIRST MORTGAGE CORPORATION     v. UNITED STATES



      Last, FMC argues that “[t]he District Court erred in
 concluding that FMC’s [Complaint] [was] a collateral at-
 tack” on the Final Judgment, Appellant’s Br. 23, because
 “[t]he only context in which the [Final] Judgment could be
 vacated would be in an action raised in the [District
 Court],” id. at 24. FMC’s argument is without merit.
 Claim preclusion does not require identity of venue, only
 identity of underlying facts. See Jet, 223 F.3d at 1362 (ex-
 plaining that claim preclusion “bars a second suit raising
 claims based on the same set of transactional facts”).
 Claim preclusion prevents “parties or their privies from


 “[Internal Revenue Service (‘IRS’)] in a bankruptcy action
 and the United States government in a criminal action are
 not in privity,” given the “different roles” and “purposes” of
 “the IRS and the United States government in criminal
 prosecutions); United States v. Ledee, 772 F.3d 21, 30 (1st
 Cir. 2014) (providing that settlement with a U.S. bank-
 ruptcy trustee that made “no reference” to criminal charges
 did not “estop the [Department of Justice (‘DOJ’)] from sub-
 sequently filing criminal charges”); United States v. Hickey,
 367 F.3d 888, 893 (9th Cir. 2004) (explaining that the SEC
 and DOJ “[were] not the same party” for purposes of collat-
 eral estoppel in criminal proceedings brought by the DOJ,
 because the SEC, in its civil enforcement capacity, “was not
 acting as ‘the federal sovereign vindicating the criminal
 law of the United States’” (citation omitted)), with 15
 U.S.C. § 77t(b) (providing that the SEC “may transmit such
 evidence as may be available concerning such acts or prac-
 tices to the Attorney General who may, in his [or her] dis-
 cretion, institute the necessary criminal proceedings”); 17
 C.F.R. § 202.5(f) (explaining that “the disposition of any . . .
 matter [in a civil action brought by the SEC] may not, ex-
 pressly or impliedly, extend to any criminal charges that
 have been, or may be, brought against any such person”
 because the SEC does not have the “authority or responsi-
 bility,” which are “vested in the [DOJ]”).
Case: 19-1798    Document: 42     Page: 19    Filed: 06/12/2020




 FIRST MORTGAGE CORPORATION    v. UNITED STATES            19



 relitigating issues that were or could have been raised in
 [an earlier] action.” Ammex, 334 F.3d at 1055 (citing Fed-
 erated Dep’t Stores, 452 U.S. at 398). FMC could have con-
 tested its breach and default of the Guaranty Agreements
 before the District Court. See Fed. R. Civ. P. 12(b) (provid-
 ing that “[e]very defense to a claim for relief in any plead-
 ing must be asserted in the responsive pleading if one is
 required”), 13 (providing for the filing of “[c]ounterclaims
 and [c]ross claims”). It chose instead to enter the Consent
 Agreement with the SEC. J.A. 459 (Consent Agreement)
 (providing that “[FMC] agrees that the [SEC] may present
 the Final Judgment to the [District] Court for signature
 and entry without further notice”). It cannot now take back
 that choice. See Parklane Hosiery, 439 U.S. at 326 (“[R]es
 judicata[] has the dual purpose of protecting litigants from
 the burden of relitigating an identical issue with the same
 party or his privy and of promoting judicial economy by
 preventing needless litigation.”). Accordingly, the Court of
 Federal Claims properly dismissed FMC’s precluded Com-
 plaint for failure to state a claim on which relief can be
 granted.
                        CONCLUSION
     We have considered FMC’s remaining arguments and
 find them unpersuasive. 6 Accordingly, the Judgment of the
 U.S. Court of Federal Claims is



     6   FMC argues that “even if . . . claim preclusion ap-
 plied” to FMC’s breach of contract claims stemming from
 the Guaranty Agreements, “no such defense could exist”
 against FMC’s claim that Ginnie Mae “breached the Cure
 Agreement” purportedly created when FMC responded to
 Ginnie Mae’s Notice of Violation. Appellant’s Br. 25. This
 argument is without basis. The Guaranty Agreements
 gave Ginnie Mae the “sole discretion” whether to “confer
 and negotiate” with FMC in the event of FMC’s default.
Case: 19-1798     Document: 42    Page: 20    Filed: 06/12/2020




 20             FIRST MORTGAGE CORPORATION   v. UNITED STATES



                        AFFIRMED




 J.A. 73. The Notice of Violation expressly provided that
 Ginnie Mae reserved the right to terminate FMC and ex-
 tinguish its interests regardless of whether FMC re-
 sponded to the Notice of Violation. J.A. 369 (providing that
 Ginnie Mae reserved the right to “tak[e] further remedial
 action against [FMC and its corporate officers],” “including
 but not limited to[] termination” of FMC from the MBS pro-
 gram). Accordingly, there was no “Cure Agreement.” See
 United States v. Armour & Co., 402 U.S. 673, 682 (1971)
 (“[An] instrument must be construed as it is written[.]”).
 The Court of Federal Claims, therefore, did not err in de-
 clining to consider any putative “Cure Agreement.” See
 Rocky Mountain Helium, LLC v. United States, 841 F.3d
 1320, 1326 (Fed. Cir. 2016) (“[It is] well settled that when
 a disparity exists between the written instrument annexed
 to the pleadings and the allegations in the pleadings, the
 terms of the written instrument will control, particularly
 when it is the instrument being relied upon by the party
 who made it an exhibit.” (internal quotation marks and ci-
 tation omitted)); see also Iqbal, 556 U.S. at 678 (to survive
 a motion to dismiss, the complaint must “‘state a claim to
 relief that is plausible on its face’” (quoting Twombly, 550
 U.S. at 570)).
