What problem does it solve? Smart contract logic errors like precision loss, first depositor attacks, and missing slippage protection caused over $63.8M in losses, yet they are hard to spot with manual code review. This Skill gives auditors systematic detection patterns, search queries, and verification checklists to find these vulnerabilities before attackers do. ## Core Features & Use Cases - Calculation Flow Mapping: Trace every arithmetic operation from input validation through rounding direction to state updates, documenting risk in a structured table. - Six Detection Patterns: Covers division-before-multiplication, first depositor/inflation attacks, unchecked return values, overflow in unchecked blocks, missing slippage protection, and missing zero/address validation. - Ready-to-Run Search Queries: Provides Grep patterns for Solidity files to quickly locate suspect arithmetic, share calculations, and missing checks. - Use Case: While auditing an ERC4626 vault, use the first depositor pattern to check whether the initial share ratio can be manipulated via a donation attack, then verify rounding direction favors the protocol on both deposit and withdraw. ## Quick Start Ask the logic-auditor agent to analyze the vault contract for division-before-multiplication and first depositor vulnerabilities using the logic error detection patterns.