How certora/aquarius-cantina-fv works
Project type and purpose
• This is a Rust-based, multi-crate repository for Soroban smart contracts and their formal verification.
• It bundles:
• A suite of Soroban contracts (e.g., token, liquidity-pool, access_control) compiled to WASM.
• A formal verification toolchain using Certora Sunbeam in the fees_collector crate.
• Integration tests and Taskfiles/Justfiles for building, testing, and running the prover.
• Primary purpose: develop, test, and formally verify properties of on-chain smart contracts in the Aquarius contest.
File structure
• Top-level workspace with Cargo.toml, GitHub Actions, Taskfile.yaml, and subfolders for each contract crate.
• Each crate (e.g., access_control, liquidity_pool, token) has its own Cargo.toml, source, tests, and Taskfile/Justfile.
• The contracts folder holds pre-built WASM blobs for deployment.
• fees_collector is special: it contains:
• confs/ (Certora run configurations)
• src/certora_specs/ (spec files, mocks, summaries)
• mutations/ (mutant code for evaluating coverage)
• integration_tests runs end-to-end tests against all contracts.
• Common utilities in utils crate.
README for additional insights
• Describes the Formal Verification (FV) contest, prize structure, and Certora integration.
• Emphasizes the Certora folder layout in fees_collector for specs, mocks, summaries, and mutations.
• Details build steps: just build, then certoraSorobanProver with .conf files.
Elements
• Clear labels: e.g., “access_control crate”, “token crate”, “fees_collector::certora_specs”.
• from contract crates → integration_tests
• from fees_collector → Certora CLI → proofs
• from Taskfile → cargo build/test/prover
• Blue rectangles for Rust crates
• Orange hexagons for external tools (Soroban, Certora)
Detailed breakdown
• Of crates
• CI / workflow triggers
• Verification layer (fees_collector):
• Testing layer: integration_tests crate → local Soroban runtime.
• Utility layer: utils crate supporting all others.
• Automation layer: Taskfile/Justfile → orchestrates all build/test/verify tasks.