What problem does it solve?
This Skill identifies and helps prevent a critical vulnerability in Solidity smart contracts where msg.value is reused within loops or functions called multiple times in a single external transaction, potentially allowing attackers to exploit the contract by paying only once for multiple operations.
Core Features & Use Cases
- Vulnerability Detection: Pinpoints the misuse of
msg.value in iterative contract logic.
- Pattern Matching: Analyzes code for specific anti-patterns like
msg.value inside for/while loops or multicall functions.
- Use Case: A developer can use this Skill to scan their new DeFi protocol's smart contracts before deployment, ensuring that functions like batch token purchases or multicalls correctly handle user-submitted Ether, preventing unintended over-minting or value extraction.
Quick Start
Analyze the attached contract 'Vault.sol' for any instances where msg.value is referenced inside a loop.