Smart Contract Audit Skill
When to Use
Use this skill before deploying any smart contract to a testnet or mainnet, focusing on security vulnerabilities and gas optimization.
Prerequisites
- Compiled smart contract artifacts (e.g., ABI, Bytecode).
- Validated
solidity-patterns.jsonKnowledge Item. - Static analysis tools (like Slither or Mythril) installed in the environment.
Process
- Static Analysis: Run automated scanners using the
run_audittool. - Manual Review: Critically examine logic involving value transfers and state changes.
- Gas Optimization: Identify areas to reduce computational cost.
- Report Generation: Compile all findings into a structured audit artifact.
Best Practices
- Security-First: Prioritize resolving reentrancy and arithmetic overflow vulnerabilities.
- Layered Auditing: Combine automated tools with manual specialized review.
- Immutable Path: Never deploy a contract that hasn't cleared the audit gate.