formal-verification

Verify Solidity contracts with Certora CVL specs and Halmos symbolic testing.

120|12|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ccashwell/evm-cortex --skill formal-verification-ccashwell
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: formal-verification
Source: https://github.com/ccashwell/evm-cortex/tree/main/skills/formal-verification
Command: npx skills add https://github.com/ccashwell/evm-cortex --skill formal-verification-ccashwell

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables rigorous verification of Solidity contracts using formal methods, helping teams detect defects early and prove correctness for safety-critical code.

Core Features & Use Cases

  • Certora CVL Specification Template: guides writing formal specifications for contract behavior.
  • Rule Types & Ghost Variables: supports Parametric, Invariant, Relational rules plus ghost variables and hooks to track state.
  • Halmos Symbolic Testing & Common Properties: demonstrates symbolic testing workflows and common verification properties like access control and no ether leaks.

Quick Start

Install the Certora CLI and Halmos, then run certoraRun with your Solidity contract and spec to verify correctness.

Frequently Asked Questions about formal-verification

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify Solidity smart contract correctness using formal methods?▼

Formal verification of Solidity smart contracts involves writing mathematical specifications using Certora CVL or Halmos symbolic testing to prove correctness properties like access control and no ether leaks for safety-critical code.

What are ghost variables and hooks in Certora CVL specifications?▼

Ghost variables and hooks in Certora CVL specifications track contract state during formal verification, enabling parametric, invariant, and relational rules to monitor behavior across function calls and verify complex protocol properties.

Can I use Halmos symbolic testing for DeFi protocol audits?▼

Halmos symbolic testing supports DeFi protocol audits by executing contracts with symbolic inputs to automatically discover edge cases and verify common properties like access control and no ether leaks without manual specification writing.

What is the best way to start formal verification of a Solidity contract?▼

To start formal verification, install the Certora CLI and Halmos, then run certoraRun with your Solidity contract and a CVL specification file to generate verification results proving contract correctness.

Does formal verification work with existing Solidity contracts or do I need to modify them?▼

Formal verification applies to existing Solidity contracts for audits, security-critical systems, DeFi protocols, and tokens, requiring CVL specification writing rather than modifying the underlying contract source code.

What common verification properties can I check with CVL and Halmos?▼

Common verification properties checkable with CVL and Halmos include access control restrictions, no ether leaks, state invariants, parametric rules, and relational rules comparing behaviors across multiple contract functions.