Post
Share your knowledge.
Best Tools for Auditing Sui Move Code?
I'm auditing a Sui Move smart contract and need to ensure: Security, Correctness, Gas Efficiency Best Practices
Current Challenges:
- Manual review is time-consuming
- Unsure which tools cover Sui's unique features
- Need both static and dynamic analysis
Questions:
- What are the most effective static analyzers for Sui Move?
- How to test complex invariants formally?
- Are there Sui-specific security scanners?
- What manual review techniques catch what tools miss?
- Sui
- Move
Answers
2For safer I still prefer not just only use tool but have audit from 3rd party.
Whether you're developing a DeFi app, blockchain game, or any onchain project on Sui, a number of audit firms are already actively supporting the ecosystem, offering security services across various stages of development:
- Asymptotic – Built the Sui Prover, a formal verification tool specifically crafted for Sui smart contract validation.
- Blaize.Security – Provides comprehensive Sui-focused security services, including manual audits, CI/CD pipeline protection, live monitoring, and incident analysis.
- Certora – Combines traditional manual auditing with formal verification to produce rigorous hybrid security assessments.
- MoveBit – One of the earliest firms to adopt formal verification in Sui audits, while also contributing through developer tools and CTF events.
- OtterSec – Known for thorough manual audits and close collaboration with teams throughout the auditing lifecycle.
- Zellic – Offers strong expertise in the Move language and actively works with multiple projects within the Sui ecosystem.
Beside that Sui developers can leverage the Move Registry (MVR) — an onchain package management system that lets teams attach key information like source code, documentation, and audit results directly to their deployed smart contracts.
1. Essential Audit Toolchain
Static Analysis
Tool | Purpose | Key Features |
---|---|---|
Move Prover | Formal verification | - Mathematical proof of invariants - Detects arithmetic overflows - Ensures access control correctness |
Move Analyzer | IDE Integration | - Real-time error detection - Type checking - Cross-module reference validation |
Sui CLI Security Checks | Built-in audits | sui move verify sui client verify-source |
Example Prover Usage:
spec balance_never_negative {
invariant balance >= 0;
}
Dynamic Analysis
Tool | Type | Coverage |
---|---|---|
Sui Test Framework | Unit Tests | - 100% path coverage - Mock objects/clocks |
Sui Fuzzer | Property Tests | - Generates edge cases - Finds panics in arithmetic |
Fuzz Test Example:
#[test_only]
fun fuzz_transfer(amount: u64) {
let balance = 1000;
transfer(&mut balance, amount); // Auto-tests 0, MAX, etc.
}
2. Sui-Specific Scanners
Object Lifecycle Checkers
- Sui Storage Rebate Analyzer | Detects:
- Unbounded object growth
- Missing
drop
abilities - Orphaned UIDs
Access Control Audits
# Find all entry functions without signer checks
grep -r "public entry" ./sources | grep -v "&signer"
Shared Object Linters
Custom rules for:
- Missing epoch checks
- Concurrent modification risks
- Stale shared object references
3. Manual Review Techniques
Critical Checks
- Capability Patterns:
// Verify admin caps are properly guarded assert!(address_of(signer) == admin_cap.admin, EUnauthorized);
- Dynamic Field Safety:
// Ensure no unvalidated user input in dynamic fields dynamic_field::add(&mut obj, user_input, value); // RISKY
Gas Hotspots
- Storage Operations:
// Prefer Table over vector for large collections let bad: vector<u64>; // Expensive deletions let good: Table<ID, u64>; // O(1) ops
Sui Framework Adherence
- Cross-check against:
4. Integrated Audit Workflow
Step 1: Static Scan
sui move build --lint && \
sui move prove --path ./sources
Step 2: Dynamic Testing
sui move test --coverage && \
move-fuzzer ./sources -iterations 1000
Step 3: Manual Review
- Check all
entry
functions:- Signer present?
- Input validation?
- Audit shared objects:
- Epoch checks?
- Locking mechanisms?
5. Common Findings by Tool
Tool | Typical Catches |
---|---|
Move Prover | - Integer overflows - Unreachable code |
Sui CLI | - Invalid object ownership - Missing abilities |
Fuzzer | - Panic on edge values - Gas bombs |
Manual | - Business logic flaws - Marketplace compatibility |
6. Pro Tips
✅ Continuous Auditing
# GitHub Action example
- uses: MoveAnalyst/move-security-check@v1
with:
path: ./sources
✅ Compare Against Known Vulnerabilities
✅ Use Multiple RPCs
Test against:
- Localnet
- Testnet
- Different fullnode providers
Do you know the answer?
Please log in and share it.
Sui is a Layer 1 protocol blockchain designed as the first internet-scale programmable blockchain platform.
- Why does BCS require exact field order for deserialization when Move structs have named fields?53
- Multiple Source Verification Errors" in Sui Move Module Publications - Automated Error Resolution43
- Sui Transaction Failing: Objects Reserved for Another Transaction25
- How do ability constraints interact with dynamic fields in heterogeneous collections?05