Last updated: September 08, 2025
SCWE-093: Unnamed Function Parameters
Stable Version v0.0.1
This content is in the version-(v0.0.1) and still under active development, so it is subject to change any time (e.g. structure, IDs, content, URLs, etc.).
Send Feedback
Relationships
Description
This weakness occurs when functions declare parameters without names (only types). Unnamed parameters reduce code clarity and hinder maintainability, making it difficult for reviewers and future maintainers to understand the purpose and expected usage of each argument. In smart contracts, where correctness is critical, this ambiguity can result in misinterpretation, incorrect argument ordering in calls or refactors, and subtle logic errors.
Impact
Lack of clear parameter names can lead to:
- Misuse of function arguments due to misunderstanding of their meaning.
- Increased likelihood of logic bugs during refactoring and maintenance.
- Higher audit and review overhead; reduced readability and self-documentation.
- Potential security issues if parameters are confused (e.g., recipient vs. sender, amount vs. fee).
- Always provide descriptive names for all function parameters.
- Choose meaningful, self-explanatory names consistent with a coding standard.
- Supplement with NatSpec where helpful to document parameter intent and units.
- Enforce naming conventions with linters and code review checklists.
Examples