Deep Web3

SYSTEMS.
PEOPLE.
POSSIBILITIES.

Menu

Go beneath
the surface.

What Morpho and Certora Checked Before Midnight’s Contracts Became Immutable

Morpho Midnight’s core contracts cannot be upgraded, so an administrator cannot patch an error after deployment. In a review of the fixed-rate, fixed-term credit protocol, which launched on Base in July 2026, Morpho described how Certora engineers worked with its protocol team from the start of development. Morpho’s engineers retained responsibility for the specifications: the rules that define how Midnight should behave.

Rather than wait for a final code review, the teams checked those rules as the implementation changed. Morpho says this helped its engineers refine the specifications, evaluate code changes and find bugs while fixes were still possible.

What the verification covered

A conventional test checks what happens for selected inputs. Formal verification uses mathematical methods to check whether a specified property holds for every input and transaction sequence covered by a model. For Midnight, that included invariants: conditions that must remain true across protocol operations, not just within a single function.

Morpho identified five areas of verification:

  • Accounting: Credit, debt and collateral must stay consistent, and token transfers must reach the correct parties.
  • Maturity and solvency: Checks covered when a position qualifies for liquidation, the bounds on liquidation incentives and how the protocol accounts for bad debt.
  • Offers, fees and rounding: Checks covered limits and how the protocol handles rounding when settlements are split.
  • Permissions: Rules restrict who can perform privileged actions.
  • Implementation: Checks covered arithmetic, price conversions and protection against inconsistent protocol states during calls to external contracts.

What the results establish

The scope of assurance depends on both the rules Morpho specified and the behavior the model covers. Verifying an accounting invariant, for example, addresses that particular question; it does not establish that every aspect of the protocol is free of defects. Morpho treats verification as a complement to testing, independent audits, public review and operational controls, not a replacement for them.

Morpho reported more than $200 million in Midnight deposits as of November 25, 2026. It said the verification process followed a practice already used for Morpho Blue, which it described as operating since 2024 and holding more than $17 billion in deposits.