This page tracks a short video series for learning formal verification basics in Sanctifier with Kani.
- Understand report
summaryandfindingssections - Prioritize critical/high findings first
- Translate findings into concrete remediation tasks
- Run
sanctifier analyze ./contracts/kani-poc --format json - Open the generated report and explain top-level metadata
- Walk through auth gaps, panic issues, arithmetic issues, and storage warnings
- Show how to track fixes issue-by-issue
- Know why host-backed types (
Env,Address,Symbol) are hard to verify directly - Refactor contract logic into pure functions suitable for Kani
- Start from
contracts/kani-poc/src/lib.rs - Isolate transfer/mint/burn checks into pure Rust functions
- Keep
#[contractimpl]methods thin and focused on host I/O
- Add
#[kani::proof]harnesses to verify invariants - Use properties like conservation and insufficient-balance rejection
- Install Kani:
cargo install --locked kani-verifiercargo kani setup
- Add/inspect harnesses under
contracts/kani-poc - Run
cargo kani --package kani-poc-contract - Interpret pass/fail output
- Read a failing counterexample
- Patch business logic to satisfy the invariant
- Re-run verification and confirm fix
- Introduce an intentional bug in pure logic
- Run Kani and inspect failure trace
- Apply fix and re-run proof
- Re-scan with Sanctifier to ensure no regressions
- Resolution: 1080p
- Include terminal font at readable size (>=16px equivalent)
- Keep each episode under 12 minutes
- Add chapter markers for setup, demo, and recap
- Update the
Videocolumn with final links after upload