Formal Verification

Morpho follows a multi-faceted approach to security. Morpho security practices include formal verification, mutation tests, fuzzing, unit testing, and peer reviews that can be found within the respective GitHub repositories. External measures include professional security reviews, contests, and pre/post-deployment bounties.

To learn more, read Securing Morpho Midnight.

Formal verification using Certora

Certora is a leading formal verification platform that helps mathematically verify the correctness and security of smart contracts. Using the Certora Prover, developers define rules and invariants that are checked against the contract's code. Unlike traditional testing, Certora verifies properties across possible execution paths, helping uncover subtle vulnerabilities and prove that key security properties hold. Morpho extensively uses Certora to formally verify core protocol components, complementing its broader security practices.

Formally verified components

The full list of formal verifications is available below.

Formally ProvenScopeTool Used
Midnightcore logicCertora
Morpho Bluecore logicCertora & Halmos
Vault V2core logicCertora
Morpho tokenERC20 and delegation logicCertora
Morpho Blue - Pre-liquidationcore logicCertora
Morpho data structures (Legacy)double linked list and logarithmic bucketsCertora & Halmos
Morpho Aave V3 (Legacy)core logicWhy3
Morpho optimizers (Legacy)Merkle tree and claim functionCertora & custom checker
Universal rewards distributor (Legacy)Merkle tree and claim functionCertora & custom checker
Morpho token (legacy)authorization systemCertora
Morpho utils (Legacy)math functionsCertora
Vault V1.0 (Legacy)core logicCertora
Bundler3 (legacy)core logicCertora