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 Proven | Scope | Tool Used |
|---|---|---|
| Midnight | core logic | Certora |
| Morpho Blue | core logic | Certora & Halmos |
| Vault V2 | core logic | Certora |
| Morpho token | ERC20 and delegation logic | Certora |
| Morpho Blue - Pre-liquidation | core logic | Certora |
| Morpho data structures (Legacy) | double linked list and logarithmic buckets | Certora & Halmos |
| Morpho Aave V3 (Legacy) | core logic | Why3 |
| Morpho optimizers (Legacy) | Merkle tree and claim function | Certora & custom checker |
| Universal rewards distributor (Legacy) | Merkle tree and claim function | Certora & custom checker |
| Morpho token (legacy) | authorization system | Certora |
| Morpho utils (Legacy) | math functions | Certora |
| Vault V1.0 (Legacy) | core logic | Certora |
| Bundler3 (legacy) | core logic | Certora |