Section 01
[Introduction] invariant-gen: Automatically Generate Security Invariants for Solana Smart Contracts Using LLMs
invariant-gen is a tool that combines Retrieval-Augmented Generation (RAG) and local Large Language Model (LLM) inference, designed to automatically generate formal security invariants for Solana Anchor smart contracts. It supports multi-format outputs including QEDSpec, Kani, and JSON, and enables fully localized contract security audits, helping to lower the technical barrier of formal verification so that ordinary developers can also access expert-level security audit capabilities.