msgvalue-loop

Community

Prevent msg.value exploits in loops.

AuthorApegurus
Version1.0.0
Installs0

System Documentation

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.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: msgvalue-loop
Download link: https://github.com/Apegurus/solidity-argus/archive/main.zip#msgvalue-loop

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.